How to set up SCIM in Okta
SCIM is a standard to automate the exchange of user identity info between the identity provider and service provider. Starting in Enterprise Edition, you can enable SCIM to automate user provisioning and de-provisioning for SonarQube through Okta.
Once you enable SCIM in Okta, any user assigned to the SonarQube application in Okta is automatically provisioned in SonarQube. If a user gets unassigned from the SonarQube application or deactivated in Okta, the corresponding user account is automatically deactivated in SonarQube. However, if a user gets suspended in Okta, the corresponding user account remains unchanged in SonarQube.
Prerequisites
You’ve integrated Okta with SonarQube, as described on the How to setup Okta page.
Enabling SCIM in SonarQube
To enable SCIM provisioning in SonarQube, do one of the following:
- In your configuration file, set the
sonar.scim.enabled
server property totrue
. - In the SonarQube UI, go to Administration > Configuration > General Settings > Authentication > SAML and activate the SCIM users (de)provisioning option.
Enabling SCIM in Okta
Step 1: From your Okta board, choose your SonarQube application > General > App Settings > Edit.
Step 2: Check Enable SCIM provisioning and click on Save. This will create a Provisioning tab.
Step 3: Choose the newly created Provisioning tab and click on Edit.
![Screenshot of the SCIM connection screen.](https://assets-eu-01.kc-usercontent.com:443/5e986e54-339c-01a9-7c7c-26cbc5a344d5/5caa5d54-8233-4900-9943-4ee3c63d6469/scim-connection.png?w=1025&h=893&auto=format&fit=crop)
Step 4: Configure the SCIM Connection fields as follows:
- SCIM connector base URL:
<Your SonarQube URL>/api/scim/v2
- Unique identifier field for users:
userName
- Supported provisioning actions: enable importing new users and profile updates, pushing new users, and pushing profile updates as shown in the above picture
- Authentication Mode: select Basic Auth
Step 5: In SonarQube, generate a user token for an admin account and copy the token into Okta’s Basic Auth > Username field.
Step 6: To check that the SCIM connection is valid, click on Test Connector Configuration. A green checkmark indicates that all the fields are properly filled.
Step 7: Click on Save.
Step 8: In the next screen, click Edit and check the Create Users, Update User Attributes and Deactivate Users provisioning options.
![Screenshot of the SCIM Provisioning to App page in Okta.](https://assets-eu-01.kc-usercontent.com:443/5e986e54-339c-01a9-7c7c-26cbc5a344d5/1843f413-2280-4729-89b3-1bc5d0703ed0/scim-provisioning-options.png?w=1042&h=818&auto=format&fit=crop)
Step 9: Click on Save.
Provisioning already assigned users
Users that are assigned before SCIM is enabled are not automatically provisioned. In the UI, an exclamation mark is displayed next to their names in the Assignments tab:
![Screenshot showing the Provision User button in Okta.](https://assets-eu-01.kc-usercontent.com:443/5e986e54-339c-01a9-7c7c-26cbc5a344d5/f708efdd-1620-4f08-b620-cd9969a1cd13/provision-user-button.png?w=1520&h=1188&auto=format&fit=crop)
To force the provision of these users, click on Provision User. The exclamation mark should disappear, meaning that the users have been provisioned.
Was this page helpful?