> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# User-based Alibaba Cloud

User-based Alibaba Cloud allows a user to access Alibaba Cloud resources as a RAM user. See <https://www.alibabacloud.com/help/en/ram/user-guide/overview-of-user-based-sso> for more information.

note

This procedure was tested using Identity as a Service 5.36 and Alibaba Cloud. Other versions of Alibaba Cloud may require integration and configuration steps that differ from those documented in this procedure. For newer versions of Alibaba Cloud, use this procedure as a starting point for integrating Alibaba Cloud. In the event of other issues, contact <support@entrust.com> for assistance.

## Prerequisites

Before you begin, create a RAM user and enable the Console access in the Alibaba cloud console. See the [Alibaba Cloud documentation](https://www.alibabacloud.com/help/en/ram/user-guide/configure-enterprise-idp-saml-settings-for-user-based-sso).

#To integrate user-based Alibaba Cloud with Identity as a Service you must do the following:

Before you begin, open two browser windows: one for Alibaba Cloud and one for IDaaS.

## Step 1: Download the user-based metadata file from Alibaba Cloud

1. Log in to Alibaba Cloud as a RAM user (use this [link](https://account.alibabacloud.com/login/login.htm?oauth_callback=https://ram.console.aliyun.com/?spm=a2c63.p38356.0.0.7de65064dCOA11&lang=en)). The **Overview** page appears.
2. On the left side, click **SSO**. The **SSO** page appears.
3. Click the **User-Based SSO** tab.
4. Click **Download File** to download the **Metadata File**.

Leave this page open to return to later in _Step 5: Configure Alibaba for SSO with IDaaS_.

## Step 2: Add user-based Alibaba Cloud to Identity as a Service

1. In Identity as a Service, navigate to **Security** > **Applications**. The **Applications Lists** page appears.
2. Click **Add**. The **Select an Application Template** page appears.
3. Do one of the following:
   - Select **SAML Cloud Integrations** from the search drop-down list and scroll to find the application you want to add to IDaaS.
   - In the **Search bar**, enter a search option to filter for the application you want to add to IDaaS.
4. Click **Alibaba Cloud**. The **Add Alibaba Cloud** page appears.
5. Enter an **Application Name**.
6. Enter an **Application Description**.
7. Optional. Add a custom application logo.
   1. Click **Add** next to **Application Logo**. The **Upload Logo** dialog box appears.
   2. Click **Upload** to select an image file to upload.
   3. Browse to select your file and click **Open**. The **Upload Logo** dialog box reappears showing your selected image.
   4. If required, resize your image.
   5. Click **OK**.
8. Select the **Authentication Flow** that appears to users during login.
9. Click **Next**. The **General** page appears.
10. Click **Upload Metadata XML** and navigate to upload the metadata file you downloaded in _Step 1: Download the user-based metadata file from Alibaba Cloud._
11. Enter the **Max Authentication Age (seconds)** to set the maximum amount of time that can elapse before a user is required to reauthenticate during a new login attempt. This applies for both SP-initiated and IDP-initiated login. Set this field to -1 to disable this feature.
12. From the **SAML NameID Attribute** drop-down list, select **Email**.
13. Select the **SAML Signing Certificate** from the drop-down list.
14. Optional: Select **Respond Immediately for Unsuccessful Responses** to return to the application immediately after a login failure, rather than allow user to try again with a different userID.
15. Deselect **Enable Go Back Button** if you do not want users to be able to go back to the Alibaba Cloud login page to log in.
16. Select **Show Default Assertion Consumer URL Service in the My Profile**. When selected, the Default Assertion Consumer URL appears in a user's My Profile page in addition to relay states and Alternative Assertion Consumer URLs.
17. Add a **Relay State** as follows:
    1. Click **Add** next to **Relay State**. The **Add Relay State** dialog box appears.
    2. In the **Name** field, enter **RelayState**.
    3. In the **Value** field, enter *.aliyun.com.
    4. Click **Add**.
18. Leave the remaining settings at the default values.
19. Click **Submit**.

## Step 3: Add a resource rule

See [Create resource rules](/docs/authentication-and-security/create-and-manage-resource-rules.md).

## Step 4: Download the metadata from Identity as a Service

1. In Identity as a Service, navigate to **Security** > **Applications**. The **Applications List** page appears.
2. Do one of the following:
   - Click the **Download** icon next to the application you are integrating with Identity as a Service.
   - Click the **More Options** menu next to the application you are integrating with Identity as a Service and select **SAML IDP Metadata**.
3. The **SAML Application Metadata** dialog box appears.
4. **Select the certificate to include in the SAML IDP Metadata file** from the drop-down list.
5. If applicable, **Select the domain to include in the SAML IDP Metadata** file from the drop-down list.
6. Enter the **Lifetime, in days, for the SAML IDP Metadata file**. The value must be between 2 and 730.
7. Do one of the following, as required:
   - Copy the **Public Endpoint** to paste into your SAML application being used Identity Provider authentication.
   - Click **Download**.

note

If you are using multiple domains, you must download each domain's metadata file separately because the values in the metadata file vary for each domain.

## Step 5: Configure user-based Alibaba Cloud for SSO with IDaaS

1. Return to the page you left open in _Step 1: Download the metadata file from Alibaba Cloud_.
2. Next to **Setup SSO**, click **Edit**. The **SSO Settings** dialog box appears.
3. Select **Enabled** for **SSO Status** to require users to log in with Identity as a Service (the IDP).
4. Click **Upload File** to browse to select the **Metadata File** you downloaded in _Step 4: Download the metadata file from Identity as a Service._
5. Enter an **Auxiliary Domain Name**, for example, mycompany.com. This setting uses the auxiliary domain name as the suffix NameID element in SAML assertions.
6. Click **OK**.

## Step 6: Test the integration

### Testing Service Provider Login

1. Open a Web browser and enter the URL for your Alibaba Cloud user-based account. You are directed to Identity as a Service. Use this [link](https://signin.alibabacloud.com/5486713528570044.onaliyun.com/login.htm#/main) to log in.
2. Click **Logon with Enterprise Account**. You are redirected to IDaaS.
3. Enter your Alibaba Cloud account **User ID** and click **Next**.
4. Respond to the second-factor authentication challenge. If you respond successfully, you are logged in to the Alibaba **Home** page.

### Testing Identity as a Service redirect log in

1. Log in to your Identity as a Service account.
2. Go to your **My Profile** page if you are not already there.
3. Under **Applications**, click **Alibaba Cloud**.
4. Respond to the second-factor authentication challenge. If you respond successfully, you are logged in to user-based Alibaba Cloud.
