Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ when required by your organization's security policy.`,
Name: "OIDC Group Mapping",
Description: "A map of OIDC group IDs and the group in Coder it should map to. This is useful for when OIDC providers only return group IDs.",
Flag: "oidc-group-mapping",
Env: "OIDC_GROUP_MAPPING",
Env: "CODER_OIDC_GROUP_MAPPING",
Default: "{}",
Value: &c.OIDC.GroupMapping,
Group: &deploymentGroupOIDC,
Expand Down
7 changes: 7 additions & 0 deletions codersdk/deployment_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package codersdk_test

import (
"strings"
"testing"

"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -101,6 +102,12 @@ func TestDeploymentValues_HighlyConfigurable(t *testing.T) {
t.Errorf("Option %q is excluded but has an env name", opt.Name)
}

// Also check all env vars are prefixed with CODER_
const prefix = "CODER_"
if opt.Env != "" && !strings.HasPrefix(opt.Env, prefix) {
t.Errorf("Option %q has an env name (%q) that is not prefixed with %s", opt.Name, opt.Env, prefix)
}

delete(excludes, opt.Name)
}

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ Change the OIDC default 'groups' claim field. By default, will be 'groups' if pr
| | |
| ----------- | -------------------------------------- |
| Type | <code>struct[map[string]string]</code> |
| Environment | <code>$OIDC_GROUP_MAPPING</code> |
| Environment | <code>$CODER_OIDC_GROUP_MAPPING</code> |
| Default | <code>{}</code> |

A map of OIDC group IDs and the group in Coder it should map to. This is useful for when OIDC providers only return group IDs.
Expand Down