Logging In to Single Huawei Cloud Account via OneAccess Without Password (SAML - Virtual 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.
- Log in to the OneAccess administrator portal and download the metadata file of OneAccess.
- Log in to the administrator portal.
- On the top navigation bar, choose Settings > Service Settings.
- On the displayed page, click IDP.
- On the IdP configuration page, click Download IDP Metadata in the upper right. The metadata file is automatically saved.
- Create an IdP of the virtual user SSO type. For details, see Creating an IdP Entity on Huawei Cloud.
- The IdP name must be unique. You are advised to use the domain name.
- For details about virtual user SSO, see Application Scenarios of Virtual User SSO and IAM User SSO.
- A Huawei Cloud account can have only one IdP type: either IAM user SSO or virtual user SSO.
- Obtain the Huawei Cloud login link.
- Configure the metadata file of the OneAccess IdP on Huawei Cloud. For details, see Configuring the Metadata File of the Identity Provider.
- Configure identity conversion rules on Huawei Cloud so that OneAccess users can access cloud services and resources. For details, see Configure Identity Conversion Rules.
Assuming all OneAccess users belong to the same IAM user group, once they log in to Huawei Cloud, their IAM username will appear as their OneAccess username. The conversion rule is as follows:
[ { "remote": [ { "type": "name" } ], "local": [ { "user": { "name": "{0}" } }, { "group": { "name": "admin" } } ] } ]
remote indicates the information mapped from OneAccess to IAM. Obtain the name field. For details about the mapping fields, see 2.
local indicates the local IAM information, user indicates the IAM user, name indicates the displayed IAM username, and {0} indicates the first field in remote. group indicates the IAM user group, indicating that all users are mapped to the admin user group and have all permissions.
Similarly, you can add multiple fields to remote and set one of the fields to the user group name so that different users correspond to different user groups.
[ { "remote": [ { "type": "name" }, { "type": "Roles" } ], "local": [ { "user": { "name": "{0}" } }, { "groups": "{1}" } ] } ]
remote indicates that the Roles field is mapped additionally. (You can use the custom field in the user attribute definition.) It can be a single value or multiple values.
local indicates that groups is used and can be mapped to multiple IAM user groups. The second Roles field in remote is used.
Establishing a Trust Between OneAccess and Huawei Cloud
Configure the metadata file of Huawei Cloud in OneAccess to establish a trust on Huawei Cloud.
- Add the Huawei Cloud application in OneAccess.
- Log in to the OneAccess administrator portal, and choose Resources > Applications.
- Click Add Pre-integrated Application under Pre-integrated Applications.
- On the Add Pre-integrated Application page, click Huawei Cloud.
- On the Add Application page, confirm the general information, and click Next.
- 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.
- Pre-integrated applications are available for professional edition users only. Basic edition users need to create custom applications by referring to Adding an Application and then perform operations in 1.e.
- To obtain the Huawei Cloud metadata file, visit https://auth.huaweicloud.com/authui/saml/metadata.xml, and save the metadata as SP-metadata.xml.
- OneAccess allows you to configure metadata by selecting a file or configuring parameters. For details, see Configuring a Metadata File.
- When the Select File button changes to √, the system has extracted the metadata. Click Next.
- 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.
- Configure mappings between OneAccess and Huawei Cloud.
- Click the added Huawei Cloud application. On the application information page, click the application icon to go to the application details page.
- Choose Authentication Integration > Mappings, and click Add Mapping to configure mappings. For details about the parameters, see Configuring Mappings and Authorizing Users.
- 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#
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot