Skip to content

Commit bde4ffe

Browse files
authored
docs: add auth paragraph about oidc group sync (#6064)
1 parent c63dcf1 commit bde4ffe

File tree

1 file changed

+32
-7
lines changed

1 file changed

+32
-7
lines changed

docs/admin/auth.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ First, [register a GitLab OAuth application](https://docs.gitlab.com/ee/integrat
5454

5555
- **Redirect URI**: Set to `https://coder.domain.com/api/v2/users/oidc/callback`
5656

57-
### Step 2: Configure Coder with the OpenID Connect credentials
57+
### Step 2: Configure Coder with the Gitlab OpenID Connect credentials
5858

5959
Navigate to your Coder host and run the following command to start up the Coder
6060
server:
@@ -96,7 +96,7 @@ First, [register a Google OAuth application](https://support.google.com/cloud/an
9696
- **Authorized JavaScript origins**: Set to your Coder domain (e.g. `https://coder.domain.com`)
9797
- **Redirect URIs**: Set to `https://coder.domain.com/api/v2/users/oidc/callback`
9898

99-
### Step 2: Configure Coder with the OpenID Connect credentials
99+
### Step 2: Configure Coder with the Google OpenID Connect credentials
100100

101101
Navigate to your Coder host and run the following command to start up the Coder
102102
server:
@@ -120,18 +120,24 @@ Once complete, run `sudo service coder restart` to reboot Coder.
120120

121121
## OIDC Claims
122122

123-
Coder requires all OIDC email addresses to be verified by default. If the `email_verified` claim is present in the token response from the identity provider, Coder will validate that its value is `true`.
124-
If needed, you can disable this behavior with the following setting:
123+
Coder requires all OIDC email addresses to be verified by default. If the
124+
`email_verified` claim is present in the token response from the identity
125+
provider, Coder will validate that its value is `true`. If needed, you can
126+
disable this behavior with the following setting:
125127

126128
```console
127129
CODER_OIDC_IGNORE_EMAIL_VERIFIED=true
128130
```
129131

130-
> **Note:** This will cause Coder to implicitly treat all OIDC emails as "verified".
132+
> **Note:** This will cause Coder to implicitly treat all OIDC emails as
133+
> "verified".
131134
132-
When a new user is created, the `preferred_username` claim becomes the username. If this claim is empty, the email address will be stripped of the domain, and become the username (e.g. `example@coder.com` becomes `example`).
135+
When a new user is created, the `preferred_username` claim becomes the username.
136+
If this claim is empty, the email address will be stripped of the domain, and
137+
become the username (e.g. `example@coder.com` becomes `example`).
133138

134-
If you'd like to change the OpenID Connect button text and/or icon, you can configure them like so:
139+
If you'd like to change the OpenID Connect button text and/or icon, you can
140+
configure them like so:
135141

136142
```console
137143
CODER_OIDC_SIGN_IN_TEXT="Sign in with Gitea"
@@ -157,3 +163,22 @@ If your OpenID Connect provider requires client TLS certificates for authenticat
157163
CODER_TLS_CLIENT_CERT_FILE=/path/to/cert.pem
158164
CODER_TLS_CLIENT_KEY_FILE=/path/to/key.pem
159165
```
166+
167+
## Group Sync (enterprise)
168+
169+
If your OpenID Connect provider supports group claims, you can configure Coder
170+
to synchronize groups in your auth provider to groups within Coder.
171+
172+
To enable group sync, ensure that the `group` claim is set:
173+
174+
```console
175+
# as an environment variable
176+
CODER_OIDC_SCOPES=openid,profile,email,groups
177+
# as a flag
178+
--oidc-scopes openid,profile,email,groups
179+
```
180+
181+
On login, users will automatically be assigned to groups that have matching
182+
names in Coder and removed from groups that the user no longer belongs to.
183+
184+
> **Note:** Groups are only updated on login.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy