All Products
Search
Document Center

Resource Access Management:Synchronize Okta users to RAM based on SCIM

Last Updated:Jul 24, 2024

Alibaba Cloud can synchronize Okta users to Resource Access Management (RAM) based on System for Cross-domain Identity Management 2.0 (SCIM 2.0) and security authorization of Open Authorization (OAuth) applications.

Prerequisites

  • A RAM user who has administrative rights or a RAM user who has the OAuth management permissions is used to perform all operations in the RAM console.

  • An Okta administrator (super administrator) is used to perform all operations on the Okta portal.

Background information

  • Create a user: After Okta assigns a user to an application, a RAM user with the same username is automatically created in the RAM console. The domain name suffix of the Okta username is automatically replaced with the domain name of the RAM user.

  • Change user attributes: If you select Push Profile Updates in Okta, the user attributes of the RAM user with the same username are automatically changed in the RAM console when you change the user attributes of the Okta user. Only the changes in the UserName and DisplayName parameters can be synchronized to the RAM console.

  • When you delete or unassign a user in Okta, the state of the user changes to active=false in Okta. However, the state change cannot be synchronized to the RAM console because a RAM user does not support the enabled or disabled state.

  • You cannot synchronize user groups in Okta to the RAM console.

Step 1: Create an OAuth application and grant permissions on the OAuth application in the RAM console

  1. Create an OAuth application.

    1. Log on to the RAM console.

    2. In the left-side navigation pane, choose Integrations > OAuth Preview.

    3. On the Enterprise Applications tab, click Create Application.

    4. In the Create Application panel, configure the parameters.

      1. Configure Application Name and Display Name.

      2. Set Application Type to NativeApp.

      3. Configure Access Token Validity Period.

      4. Configure Refresh Token Validity Period.

    5. Click Save.

  2. Grant permissions on the OAuth application.

    1. On the Enterprise Applications tab, find the application that you want to manage.

    2. On the Application OAuth Scopes tab, click Add OAuth Scopes.

    3. In the Add OAuth Scopes panel, select /acs/scim.

    4. Click OK.

  3. Create an application secret for the OAuth application.

    1. Click the App Secrets tab, and then click Create Secret.

    2. In the Create App Secret dialog box, view and copy the created application secret and click Close.

      Important

      The application secret is displayed only during creation and cannot be queried. Save the secret at the earliest opportunity.

Step 2: Create an application in Okta

  1. Log on to the Okta portal.
  2. In the upper-right corner of the Okta portal, click the account name and select Your Org from the drop-down list.
  3. In the left-side navigation pane, choose Applications > Applications.
  4. On the Applications page, click Create App Integration.
  5. In the Create a new app integration dialog box, select SAML 2.0 and click Next.
  6. In the General Settings step of the page that appears, enter AliyunSSODemo in the App name field and click Next.
  7. In the Configure SAML step, configure the parameters and click Next.
    Configure SAML
  8. On the Feedback page, select a type for the application and click Finish.

Step 3: Configure SCIM synchronization in Okta

  1. Enable SCIM synchronization.

    1. In the application created in Step 2: Create an application in Okta, click the General tab.

    2. In the App Settings section, click Edit.

    3. Select Enable SCIM provisioning and click Save to enable SCIM synchronization.

  2. Configure SCIM parameters.

    1. Click the Provisioning tab.

    2. In the left-side navigation pane, click Integration.

    3. In the SCIM Connection section, click Edit and configure the following parameters.

      • SCIM connector base URL: Enter https://scim.aliyun.com.

      • Unique identifier field for users: Enter userName.

      • Supported provisioning actions: Select Import New Users and Profile Updates and Push New Users.

        Note

        Push Profile Updates is optional and specifies whether to enable automatic user attribute update.

      • Authentication Mode: Select OAuth 2.

    4. Configure OAuth 2 parameters.

    5. Click Save.

  3. Obtain the callback URL.

    1. On the Provisioning tab, click Integration in the left-side navigation pane.

    2. In the lower part of the page, click Authenticate with xxx.

    3. On the page that appears, copy the callback URL (redirect url).

    4. Log on to the RAM console. In the OAuth application that you created in Step 1: Create an OAuth application and grant permissions on the OAuth application in the RAM console, enter the callback URL.

    5. Return to the current page in the Okta portal, click Authenticate with xxx, and then log on to the Alibaba Cloud Management Console to complete the verification.

  4. Configure user synchronization parameters.

    1. On the Provisioning tab, click To App in the left-side navigation pane.

    2. In the Provisioning to App section, click Edit.

    3. In the Create User section, select Enable and click Save.

      Note

      If you enabled Push Profile Updates in the SCIM Connection section, you must set Push Profile Updates in this section to Enable.

    4. In the <App Name> Attribute Mappings section, configure attribute mappings to delete unnecessary attributes and retain only the attributes shown in the following figure.

      83f45d68d4356cebde3339768163c69e.png

    5. On the Sign on tab, click Edit.

    6. Set Application username format to Okta username prefix and click Save.

  5. Assign users to the application.

    1. On the Assignments tab, click Assign.

    2. Click Assign to People to assign users to the application.

Note

If an issue occurs during the synchronization, you can click View Logs to view the logs and address the issue.

Verify the result

After you complete the preceding steps, Okta users are automatically synchronized to the RAM console. You can log on to the RAM console and view the synchronized users in the RAM user list. The Synchronization Type of the synchronized users is SCIM User Synchronization.