名前IDのユーザー属性のマップ

トークン属性ルールREST APIを使用して、名前IDのユーザー・マッピングを表示および管理できます。

cURLコマンドの例では、URL構造を使用しています:
http://host:port/wsm-pmrest/v2/trust/{aTrustDocName}/attributerule/{anIssuerName}/{anIdentifier}/nameid/mapping

次の方法を使用事例で示します。

  • ユーザー属性のマップ

  • ユーザー属性マッピングの表示

  • ユーザー属性マッピングの変更

  • ユーザー属性マッピングの削除

トークン属性ルールRest APIを使用してユーザー属性マッピングを管理するには:

  1. cURLコマンド・ラインでヘッダーを指定します。
    -H Accept:application/json
  2. 次のコマンドを実行して、トークン属性ルール(識別子myidentifier1および発行者名www.abccompany.com)の名前IDにユーザー属性をマップします:
    curl -i -X POST -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{issuername}/{identifier}/nameid/mapping

    curl -i -X POST -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/nameid/mapping

    「NameIdMappingの作成」を参照してください。

    次に、リクエスト本文の例を示します:
    {
      "userAttribute": "val1",
      "userMappingAttribute": "userMappingattr1"
    }

    次にリクエストの成功を示すレスポンスの例を示します。

    {
      "STATUSCODE": "20141",
      "MESSAGE": "Mapping for Attribute/NameId \"OrgTrustedUser\" is successfully created."
    }
  3. 次のコマンドを実行して、名前IDのユーザー属性名をOrgに、ユーザー・マッピング属性をuserMappingOrgに変更します:
    curl -i -X PATCH -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{issuername}/{identifier}/nameid/mapping

    curl -i -X PATCH -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/nameid/mapping

    「NameIdMappingの更新」を参照してください。

    次に、リクエスト本文の例を示します。

    {
      "userAttribute": "Org",
      "userMappingAttribute": "userMappingOrg"
    }

    次にリクエストの成功を示すレスポンスの例を示します。

    {
      "STATUSCODE": "20142",
      "MESSAGE": "Mapping for Attribute/NameId \"OrgTrustedUser\" is successfully updated."
    }
  4. 次のコマンドを実行して、トークン属性ルール(識別子myidentifier1および発行者名www.abccompany.com)の名前IDのユーザー属性とユーザー・マッピング属性を表示します:
    curl -i -X GET -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{issuername}/{identifier}/nameid/mapping

    curl -i -X GET -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/nameid/mapping

    「NameIdMappingの取得」を参照してください。

    次にリクエストの成功を示すレスポンスの例を示します。

    {
      "userAttribute": "Org",
      "userMappingAttribute": "userMappingOrg"
    }
  5. オプションで、次のコマンドを実行して、トークン属性ルール(識別子myidentifier1および発行者名www.abccompany.com)の名前IDのユーザー属性とユーザー・マッピング属性を削除します:
    curl -i -X DELETE -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{issuername}/{identifier}/nameid/mapping

    curl -i -X DELETE -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/nameid/mapping

    「NameIdMappingの削除」を参照してください。

    次にリクエストの成功を示すレスポンスの例を示します。

    {
      "STATUSCODE": "20144",
      "MESSAGE": "Mapping for Attribute/NameId \"OrgTrustedUser\" is successfully deleted"
    }