Updated on 2024-07-26 GMT+08:00

Step 1: Create an IdP Entity

To establish a trust relationship between an enterprise IdP and the cloud platform, upload the metadata file of the cloud platform to the enterprise IdP, and then create an IdP entity and upload the metadata file of the IdP on the IAM console.

Prerequisites

  • The enterprise administrator has created an account on the cloud platform, and has created user groups and assigned permissions to the group in IAM. For details, see Creating a User Group and Assigning Permissions. The user groups created in IAM will be mapped to federated users so that the federated users can obtain the permissions of the user groups to use cloud resources.
  • The enterprise administrator has read the help documentation of the enterprise IdP or has understood how to use the enterprise IdP. Configurations of different enterprise IdPs differ greatly, so they are not described in this document. For details about how to obtain the enterprise IdP's metadata file and how to upload the cloud platform's metadata to the enterprise IdP, see the IdP documentation.

Establishing a Trust Relationship Between the Enterprise IdP and the Cloud Platform

The metadata file of the cloud platform needs to be configured in the enterprise IdP to establish a trust relationship between the two systems.

  1. Download the metadata file of the cloud platform.

    • Web SSO: Visit https://Domain name of the authui service on the cloud platform/authui/saml/metadata.xml, right-click on the page, choose Save As, and set a file name, for example, websso-metadata.xml.
    • SSO via API calling: Visit https://Endpoint address of a region/v3-ext/auth/OS-FEDERATION/SSO/metadata, right-click on the page, choose Save As, and set a file name, for example, api-metadata-region.xml.

      The cloud platform provides different API gateways for users in different regions to call APIs. To allow users to access resources in multiple regions, download metadata files of all these regions.

  2. Upload the metadata file to the enterprise IdP server. For details, see the help documentation of the enterprise IdP.
  3. Obtain the metadata file of the enterprise IdP. For details, see the help documentation of the enterprise IdP.

Creating an IdP Entity on the Cloud Platform

Create an Idp entity and configure the metadata file in IAM.

  1. Log in to the IAM console, choose Identity Providers from the navigation pane, and click Create Identity Provider in the upper right corner.
  2. Specify the name, protocol, SSO type, status, and description of the IdP entity.

    Table 1 Basic parameters of an IdP

    Parameter

    Description

    Name

    IdP name, which must be unique globally. You are advised to use the domain name.

    Protocol

    IdP protocol. The system supports SAML and OpenID Connect IdPs. For details about how to configure OpenID Connect-based identity federation, see Identity Federation Via OpenID Connect.

    SSO Type

    IdP type. An account can have only one type of IdP.

    • Virtual user: After a user logs in to the cloud platform as a federated user, the system automatically creates a virtual identity for the user. An account can have multiple IdPs of the virtual user type.
    • IAM user: After a user logs in to the cloud platform as a federated user, the system automatically maps the external identity ID to an IAM user so that the federated user has the permissions of the mapped IAM user. An account can have only one IdP of the IAM user type. If you select the IAM user SSO, ensure that you have created an IAM user and set the external identity ID. For details, see Creating an IAM User.

    Status

    IdP status. The default value is Enabled.

    The IdP name must be unique under your account. You are advised to use the domain name.

  3. Click OK.

Configuring the Metadata File of the IdP

To configure the metadata file of the enterprise IdP obtained in 3 on the cloud platform, you can upload the metadata file or manually edit metadata on the IAM console. For a metadata file larger than 500 KB, manually configure the metadata. If the metadata has been changed, upload the latest metadata file or edit the existing metadata to ensure that the federated users can log in to the cloud platform successfully.
  • Upload a metadata file.
    1. Click Modify in the row containing the IdP.
    2. Click Select File and select the metadata file of the enterprise IdP.
      Figure 1 Uploading a metadata file
    3. Click Upload. The metadata extracted from the uploaded file is displayed. Click OK.
      • If the uploaded metadata file contains multiple IdPs, select the IdP you want to use from the Entity ID drop-down list.
      • If a message is displayed indicating that no entity ID is specified or the signing certificate has expired, check the metadata file and upload it again, or configure the metadata manually.
    4. Click OK.
  • Manually configure metadata.
    1. Click Manually configure.
    2. In the Configure Metadata dialog box, set the metadata parameters, such as Entity ID, Signing Certificate, and SingleSignOnService.

      Parameter

      Mandatory

      Description

      Entity ID

      Yes

      The unique identifier of an IdP. Enter the value of entityID displayed in the enterprise IdP's metadata file.

      If the metadata file contains multiple IdPs, choose the one you want to use.

      Protocol

      Yes

      The SAML protocol is used for identity federation between an enterprise IdP and SP.

      NameIdFormat

      No

      Enter the value of NameIdFormat displayed in the IdP metadata file.

      It specifies the username identifier format supported by the IdP, which is used for communication between the IdP and federated user.

      Signing Certificate

      Yes

      Enter the value of <X509Certificate> displayed in the IdP metadata file.

      A signing certificate is a public key certificate used for signature verification. For security purposes, enter a public key containing at least 2,048 bits. The signing certificate is used during identity federation to ensure that assertions are credible and complete.

      SingleSignOnService

      Yes

      Enter the value of SingleSignOnService displayed in the IdP metadata file.

      This parameter defines how SAML requests are sent during SSO. It must support HTTP Redirect or HTTP POST.

      SingleLogoutService

      No

      Enter the value of SingleLogoutService displayed in the IdP metadata file.

      This parameter indicates the address to which federated users will be redirected after logging out their sessions. It must support HTTP Redirect or HTTP POST.

      The following example shows the metadata file of an enterprise IdP and the manually configured metadata.

      Figure 2 Metadata file of an enterprise IdP
    3. Click OK.
  • Click OK to save the settings.

Verifying the Federated Login

  1. Click the login link displayed on the IdP details page and check if the login page of the enterprise IdP server is displayed.

    1. On the Identity Providers page, click View in the Operation column of the identity provider. Copy the login link displayed on the identity provider details page and visit the link using a browser.
    2. If the login page is not displayed, check the metadata file and configurations of the enterprise IdP server.

  2. Enter the username and password of a user that was created in the enterprise management system.

    • If the login is successful, add the login link to the enterprise's website.
    • If the login fails, check the username and password.

    Federated users can only access the cloud platform by default. To assign permissions to federated users, configure identity conversion rules. For more information, see Step 2: Configure Identity Conversion Rules.

Related Operations

  • Viewing IdP information: In the IdP list, click View in the row containing the IdP, and view its basic information, metadata, and identity conversion rules.

    To modify the configuration of an IdP, click Modify at the bottom of the details page.

  • Modifying an IdP: In the IdP list, click Modify in the row containing the IdP, and then change its status or modify the description, metadata, or identity conversion rules.
  • Deleting an IdP: In the IdP list, click Delete in the row containing the IdP, and click Yes in the displayed dialog box.

Follow-Up Procedure