@@ -8,6 +8,27 @@ IdP sync is an Enterprise and Premium feature.
8
8
9
9
</blockquote >
10
10
11
+ ## Confirm that OIDC provider sends claims
12
+
13
+ To confirm that your OIDC provider is sending claims, log in with OIDC and visit
14
+ the following URL with an ` Owner ` account:
15
+
16
+ ``` text
17
+ https://[coder.example.com]/api/v2/debug/[your-username]/debug-link
18
+ ```
19
+
20
+ You should see a field in either ` id_token_claims ` , ` user_info_claims ` or
21
+ both followed by a list of the user's OIDC groups in the response.
22
+
23
+ This is the [ claim] ( https://openid.net/specs/openid-connect-core-1_0.html#Claims )
24
+ sent by the OIDC provider.
25
+
26
+ Depending on the OIDC provider, this claim may be called something else.
27
+ Common names include ` groups ` , ` memberOf ` , and ` roles ` .
28
+
29
+ See the [ troubleshooting section] ( #troubleshooting-grouproleorganization-sync )
30
+ for help troubleshooting common issues.
31
+
11
32
## Group Sync
12
33
13
34
If your OpenID Connect provider supports group claims, you can configure Coder
@@ -35,25 +56,6 @@ You can use the dashboard to configure group sync instead.
35
56
36
57
</blockquote >
37
58
38
- 1 . Confirm that your OIDC provider is sending claims.
39
-
40
- Log in with OIDC and visit the following URL with an ` Owner ` account:
41
-
42
- ``` text
43
- https://[coder.example.com]/api/v2/debug/[your-username]/debug-link
44
- ```
45
-
46
- You should see a field in either ` id_token_claims ` , ` user_info_claims ` or
47
- both followed by a list of the user's OIDC groups in the response. This is
48
- the [ claim] ( https://openid.net/specs/openid-connect-core-1_0.html#Claims )
49
- sent by the OIDC provider.
50
-
51
- See [ Troubleshooting] ( #troubleshooting-grouproleorganization-sync ) to debug
52
- this.
53
-
54
- Depending on the OIDC provider, this claim may be called something else.
55
- Common names include ` groups ` , ` memberOf ` , and ` roles ` .
56
-
57
59
1 . Configure the Coder server to read groups from the claim name with the
58
60
[ OIDC group field] ( ../../reference/cli/server.md#--oidc-group-field ) server
59
61
flag:
@@ -107,31 +109,11 @@ OIDC provider will be added to the `myCoderGroupName` group in Coder.
107
109
# ## Runtime (Organizations)
108
110
109
111
For deployments with multiple [organizations](./organizations.md), you must
110
- configure group sync at the organization level. In future Coder versions, you
111
- will be able to configure this in the UI. For now, you must use CLI commands.
112
+ configure group sync at the organization level.
112
113
113
114
1. Confirm you have the [Coder CLI](../../install/index.md) installed and are
114
115
logged in with a user who is an Owner or Organization Admin role.
115
116
116
- 1. Confirm that your OIDC provider is sending a groups claim.
117
-
118
- Log in with OIDC and visit the following URL:
119
-
120
- ` ` ` text
121
- https://[coder.example.com]/api/v2/debug/[your-username]/debug-link
122
- ` ` `
123
-
124
- You should see a field in either ` id_token_claims` , ` user_info_claims` or
125
- both followed by a list of the user' s OIDC groups in the response. This is
126
- the [claim](https://openid.net/specs/openid-connect-core-1_0.html#Claims)
127
- sent by the OIDC provider.
128
-
129
- See [Troubleshooting](#troubleshooting-grouproleorganization-sync) to debug
130
- this.
131
-
132
- Depending on the OIDC provider, this claim may be called something else.
133
- Common names include `groups`, `memberOf`, and `roles`.
134
-
135
117
1. To fetch the current group sync settings for an organization, run the
136
118
following:
137
119
@@ -230,23 +212,6 @@ You can use the dashboard to configure role sync instead.
230
212
231
213
< /blockquote>
232
214
233
- 1. Confirm that your OIDC provider is sending a roles claim by logging in with
234
- OIDC and visiting the following URL with an `Owner` account:
235
-
236
- ```text
237
- https://[coder.example.com]/api/v2/debug/[your-username]/debug-link
238
- ```
239
-
240
- You should see a field in either `id_token_claims`, `user_info_claims` or
241
- both followed by a list of the user' s OIDC roles in the response. This is the
242
- [claim](https://openid.net/specs/openid-connect-core-1_0.html#Claims) sent by
243
- the OIDC provider.
244
-
245
- See [Troubleshooting](# troubleshooting-grouproleorganization-sync) to debug
246
- this.
247
-
248
- Depending on the OIDC provider, this claim may be called something else.
249
-
250
215
1. Configure the Coder server to read groups from the claim name with the
251
216
[OIDC role field](../../reference/cli/server.md#--oidc-user-role-field)
252
217
server flag:
@@ -268,26 +233,7 @@ example above maps to two roles in Coder.
268
233
# ## Runtime (Organizations)
269
234
270
235
For deployments with multiple [organizations](./organizations.md), you can
271
- configure role sync at the organization level. In future Coder versions, you
272
- will be able to configure this in the UI. For now, you must use CLI commands.
273
-
274
- 1. Confirm that your OIDC provider is sending a roles claim.
275
-
276
- Log in with OIDC and visit the following URL with an ` Owner` account:
277
-
278
- ` ` ` text
279
- https://[coder.example.com]/api/v2/debug/[your-username]/debug-link
280
- ` ` `
281
-
282
- You should see a field in either ` id_token_claims` , ` user_info_claims` or
283
- both followed by a list of the user' s OIDC roles in the response. This is the
284
- [claim](https://openid.net/specs/openid-connect-core-1_0.html#Claims) sent by
285
- the OIDC provider.
286
-
287
- See [Troubleshooting](#troubleshooting-grouproleorganization-sync) to debug
288
- this.
289
-
290
- Depending on the OIDC provider, this claim may be called something else.
236
+ configure role sync at the organization level.
291
237
292
238
1. To fetch the current group sync settings for an organization, run the
293
239
following:
@@ -362,30 +308,14 @@ dashboard:
362
308
363
309
### Dashboard
364
310
365
- 1. Confirm that your OIDC provider is sending claims. Log in with OIDC and visit
366
- the following URL with an ` Owner` account:
367
-
368
- ` ` ` text
369
- https://[coder.example.com]/api/v2/debug/[your-username]/debug-link
370
- ` ` `
371
-
372
- You should see a field in either ` id_token_claims` , ` user_info_claims` or
373
- both followed by a list of the user' s OIDC groups in the response. This is
374
- the [claim](https://openid.net/specs/openid-connect-core-1_0.html#Claims)
375
- sent by the OIDC provider. See
376
- [Troubleshooting](#troubleshooting-grouproleorganization-sync) to debug this.
377
-
378
- Depending on the OIDC provider, this claim may be called something else.
379
- Common names include `groups`, `memberOf`, and `roles`.
380
-
381
311
1. Fetch the corresponding organization IDs using the following endpoint:
382
312
383
313
```text
384
314
https://[coder.example.com]/api/v2/organizations
385
315
```
386
316
387
317
1. As a Coder organization user admin or site-wide user admin, go to
388
- **Settings ** > **IdP organization sync**.
318
+ **Admin settings ** > **Deployment** and select **IdP organization sync**.
389
319
390
320
1. In the **Organization sync field** text box, enter the organization claim,
391
321
then select **Save**.
@@ -452,11 +382,11 @@ settings, a user's memberships will update when they log out and log back in.
452
382
453
383
## Troubleshooting group/role/organization sync
454
384
455
- Some common issues when enabling group/ role sync.
385
+ Some common issues when enabling group, role, or organization sync.
456
386
457
387
### General guidelines
458
388
459
- If you are running into issues with group/role sync:
389
+ If you are running into issues with a sync:
460
390
461
391
1. View your Coder server logs and enable
462
392
[verbose mode](../../reference/cli/index.md#-v---verbose).
@@ -472,7 +402,7 @@ If you are running into issues with group/role sync:
472
402
473
403
1. Attempt to log in, preferably with a user who has the `Owner` role.
474
404
475
- The logs for a successful group sync look like this (human-readable):
405
+ The logs for a successful sync look like this (human-readable):
476
406
477
407
```sh
478
408
[debu] coderd.userauth: got oidc claims request_id=49e86507-6842-4b0b-94d4-f245e62e49f3 source=id_token claim_fields="[aio aud email exp groups iat idp iss name nbf oid preferred_username rh sub tid uti ver]" blank=[]
0 commit comments