Skip to content

Commit f33e6ff

Browse files
authored
docs: add group syncing from oidc (#589)
1 parent 4c3c932 commit f33e6ff

File tree

1 file changed

+14
-0
lines changed
  • content/docs/administration/sso

1 file changed

+14
-0
lines changed

content/docs/administration/sso/oidc.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ Identity provider information:
2828
- **Issuer**: the issuer of the response (e.g. `https://accounts.google.com`)
2929
- **Client ID**: the client ID of your application
3030
- **Client secret**: the client secret of your application
31+
- **Scopes**: the scopes to request from the identity provider (e.g., `openid`, `profile`, `email`). Some providers also support a groups claim, which can be included by adding the `groups` scope. This is useful if you want to enable [**group syncing**](#group-syncing) as part of the authentication process.
3132

3233
User information field mapping:
3334

3435
- **Email**: the claims field to be used as the Bytebase user email address (e.g. `email`)
3536
- **Display name**: the claims field to be used as the Bytebase user display name (e.g. `name`, optional)
3637
- **Phone**: the claims field to be used as the Bytebase user phone number (e.g. `phone`, optional)
38+
- **Groups**: the claims field to be used as the Bytebase user groups (e.g. `groups`, optional). If this field is set, Bytebase will automatically perform [**group syncing**](#group-syncing) by default.
3739

3840
### Google
3941

@@ -132,6 +134,18 @@ In some GitLab self-hosted setups, the **Issuer** is `http://gitlab.acme.com` (H
132134
- **Email**: `email`
133135
- **Display name**: `name`
134136

137+
## Group Syncing
138+
139+
Bytebase supports syncing identity provider (IdP) groups with Bytebase user groups for providers that include a `groups` claim in their tokens.
140+
141+
Group syncing is based on a one-to-one match using the **group title**. When a user logs in, Bytebase compares the group names from the IdP with existing Bytebase user group titles. If a match is found, the user is automatically added as a **Member** to the corresponding Bytebase user group.
142+
143+
To ensure security and consistency, Bytebase also **automatically removes the user from any Bytebase groups that are not present in their IdP group claims**.
144+
145+
Group syncing occurs during login, so if group membership changes in your IdP, users must log out and log back in for the changes to take effect.
146+
147+
Some OIDC providers like **Okta** support the `groups` claim, but you’ll need to first **customize the tokens returned from Okta to include the `groups` claim**. For more information, refer to [Customize tokens returned from Okta with a groups claim](https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/).
148+
135149
## Troubleshoot
136150

137151
### CORS

0 commit comments

Comments
 (0)