Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page
Help Center/ Identity and Access Management/ User Guide/ Custom Identity Broker/ Enabling Custom Identity Broker Access with an Agency

Enabling Custom Identity Broker Access with an Agency

Updated on 2024-12-25 GMT+08:00

If the IdP of your enterprise is not compatible with SAML or OpenID Connect, you can create a custom identity broker to enable access to Huawei Cloud. You can write and run code to generate a login URL. Users in your enterprise can then use the URL to log in to Huawei Cloud. The users will be authenticated by your enterprise IdP.

NOTE:

If your enterprise IdP is compatible with SAML or OpenID Connect, configure identity federation to enable users in your enterprise to access Huawei Cloud through SSO.

Prerequisites

  • Your enterprise has an enterprise management system.
  • You have registered an account (for example, DomainA) in Huawei Cloud as an enterprise administrator and has created a user group (for example, GroupC) and assigned it the Agent Operator role. (For details, see Creating a User Group and Assigning Permissions.)

Procedure

  1. Use the DomainA account to create an IAM user (for example, UserB) and add the user to GroupC by following the instructions in Adding Users to a User Group.

    NOTE:

    Ensure that the IAM user can programmatically access Huawei Cloud services. For details about how to change the access type, see Viewing or Modifying IAM User Information.

  2. Configure the access key (recommended) or username and password of UserB in the configuration file of your enterprise IdP so that the user can obtain a token for calling APIs. For account security, encrypt the password and access keys before you store them.
  3. In the navigation pane of the IAM console, choose Agencies. Then, click Create Agency in the upper right corner.
  4. Set agency parameters.

    For example, set the agency name to testagency, agency type to Account, and delegated account to DomainA. Set the validity period and click Next.

    Figure 1 Creating an agency

  5. Set the authorization scope, and select the permissions you want to grant to the agency.
  6. In the enterprise IdP, create a user group named testagency (same as the name of the agency created in 4), add enterprise users to the group, and grant the users permissions to log in to Huawei Cloud through a custom identity broker. For details, see the documentation of the enterprise IdP.
  7. After an enterprise user logs in to the enterprise management system, the user can access the custom identity broker of the enterprise IdP by selecting an agency from the agency list. The user can obtain the agency from the security administrator or root user. For details, see the documentation of the enterprise management system.

    NOTE:

    The agencies of the identity broker must exist in Huawei Cloud and have the same names as some user groups created in the enterprise IdP.

  8. The custom identity broker uses the token of userB to call the API POST /v3.0/OS-CREDENTIAL/securitytokens used to obtain a temporary security token. For details, see Obtaining a Temporary Access Key and Security Token Through an Agency.

    NOTE:

    When obtaining a security token with an agency, set the session_user.name parameter in the request body.

  9. The custom identity broker uses the temporary access key, security token, and global domain name of IAM (iam.myhuaweicloud.com) to call the API POST /v3.0/OS-AUTH/securitytoken/logintokens for obtaining a login token. The value of X-Subject-LoginToken in the response header is a login token. For details, see Obtaining a Login Token.

    NOTE:
    • To obtain a login token by calling the API POST /v3.0/OS-AUTH/securitytoken/logintokens, use the global domain name (iam.myhuaweicloud.com) of IAM.
    • A login token is issued to a user to log in through a custom identity broker and contains identity and session information about the user. A login token is valid for 10 minutes by default. Login tokens are required for authentication when users log in to a service console using the FederationProxyUrl.
    • You can set the validity period of a login token by calling the API POST /v3.0/OS-AUTH/securitytoken/logintokens. The validity period ranges from 10 minutes to 12 hours. If the value you have specified is greater than the remaining validity period of the temporary security token, the remaining validity period of the temporary security token is used.

  10. The custom identity broker generates a FederationProxyUrl and returns it to the browser through Location. The FederationProxyUrl will be in the following format:

    https://auth.huaweicloud.com/authui/federation/login?idp_login_url={enterprise_system_loginURL}&service={console_service_region_url}&logintoken={logintoken}

    Example:

    https://auth.huaweicloud.com/authui/federation/login?idp_login_url=https%3A%2F%2Fexample.com&service=https%3a%2f%2fconsole.huaweicloud.com%2fapm%2f%3fregion%3dcn-north-4%23%2fapm%2fatps%2ftopology&logintoken=******

    Table 1 Parameter description

    Parameter

    Description

    idp_login_url

    Login URL of the enterprise management system.

    service

    Access address of a Huawei Cloud service.

    logintoken

    Login token of the custom identity broker.

    The preceding three parameters must be encoded using URLEncode to ensure that they can be identified by the browser.

    For details about how to create a FederationProxyUrl, view the example provided in Creating a FederationProxyUrl Using an Agency.

    NOTE:

    The FederationProxyUrl contains the login token that has been obtained from IAM, and must be encoded using UrlEncode.

  11. If the login token is authenticated successfully, federated users will be automatically redirected to the Huawei Cloud service address specified in the service parameter.

    If the login token fails to be authenticated, federated users will be redirected to the address specified in idp_login_url.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback