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

Configuring an Agency for an ECS

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

You can create an agency to delegate access to services offered by Huawei Cloud. This example shows how to create an agency and delegate permissions to Huawei Cloud Elastic Cloud Server (ECS), a scalable, on-demand provisioning cloud server.

Application Scenarios

Applications running on an ECS must provide security credentials to access Huawei Cloud services.

Applications can use long-term (such as username and password) or temporary credentials for access. Temporary credentials are more secure because they have a limited lifetime and are automatically rotated. To use temporary credentials to access Huawei Cloud resources, configure an agency with permissions delegated to the ECS where the applications are running, and the applications will get the temporary credential of the agency.

Figure 1 Obtaining a temporary credential

For example, configure an agency for the ECS to enable the applications running on an ECS to use a temporary credential to access a Huawei Cloud database. The ECS sends a request to get a temporary credential (AK/SK) from ECS metadata. The ECS metadata gets a temporary AK/SK of the agency from IAM and then returns the AK/SK to the ECS. The database allows access only after checking that the temporary credential sent from the ECS is valid.

Solution

Create an agency on the IAM console and specify the permissions and scope to delegate permissions to ECS. Configure the agency for the ECS where applications are running. Then the ECS will get a temporary credential of the agency to access resources based on the permissions assigned.

  1. Create an agency with permissions delegated to ECS and select the permissions and scope for the agency.
  2. Configure the created agency for the ECS. Only one agency can be configured for an ECS.
  3. Obtain the temporary credential (AK/SK) of the agency to allow applications running on the ECS to access other Huawei Cloud resources based on the assigned permissions in the authorized scope.
Figure 2 ECS agency

Process Flow

Figure 3 Flowchart

Procedure

To allow applications running on an ECS to access resources in other Huawei Cloud services, do as follows:

  1. Create an agency for ECS as the administrator.

    1. Log in to the IAM console.
    2. On the IAM console, choose Agencies from the navigation pane on the left, and click Create Agency on the displayed page.
    3. Enter an agency name.
    4. Select Cloud service for Agency Type and Elastic Cloud Server (ECS) and Bare Metal Server (BMS) for Cloud Service.
      Figure 4 Creating an agency
    5. Select a validity period.
    6. (Optional) Enter a description for the agency to facilitate identification.
    7. Click Done.
    8. In the displayed dialog box, click Authorize.
    9. Select the permissions to be assigned to the agency, click Next, and specify the authorization scope.
    10. Click OK.

  2. Configure the agency for the ECS as the administrator or an IAM user with ECS permissions.

    • If there are no available ECSs, create one by referring to Purchasing a Custom ECS. When configuring advanced settings, select the agency created in step 1 from the drop-down list.
      Figure 5 Selecting an agency
    • If there are available ECSs, configure the created agency for an ECS as follows:
    1. On the ECS console, click an ECS for which you want to configure the agency.
      Figure 6 Clicking the ECS name
    2. In the Management Information area, click .
      Figure 7 Selecting an agency for the ECS
    3. Select the agency created in Step 1 from the drop-down list.
      Figure 8 Selecting an agency
    4. Click to complete the configuration.

  3. Enable applications on the ECS to get a temporary credential.

    Configure applications running on the ECS to call API Security Key (OpenStack Metadata API) to obtain the temporary credential (AK/SK) of the agency to access other Huawei Cloud services.

    • URI

    /openstack/latest/securitykey

    • Method

    Supports GET requests.

    • Example

    Linux:

    curl http://169.254.169.254/openstack/latest/securitykey

    Windows:

    Invoke-RestMethod http://169.254.169.254/openstack/latest/securitykey

    NOTE:

    ECS automatically rotates temporary credentials to ensure that they are secure and valid.

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