Skip to content

Commit 4456d0b

Browse files
authored
docs: sync roles (enterprise) (#8696)
* docs: role sync (enterprise) * edits from code review * fix typo
1 parent 924bccb commit 4456d0b

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

docs/admin/auth.md

+18
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,24 @@ Steps to troubleshoot.
310310
- [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)
311311
- [Okta limit is 100, and returns an error if exceeded.](https://developer.okta.com/docs/reference/api/oidc/#scope-dependent-claims-not-always-returned)
312312

313+
## Role sync (enterprise)
314+
315+
If your OpenID Connect provider supports roles claims, you can configure Coder
316+
to synchronize roles in your auth provider to deployment-wide roles within Coder.
317+
318+
Set the following in your Coder server [configuration](./configure.md).
319+
320+
```console
321+
# Depending on your identity provider configuration, you may need to explicitly request a "roles" scope
322+
CODER_OIDC_SCOPES=openid,profile,email,roles
323+
324+
# The following fields are required for role sync:
325+
CODER_OIDC_USER_ROLE_FIELD=roles
326+
CODER_OIDC_USER_ROLE_MAPPING='{"TemplateAuthor":["template-admin","user-admin"]}'
327+
```
328+
329+
> One role from your identity provider can be mapped to many roles in Coder (e.g. the example above maps to 2 roles in Coder.)
330+
313331
## Provider-Specific Guides
314332

315333
Below are some details specific to individual OIDC providers.

docs/admin/groups.md

+1-1
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

+1-1
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

+1
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)