Skip to content

Commit a4a8f3d

Browse files
committed
docs: role sync (enterprise)
1 parent b7ced94 commit a4a8f3d

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

docs/admin/auth.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,22 @@ Steps to troubleshoot.
308308
- [Azure AD limit is 200, and omits groups if exceeded.](https://learn.microsoft.com/en-us/azure/active-directory/hybrid/connect/how-to-connect-fed-group-claims#options-for-applications-to-consume-group-information)
309309
- [Okta limit is 100, and returns an error if exceeded.](https://developer.okta.com/docs/reference/api/oidc/#scope-dependent-claims-not-always-returned)
310310

311+
## Role sync (enterprise)
312+
313+
If your OpenID Connect provider supports roles claims, you can configure Coder
314+
to synchronize roles in your auth provider to deployment-wide roles within Coder.
315+
316+
To enable group sync, ensure that the `roles` claim is set by adding the correct scope to request. If role sync is enabled, the user's roles will be controlled by the OIDC provider. This means manual group additions/removals will be overwritten on the next login.
317+
318+
Set the following in your Coder server [configuration](./configure.md):
319+
320+
```console
321+
CODER_OIDC_USER_ROLE_FIELD=roles
322+
CODER_OIDC_USER_ROLE_MAPPING='{"TemplateAuthors":["template-admin","user-admin"]}'
323+
```
324+
325+
> `CODER_OIDC_USER_ROLE_FIELD` can be used if a non-standard roles claim is used.
326+
311327
## Provider-Specific Guides
312328

313329
Below are some details specific to individual OIDC providers.

docs/admin/groups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Groups
22

3-
Groups can be used with [template RBAC](./rbac.md) to give groups of users access to specific templates.
3+
Groups can be used with [template RBAC](./rbac.md) to give groups of users access to specific templates. They can be defined in Coder or [synced from your identity provider](./auth.md#group-sync-enterprise).
44

55
![Groups](../images/groups.png)
66

docs/admin/rbac.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Role Based Access Control (RBAC)
22

3-
Use RBAC to define which users and [groups](./groups.md) can use specific templates in Coder.
3+
Use RBAC to define which users and [groups](./groups.md) can use specific templates in Coder. These can be defined in Coder or [synced from your identity provider](./auth.md)
44

55
![rbac](../images/template-rbac.png)
66

docs/enterprise.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ trial](https://coder.com/trial).
77
| Category | Feature | Open Source | Enterprise |
88
| --------------- | ------------------------------------------------------------------------------------ | :---------: | :--------: |
99
| User Management | [Groups](./admin/groups.md) |||
10+
| User Management | [Group & role sync](./admin/auth.md#group-sync-enterprise) |||
1011
| User Management | [SCIM](./admin/auth.md#scim) |||
1112
| Governance | [Audit Logging](./admin/audit-logs.md) |||
1213
| Governance | [Browser Only Connections](./networking/#browser-only-connections-enterprise) |||

0 commit comments

Comments
 (0)