Help Center/ OneAccess/ Best Practices/ Application Integration/ Logging In to the Huawei Cloud Through User Portal/ Logging In to Single Huawei Cloud Account via OneAccess Without Password (SAML - IAM User SSO)
Updated on 2024-12-30 GMT+08:00

Logging In to Single Huawei Cloud Account via OneAccess Without Password (SAML - IAM User SSO)

This section uses SAML as an example to describe how to use OneAccess to log in to a Huawei Cloud account without entering a password. For details about Huawei Cloud identity providers (IdPs), see Identity Provider Overview.

Creating an IdP on Huawei Cloud

Create an IdP and configure the metadata file on the Huawei Cloud console.

  1. Log in to the OneAccess administrator portal and download the metadata file of OneAccess.

    1. Log in to the administrator portal.
    2. On the top navigation bar, choose Settings > Service Settings.
    3. On the displayed page, click IDP.
    4. On the IdP configuration page, click Download IDP Metadata in the upper right. The metadata file is automatically saved.

  2. Create an IdP of the IAM user SSO type. For details, see Creating an IdP Entity on Huawei Cloud.

  3. Obtain the Huawei Cloud login link.

  4. Configure the metadata file of the OneAccess IdP on Huawei Cloud. For details, see Configuring the Metadata File of the Identity Provider.
  5. Configure an external identity ID for the IAM user on Huawei Cloud by referring to Configuring an External Identity ID to establish the mapping between the OneAccess user and the IAM user.

Establishing a Trust Between OneAccess and Huawei Cloud

Configure the metadata file of Huawei Cloud in OneAccess to establish a trust on Huawei Cloud.

  1. Add the Huawei Cloud application in OneAccess.

    1. Log in to the OneAccess administrator portal, and choose Resources > Applications.
    2. Click Add Pre-integrated Application under Pre-integrated Applications.
    3. On the Add Pre-integrated Application page, click Huawei Cloud.
    4. On the Add Application page, confirm the general information, and click Next.
    5. On the Authentication Parameters page, click Import SP Metadata, click Select File, select the Huawei Cloud metadata file, and click Open. The system automatically extracts the metadata.
    6. When the Select File button changes to , the system has extracted the metadata. Click Next.
    7. On the authentication integration page, click Modify on the Parameters tab page, and replace /saml/LogoutServiceHTTPRedirect in the value of Single Logout URL with /logout.

  2. Configure mappings between OneAccess and Huawei Cloud.

    1. Click the added Huawei Cloud application. On the application information page, click the application icon to go to the application details page.
    2. Choose Authentication Integration > Mappings.
    3. Click Add Mapping and add a mapping whose application attribute is IAM_SAML_Attributes_xUserId to establish the attribute mapping between OneAccess and Huawei Cloud. The mapping object can be an existing attribute of the OneAccess user or a new custom attribute. The mapping object must be the same as the external identity ID of the IAM user added in 5.

  3. Configure the Huawei Cloud login entry in OneAccess.

    On the Huawei Cloud application details page, choose Login Settings > Web Applications, click Modify, replace the URL with the login URL obtained in 3, and click OK to save it.

    Figure 1 Editing the URL

    To redirect to a specific service page on the Huawei Cloud console, combine the login link of the identity provider created on Huawei Cloud and enter the combined URL. The following takes CodeArts as an example:

    Login link of the identity provider created on Huawei Cloud: https://auth.huawei.com/authui/federation/websso?domain_id=e35f94************14839c&idp=SAML-OneAccess&protocol=saml

    CodeArts service address: https://console-intl.huaweicloud.com/devcloud/?region=cn-east-3&locale=en-us#

    If the service address contains the agencyId=***& field, delete the field, use &service= to combine the two addresses, and enter the combined address in the URL.

    https://auth.huawei.com/authui/federation/websso?domain_id=e35f94************14839c&idp=SAML-OneAccess&protocol=saml&service=https://console-intl.huaweicloud.com/devcloud/?region=cn-east-3&locale=en-us#

  4. Grant Huawei Cloud access permissions to users in OneAccess.

    On the Huawei Cloud application details page, choose Authorization > Application Accounts, click the button for adding accounts, select required accounts, and click Save. The selected accounts can access Huawei Cloud via OneAccess without a password.

Logging In as a User

Users with Huawei Cloud access permissions can easily access the Huawei Cloud console with a single click after logging in to the OneAccess user portal.