Importing a Metadata File
Function
This API is provided for the administrator to import a metadata file.
This API is used to import a metadata file to IAM to implement federated identity authentication. The metadata file specifies API addresses and certificate information in compliance with the SAML 2.0 standard. To obtain the metadata file of your enterprise IdP, contact the enterprise administrator.
The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.
URI
POST /v3-ext/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id}/metadata
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
idp_id |
Yes |
String |
Identity provider name. |
|
protocol_id |
Yes |
String |
Protocol ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
Content-Type |
Yes |
String |
Fill application/json;charset=utf8 in this field. |
|
X-Auth-Token |
Yes |
String |
Token with Security Administrator permissions. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
domain_id |
Yes |
String |
Account ID. |
|
xaccount_type |
Yes |
String |
Account source. This parameter is left blank by default. |
|
metadata |
Yes |
String |
Metadata of the IdP server. |
Response Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
message |
String |
Import result. |
Example Request
POST https://iam.myhuaweicloud.com/v3-ext/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id}/metadata
{
"xaccount_type": "",
"domain_id": "d78cbac186b744899480f25bd...",
"metadata": "<md:EntityDescript..."
}
Example Response
Status code: 201
The metadata file is imported successfully.
{
"message": "Import metadata successful"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
201 |
The metadata file is imported successfully. |
|
400 |
Invalid parameters. |
|
401 |
Authentication failed. |
|
403 |
Access denied. |
|
500 |
Internal server error. |
Error Codes
None
Last Article: Querying the Metadata File of Keystone
Next Article: Token
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.