Skip to content

Commit cd5dd2f

Browse files
committed
Fix regepx default
1 parent f8ea15d commit cd5dd2f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

codersdk/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ when required by your organization's security policy.`,
10821082
Description: "If provided any group name not matching the regex is ignored. This allows for filtering out groups that are not needed. This filter is applied after the group mapping.",
10831083
Flag: "oidc-group-regex-filter",
10841084
Env: "CODER_OIDC_GROUP_REGEX_FILTER",
1085-
Default: "*",
1085+
Default: ".*",
10861086
Value: &c.OIDC.GroupRegexFilter,
10871087
Group: &deploymentGroupOIDC,
10881088
YAML: "groupRegexFilter",

enterprise/coderd/userauth_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ func TestGroupSync(t *testing.T) {
386386
modCfg: func(cfg *coderd.OIDCConfig) {
387387
// Disable group sync
388388
cfg.GroupField = ""
389+
cfg.GroupFilter = regexp.MustCompile(".*")
389390
},
390391
initialOrgGroups: []string{"a", "b", "c", "d"},
391392
initialUserGroups: []string{"b", "c", "d"},
@@ -414,6 +415,7 @@ func TestGroupSync(t *testing.T) {
414415
// From a,c,b -> []
415416
name: "RemoveAllGroups",
416417
modCfg: func(cfg *coderd.OIDCConfig) {
418+
cfg.GroupFilter = regexp.MustCompile(".*")
417419
},
418420
initialOrgGroups: []string{"a", "b", "c", "d"},
419421
initialUserGroups: []string{"a", "b", "c"},

0 commit comments

Comments
 (0)