检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
Related Services IAM Identity and Access Management (IAM) provides Image Recognition with the user authentication and authorization function. For more information about IAM, see the Identity and Access Management User Guide.
For example, to obtain an IAM token in the CN-Hong Kong region, obtain the endpoint of IAM (iam.ap-southeast-1.myhuaweicloud.com) for this region and the resource-path (/v3/auth/tokens) in the URI of the API used to obtain a user token.
To create an IAM user, perform the following steps: In the navigation pane of the IAM console, choose Users. Then click Create User. Set user information and click Next. For details about the parameters, see Creating an IAM User.
For security purposes, create IAM users and grant them permissions for routine management. IAM user A user is created in IAM using an account to use cloud services. Each user has its own identity credentials (password and access keys).
Copy the IAM username and account name to username and domainname, and enter the IAM user password. Figure 3 Token-based authentication Click Send to send a request, and obtain and copy the token. In Headers, obtain the value of X-Subject-Token, which is the token.
OBS authorization must be performed by an account, not by an IAM user.
When using a token for authentication, cache it to prevent frequently calling the IAM API used to obtain a user token. A token specifies temporary permissions in a computer system.
OBS authorization must be performed by an account, not by an IAM user. Log in to the management console and choose Service List > Image Recognition. In the navigation pane, choose Service Management . Enable OBS Authorization.
Incorrect IAM authentication information: Failed to decrypt the token. Check whether the entered token is complete. 2. The validity period of a token is 24 hours. If the token expires, obtain a new token and pass it. 3. The AK/SK authentication fails.