10 KiB
stage | group | info |
---|---|---|
Manage | Authentication and Authorization | To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments |
Configure SCIM for GitLab.com groups (PREMIUM SAAS)
You can use the open standard System for Cross-domain Identity Management (SCIM) to automatically:
- Create users.
- Remove users (deactivate SCIM identity).
GitLab SAML SSO SCIM doesn't support updating users.
When SCIM is enabled for a GitLab group, membership of that group is synchronized between GitLab and an identity provider.
The internal GitLab SCIM API implements part of the RFC7644 protocol.
Configure GitLab
Prerequisites:
- Group single sign-on must be configured.
To configure GitLab SAML SSO SCIM:
- On the top bar, select Main menu > Groups and find your group.
- On the left sidebar, select Settings > SAML SSO.
- Select Generate a SCIM token.
- For configuration of your identity provider, save the:
- Token from the Your SCIM token field.
- URL from the SCIM API endpoint URL field.
Configure an identity provider
You can configure one of the following as an identity provider:
NOTE: Other providers can work with GitLab but they have not been tested and are not supported.
Configure Azure Active Directory
Prerequisites:
The SAML application created during single sign-on set up for Azure Active Directory must be set up for SCIM. For an example, see example configuration.
To configure Azure Active Directory for SCIM:
- In your app, go to the Provisioning tab and select Get started.
- Set the Provisioning Mode to Automatic.
- Complete the Admin Credentials using the value of:
- SCIM API endpoint URL in GitLab for the Tenant URL field.
- Your SCIM token in GitLab for the Secret Token field.
- Select Test Connection. If the test is successful, save your configuration before continuing, or see the troubleshooting information.
- Select Save.
After saving, Settings and Mappings sections appear.
- Under Settings, if required, set a notification email and select the Send an email notification when a failure occurs checkbox.
- Under Mappings, we recommend you:
- Keep Provision Azure Active Directory Users enabled and select the Provision Azure Active Directory Users link to configure attribute mappings.
- Below the mapping list select the Show advanced options checkbox.
- Select the Edit attribute list for customappsso link.
- Ensure the
id
is the primary and required field, andexternalId
is also required. - Select Save.
- Return to the Provisioning tab, saving unsaved changes if necessary.
- Select Edit attribute mappings.
- Under Mappings:
- Select Provision Azure Active Directory Groups.
- On the Attribute Mapping page, turn off the Enabled toggle. Leaving it turned on doesn't break the SCIM user provisioning, but it causes errors in Azure Active Directory that may be confusing and misleading.
- Select Save.
- Return to the Provisioning tab, saving unsaved changes if necessary.
- Select Edit attribute mappings.
- Turn on the Provisioning Status toggle. Synchronization details and any errors appears on the bottom of the Provisioning screen, together with a link to the audit events.
WARNING:
Once synchronized, changing the field mapped to id
and externalId
may cause a number of errors. These include
provisioning errors, duplicate users, and may prevent existing users from accessing the GitLab group.
Configure attribute mappings
While configuring Azure Active Directory for SCIM, you configure attribute mappings. For an example, see example configuration.
The following table provides attribute mappings known to work with GitLab.
Source attribute | Target attribute | Matching precedence |
---|---|---|
objectId |
externalId |
1 |
userPrincipalName |
emails[type eq "work"].value |
|
mailNickname |
userName |
Each attribute mapping has:
- An Azure Active Directory attribute (source attribute).
- A
customappsso
attribute (target attribute). - A matching precedence.
For each attribute:
- Select the attribute to edit it.
- Select the required settings.
- Select Ok.
If your SAML configuration differs from the recommended SAML settings, select the mapping
attributes and modify them accordingly. In particular, the objectId
source attribute must map to the externalId
target attribute.
If a mapping is not listed in the table, use the Azure Active Directory defaults. For a list of required attributes, refer to the internal SCIM API documentation.
Configure Okta
The SAML application created during single sign-on set up for Okta must be set up for SCIM.
Prerequisites:
- You must use the Okta Lifecycle Management product. This product tier is required to use SCIM on Okta.
- GitLab is configured.
- SAML application for Okta set up as described in the Okta setup notes.
- Your Okta SAML setup matches the configuration steps exactly, especially the NameID configuration.
To configure Okta for SCIM:
- Sign in to Okta.
- Ensure you are in the Admin Area by selecting the Admin button located in the top right. The button is not visible from the Admin Area.
- In the Application tab, select Browse App Catalog.
- Search for GitLab, find and select the GitLab application.
- On the GitLab application overview page, select Add.
- Under Application Visibility select both checkboxes. Currently the GitLab application does not support SAML authentication so the icon should not be shown to users.
- Select Done to finish adding the application.
- In the Provisioning tab, select Configure API integration.
- Select Enable API integration.
- For Base URL, paste the URL you copied from SCIM API endpoint URL on the GitLab SCIM configuration page.
- For API Token, paste the SCIM token you copied from Your SCIM token on the GitLab SCIM configuration page.
- To verify the configuration, select Test API Credentials.
- Select Save.
- After saving the API integration details, new settings tabs appear on the left. Select To App.
- Select Edit.
- Select the Enable checkbox for both Create Users and Deactivate Users.
- Select Save.
- Assign users in the Assignments tab. Assigned users are created and managed in your GitLab group.
Configure OneLogin
Prerequisites:
OneLogin provides a GitLab (SaaS) app in their catalog, which includes a SCIM integration. Contact OneLogin if you encounter issues.
User access and linking setup
During the synchronization process, all of your users get GitLab accounts, welcoming them to their respective groups, with an invitation email. When implementing SCIM provisioning, you may want to warn your security-conscious employees about this email.
The following diagram is a general outline on what happens when you add users to your SCIM app:
graph TD
A[Add User to SCIM app] -->|IdP sends user info to GitLab| B(GitLab: Does the email exist?)
B -->|No| C[GitLab creates user with SCIM identity]
B -->|Yes| D[GitLab sends message back 'Email exists']
During provisioning:
- Both primary and secondary emails are considered when checking whether a GitLab user account exists.
- Duplicate usernames are also handled, by adding suffix
1
upon user creation. For example, due to already existingtest_user
username,test_user1
is used.
If Group SAML has been configured and you have an existing GitLab.com account, you can link your SCIM and SAML identities:
- Update the primary email address in your GitLab.com user account to match the user profile email address in your identity provider.
- Link your SAML identity.
We recommend users do this prior to turning on sync, because while synchronization is active, there may be provisioning errors for existing users.
New users and existing users on subsequent visits can access the group through the identity provider's dashboard or by visiting links directly.
In GitLab 14.0 and later, GitLab users created by SAML SSO or SCIM provisioning display with an Enterprise badge in the Members view.
For role information, see the Group SAML page
Blocking access
To rescind access to the top-level group, all subgroups, and projects, remove or deactivate the user on the identity provider. After the identity provider performs a sync, based on its configured schedule, the user's membership is revoked and they lose access.
NOTE: Deprovisioning does not delete the GitLab user account.
graph TD
A[Remove User from SCIM app] -->|IdP sends request to GitLab| B(GitLab: Is the user part of the group?)
B -->|No| C[Nothing to do]
B -->|Yes| D[GitLab removes user from GitLab group]