• Identity and Access Management

iam
  1. Help Center
  2. Identity and Access Management
  3. API Reference
  4. Federated Identity Authentication Management
  5. Metadata
  6. Importing a Metadata File

Importing a Metadata File

Function Description

Before using the federated identity authentication function, a metadata file must be imported to the IAM system. This interface is used to import a metadata file of a domain.

URI

  • URI format

    POST /v3-ext/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id}/metadata

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    idp_id

    Yes

    String

    ID of a registered identity provider.

    protocol _id

    Yes

    String

    ID of a registered protocol.

Request

  • Request header parameter description

    Parameter

    Mandatory

    Type

    Description

    Content-Type

    Yes

    String

    Fill application/json;charset=utf8 in this field.

    X-Auth-Token

    Yes

    String

    Authenticated token with the Security Administrator permission.

  • Request body parameter description

    Parameter

    Mandatory

    Type

    Description

    xaccount_type

    Yes

    String

    Source of a domain. This field is left blank by default.

    metadata

    Yes

    String

    Content of the metadata file on the IdP server.

    domain_id

    Yes

    String

    ID of the domain that a user belongs to.

  • Sample request
    curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -H "X-Auth-Token:$token" -X POST -d '{"xaccount_type":"","domain_id":"ed7a77d365304f458f7d0a7909c6d889","metadata":"$metadataContent"}' https://10.185.190.118:31943/v3-ext/OS-FEDERATION/identity_providers/ACME/protocols/saml/metadata

Response

Sample response

{ "message": "Import metadata successful"}

Status Codes

Status Code

Description

201

The import is successful.

400

The server failed to process the request.

401

You must enter a username and password to access the requested page.

403

You are forbidden to access the requested page.

500

Failed to complete the request because of an internal service error.