Step 1: Create an Identity Provider
To establish a trust relationship between an enterprise IdP and HUAWEI CLOUD, create an identity provider and configure authorization information on the IAM console, and set the user redirect URLs and create OAuth 2.0 credentials in the enterprise IdP.
Prerequisites
- You have registered an account in HUAWEI CLOUD as an enterprise administrator, and have created user groups and granted them permissions in IAM. For details, see Creating a User Group and Assigning Permissions. The user groups created in IAM will be used to assign permissions to enterprise IdP users mapped to HUAWEI CLOUD.
- You have read the documentation of the enterprise IdP or have 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 OAuth 2.0 credentials, see the IdP documentation.
Creating OAuth 2.0 Credentials in the Enterprise IdP
- Set redirect URLs https://auth.huaweicloud.com/authui/oidc/redirect and https://auth.huaweicloud.com/authui/oidc/post in the enterprise IdP so that users can be redirected to the OpenID Connect identity provider in HUAWEI CLOUD.
- Obtain OAuth 2.0 credentials of the enterprise IdP.
Creating an Identity Provider in HUAWEI CLOUD
Create an identity provider and configure authorization information in IAM.
- Log in to the IAM console, choose Identity Providers from the navigation pane, and click Create Identity Provider in the upper right corner. Figure 1 Creating an identity provider
- Enter an identity provider name, select OpenID Connect and Enabled, and click OK. Figure 2 Setting identity provider parameters
The identity provider name must be unique under your account.
Configuring Authorization Information in HUAWEI CLOUD
- Click Modify in the Operation column of the row containing the identity provider you want to modify. Figure 3 Modifying an identity provider
- Select an access type. Figure 4 Access type
- Specify the configuration information. Figure 5 Specifying configuration information
Table 2 Configuration information Parameter
Description
Identity Provider URL
URL of the OpenID Connect identity provider.
Specify this parameter as the value of issuer in the Openid-configuration.
NOTE:Openid-configuration indicates a URL defined in OpenID Connect, containing configurations of an enterprise IdP. The URL format is https://{base URL}/.well-known/openid-configuration, where base URL is defined by the enterprise IdP. For example, the Openid-configuration of Google is https://accounts.google.com/.well-known/openid-configuration.
Client ID
ID of a client registered with the OpenID Connect identity provider. The client ID is an OAuth 2.0 credential created in the enterprise IdP.
Authorization Endpoint
Authorization endpoint of the OpenID Connect identity provider. Specify this parameter as the value of authorization_endpoint in Openid-configuration.
This parameter is required only if you set Access Type to Programmatic access and management console access.
Scopes
Scopes of authorization requests. openid is selected by default.
This parameter is required only if you set Access Type to Programmatic access and management console access.
Enumerated values:
- openid
- profile
Response Type
Response type of authorization requests. The default value is id_token.
This parameter is required only if you set Access Type to Programmatic access and management console access.
Response Mode
Response mode of authorization requests. The options include form_post and fragment. form_post is recommended.
- form_post: If this mode is selected, set the redirect URL to http://auth.huaweicloud.com/authul/oidc/post in the enterprise IdP.
- fragment: If this mode is selected, set the redirect URL to https://auth.huaweicloud.com/authui/oidc/redirect in the enterprise IdP.
This parameter is required only if you set Access Type to Programmatic access and management console access.
Signing Key
Public key used to sign the ID token of the OpenID Connect identity provider. For account security purposes, change the signing key periodically.
- Click OK.
Logging In as a Federated User
- Click the login link displayed on the identity provider details page and check if the login page of the enterprise IdP server is displayed.
- On the Identity Providers page, click Modify in the Operation column of the identity provider.
- Copy the login link displayed on the Modify Identity Provider page and visit the link using a browser. Figure 6 Copying the login link
- If the enterprise IdP login page is not displayed, check the configurations of the identity provider and the enterprise IdP server.
- 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 management system.
- If the login fails, check the username and password.
Federated users only have read permissions for HUAWEI CLOUD by default. To assign permissions to federated users, configure identity conversion rules for the identity provider. For more information, see Step 2: Configure Identity Conversion Rules.
Related Operations
- Viewing identity provider information: In the identity provider list, click View in the row containing the identity provider, and view its basic information, metadata, and identity conversion rules.
To modify the configurations of an identity provider, click Modify at the bottom of the details page.
- Modifying an identity provider: In the identity provider list, click Modify in the row containing the identity provider, and then change its status and modify the description, metadata, and identity conversion rules.
- Deleting an identity provider: In the identity provider list, click Delete in the row containing the identity provider, and click Yes.
Follow-Up Procedure
- Configure identity conversion rules to map enterprise IdP users to IAM user groups and grant the users permissions. For details, see Step 2: Configure Identity Conversion Rules.
- Configure the enterprise management system to allow users to access HUAWEI CLOUD through SSO. For details, see (Optional) Step 3: Configure Login Link in the Enterprise Management System.
Last Article: Configuration of OpenID Connect–based Federated Identity Authentication
Next Article: Step 2: Configure Identity Conversion Rules
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.