mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add group allowlist for oidc (#11070)
* feat: group allow list in OIDC settings
This commit is contained in:
@@ -291,6 +291,7 @@ type OIDCConfig struct {
|
||||
IgnoreUserInfo clibase.Bool `json:"ignore_user_info" typescript:",notnull"`
|
||||
GroupAutoCreate clibase.Bool `json:"group_auto_create" typescript:",notnull"`
|
||||
GroupRegexFilter clibase.Regexp `json:"group_regex_filter" typescript:",notnull"`
|
||||
GroupAllowList clibase.StringArray `json:"group_allow_list" typescript:",notnull"`
|
||||
GroupField clibase.String `json:"groups_field" typescript:",notnull"`
|
||||
GroupMapping clibase.Struct[map[string]string] `json:"group_mapping" typescript:",notnull"`
|
||||
UserRoleField clibase.String `json:"user_role_field" typescript:",notnull"`
|
||||
@@ -1187,6 +1188,16 @@ when required by your organization's security policy.`,
|
||||
Group: &deploymentGroupOIDC,
|
||||
YAML: "groupRegexFilter",
|
||||
},
|
||||
{
|
||||
Name: "OIDC Allowed Groups",
|
||||
Description: "If provided any group name not in the list will not be allowed to authenticate. This allows for restricting access to a specific set of groups. This filter is applied after the group mapping and before the regex filter.",
|
||||
Flag: "oidc-allowed-groups",
|
||||
Env: "CODER_OIDC_ALLOWED_GROUPS",
|
||||
Default: "",
|
||||
Value: &c.OIDC.GroupAllowList,
|
||||
Group: &deploymentGroupOIDC,
|
||||
YAML: "groupAllowed",
|
||||
},
|
||||
{
|
||||
Name: "OIDC User Role Field",
|
||||
Description: "This field must be set if using the user roles sync feature. Set this to the name of the claim used to store the user's role. The roles should be sent as an array of strings.",
|
||||
|
||||
Reference in New Issue
Block a user