You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`--oidc-allowed-users`|`OIDC_ALLOWED_USERS`| - | Comma-separated list of allowed OIDC users (exact match) |
64
+
|`--oidc-allowed-users-glob`|`OIDC_ALLOWED_USERS_GLOB`| - | Comma-separated list of glob patterns for allowed OIDC users |
65
+
|`--oidc-allowed-attributes`|`OIDC_ALLOWED_ATTRIBUTES`| - | Comma-separated list of allowed attribute key=value pairs (e.g., `/groups=admin`) |
66
+
|`--oidc-allowed-attributes-glob`|`OIDC_ALLOWED_ATTRIBUTES_GLOB`| - | Comma-separated list of attribute key=pattern pairs for glob matching |
67
+
|`--oidc-provider-name`|`OIDC_PROVIDER_NAME`|`OIDC`| Display name for OIDC provider |
68
+
|`--oidc-scopes`|`OIDC_SCOPES`|`openid,profile,email`| Comma-separated list of OIDC scopes |
69
+
|`--oidc-user-id-field`|`OIDC_USER_ID_FIELD`|`/email`| JSON pointer to user ID field in userinfo endpoint response |
68
70
69
71
##### OIDC User Matching
70
72
@@ -87,6 +89,46 @@ You can use both exact matching and glob patterns for OIDC user authorization:
87
89
--oidc-allowed-users-glob "*@example.com"
88
90
```
89
91
92
+
##### OIDC Attribute-Based Authorization
93
+
94
+
You can also authorize users based on attributes from the userinfo endpoint (e.g., group memberships, roles, departments). This is useful when you need to restrict access based on IdP-provided claims beyond just the user ID.
95
+
96
+
-**Exact attribute matching** (`--oidc-allowed-attributes`): Attribute values must match exactly
97
+
-**Glob attribute patterns** (`--oidc-allowed-attributes-glob`): Attribute values are matched against glob patterns
98
+
99
+
Attribute keys use [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) syntax to reference fields in the userinfo response. Both string and array attribute values are supported.
rootCmd.Flags().StringVar(&oidcProviderName, "oidc-provider-name", getEnvWithDefault("OIDC_PROVIDER_NAME", "OIDC"), "Display name for OIDC provider")
299
335
rootCmd.Flags().StringVar(&oidcAllowedUsers, "oidc-allowed-users", getEnvWithDefault("OIDC_ALLOWED_USERS", ""), "Comma-separated list of allowed OIDC users")
300
336
rootCmd.Flags().StringVar(&oidcAllowedUsersGlob, "oidc-allowed-users-glob", getEnvWithDefault("OIDC_ALLOWED_USERS_GLOB", ""), "Comma-separated list of glob patterns for allowed OIDC users")
337
+
rootCmd.Flags().StringVar(&oidcAllowedAttributes, "oidc-allowed-attributes", getEnvWithDefault("OIDC_ALLOWED_ATTRIBUTES", ""), "Comma-separated list of allowed attribute key=value pairs (e.g., /groups=admin,/roles=editor). Keys are JSON pointers.")
338
+
rootCmd.Flags().StringVar(&oidcAllowedAttributesGlob, "oidc-allowed-attributes-glob", getEnvWithDefault("OIDC_ALLOWED_ATTRIBUTES_GLOB", ""), "Comma-separated list of attribute key=pattern pairs for glob matching (e.g., /groups=*-admins,/email=*@example.com). Keys are JSON pointers.")
301
339
302
340
// Password authentication
303
341
rootCmd.Flags().BoolVar(&noProviderAutoSelect, "no-provider-auto-select", getEnvBoolWithDefault("NO_PROVIDER_AUTO_SELECT", false), "Disable auto-redirect when only one OAuth/OIDC provider is configured and no password is set")
0 commit comments