forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
259 lines
18 KiB
HTML
259 lines
18 KiB
HTML
<a name="en-us_topic_0057845567"></a><a name="en-us_topic_0057845567"></a>
|
|
|
|
<h1 class="topictitle1">Querying the Mapping List</h1>
|
|
<div id="body1492676120173"><div class="section" id="en-us_topic_0057845567__section35784939102440"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0057845567__p20227823111912">This API is used to query the mapping list.</p>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845567__section48981904102440"><h4 class="sectiontitle">URI</h4><p id="en-us_topic_0057845567__p53032144102440">GET /v3/OS-FEDERATION/mappings</p>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845567__section7527256102440"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0057845567__ul5727996102440"><li id="en-us_topic_0057845567__li51551971102440">Parameters in the request header
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845567__table61314561102440" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845567__row46720639102440"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0057845567__p26275405102440"><strong id="en-us_topic_0057845567__a6f95694edbbb43d8a152536754b86c82">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0057845567__p47933064102440"><strong id="en-us_topic_0057845567__a105e6ed8c3de4c5a9dde97ae5a71071e_1">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0057845567__p57372951102440"><strong id="en-us_topic_0057845567__a703d34a49a2f4162bc1a1a439f655f95_1">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0057845567__p16697443102440"><strong id="en-us_topic_0057845567__b842352706114032">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845567__row10315603102440"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845567__p30257487102440">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845567__p34937408102440">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845567__p11357838102440">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845567__p47569696102440">Fill <strong id="en-us_topic_0057845567__b842352706161331">application/json;charset=utf8</strong> in this field.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row25474087102440"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845567__p50135130102440">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845567__p34413767102440">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845567__p36051732102440">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845567__p34509161102440">Authenticated token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="en-us_topic_0057845567__ul4334942594041"><li id="en-us_topic_0057845567__li5460051194041">Example request<pre class="screen" id="en-us_topic_0057845567__screen2956678210321"><em id="en-us_topic_0057845567__i1546416103518">curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -H "X-Auth-Token:$token" -X GET https://sample.domain.com/v3/OS-FEDERATION/mappings</em></pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845567__section43778671102440"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0057845567__ul56411469102440"><li id="en-us_topic_0057845567__li37941181102440">Parameters in the response body
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845567__table5926316102440" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845567__row15113921102440"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="en-us_topic_0057845567__p16268089102440"><strong id="en-us_topic_0057845567__a3da1b7475f644c07832655d87318eb65">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="en-us_topic_0057845567__p42646846102440"><strong id="en-us_topic_0057845567__a105e6ed8c3de4c5a9dde97ae5a71071e_3">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="en-us_topic_0057845567__p31842487102440"><strong id="en-us_topic_0057845567__a703d34a49a2f4162bc1a1a439f655f95_3">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="en-us_topic_0057845567__p29104653102440"><strong id="en-us_topic_0057845567__b842352706114032_1">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845567__row8666663102440"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845567__p30911085102440">mappings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845567__p20769993102440">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845567__p4647840102440">Array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845567__p40930780102440">List of mappings.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row32832708102440"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845567__p42203666102440">links</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845567__p63053752102440">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845567__p7080287102440">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845567__p36632366102440">Mapping resource link.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="en-us_topic_0057845567__li15804105982415">mappings parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845567__table471214210253" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845567__row5835001710253"><th align="left" class="cellrowborder" valign="top" width="20.59%" id="mcps1.3.4.2.2.1.1.5.1.1"><p id="en-us_topic_0057845567__p2873092810253"><strong id="en-us_topic_0057845567__b37426530113629">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.310000000000002%" id="mcps1.3.4.2.2.1.1.5.1.2"><p id="en-us_topic_0057845567__p4550385610253"><strong id="en-us_topic_0057845567__b760182744">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.22%" id="mcps1.3.4.2.2.1.1.5.1.3"><p id="en-us_topic_0057845567__p6193373710253"><strong id="en-us_topic_0057845567__b1411741613">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="42.88%" id="mcps1.3.4.2.2.1.1.5.1.4"><p id="en-us_topic_0057845567__p5057677010253"><strong id="en-us_topic_0057845567__b14438018113629">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845567__row307766710253"><td class="cellrowborder" valign="top" width="20.59%" headers="mcps1.3.4.2.2.1.1.5.1.1 "><p id="en-us_topic_0057845567__p4796446910253">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.310000000000002%" headers="mcps1.3.4.2.2.1.1.5.1.2 "><p id="en-us_topic_0057845567__p5991676710253">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.3.4.2.2.1.1.5.1.3 "><p id="en-us_topic_0057845567__p2141997810253">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.88%" headers="mcps1.3.4.2.2.1.1.5.1.4 "><p id="en-us_topic_0057845567__p5729667010253">Mapping ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row4590798210253"><td class="cellrowborder" valign="top" width="20.59%" headers="mcps1.3.4.2.2.1.1.5.1.1 "><p id="en-us_topic_0057845567__p2755905710253">rules</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.310000000000002%" headers="mcps1.3.4.2.2.1.1.5.1.2 "><p id="en-us_topic_0057845567__p1769115310253">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.3.4.2.2.1.1.5.1.3 "><p id="en-us_topic_0057845567__p1194883210253">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.88%" headers="mcps1.3.4.2.2.1.1.5.1.4 "><p id="en-us_topic_0057845567__p1814613755019">Rule used to map federated users to local users</p>
|
|
<p id="en-us_topic_0057845567__p2833135010253">Example rule for SAML:</p>
|
|
<pre class="screen" id="en-us_topic_0057845567__screen4220213569"> "rules": [
|
|
{
|
|
"local": [
|
|
{
|
|
"user": {
|
|
"name": "{0}"
|
|
}
|
|
},
|
|
{
|
|
"group": {
|
|
"name": "0cd5e9"
|
|
}
|
|
}
|
|
],
|
|
"remote": [
|
|
{
|
|
"type": "UserName"
|
|
},
|
|
{
|
|
"type": "orgPersonType",
|
|
"not_any_of": [
|
|
"Contractor",
|
|
"Guest"
|
|
]
|
|
}
|
|
|
|
]
|
|
}
|
|
]</pre>
|
|
<p id="en-us_topic_0057845567__p13647153563918"><strong id="en-us_topic_0057845567__b84235270617449">local</strong>: indicates the information about a federated user in the cloud system.</p>
|
|
<ul id="en-us_topic_0057845567__ul14819125213392"><li id="en-us_topic_0057845567__li198193521397"><strong id="en-us_topic_0057845567__b49294650">user</strong>: indicates the name of a federated user in the cloud system. <strong id="en-us_topic_0057845567__b842352706114340">{0}</strong> indicates the first attribute of the user information in <strong id="en-us_topic_0057845567__b842352706114418">remote</strong>.</li><li id="en-us_topic_0057845567__li1819452183919"><strong id="en-us_topic_0057845567__b66705459">group</strong>: indicates the user group to which a federated user belongs in the cloud system.</li></ul>
|
|
<p id="en-us_topic_0057845567__p281920526391"><strong id="en-us_topic_0057845567__b842352706173126">remote</strong>: indicates the information about a federated user in the IdP. This expression is a combination of assertion attributes and operators. The value of <strong id="en-us_topic_0057845567__b842352706173622">remote</strong> is determined based on the assertion.</p>
|
|
<ul id="en-us_topic_0057845567__ul1054319873214"><li id="en-us_topic_0057845567__li209105567716"><strong id="en-us_topic_0057845567__b35911621152914">"type": "UserName"</strong> indicates an attribute in an IdP assertion.</li><li id="en-us_topic_0057845567__li5546168153216"><strong id="en-us_topic_0057845567__b118011252134614">"type": "orgPersonType"</strong> indicates an attribute in an IdP assertion.</li><li id="en-us_topic_0057845567__li0634131152918"><strong id="en-us_topic_0057845567__b161105201513">not_any_of</strong>: The rule is not matched if any of the specified strings appear in the attribute type. The condition result is Boolean, not the argument that is passed as input.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row5365556310253"><td class="cellrowborder" valign="top" width="20.59%" headers="mcps1.3.4.2.2.1.1.5.1.1 "><p id="en-us_topic_0057845567__p5113332410253">links</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.310000000000002%" headers="mcps1.3.4.2.2.1.1.5.1.2 "><p id="en-us_topic_0057845567__p4815861110253">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.3.4.2.2.1.1.5.1.3 "><p id="en-us_topic_0057845567__p853338110253">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.88%" headers="mcps1.3.4.2.2.1.1.5.1.4 "><p id="en-us_topic_0057845567__p2011527610253">Mapping resource link.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="en-us_topic_0057845567__li0597154110209">Example response<pre class="screen" id="en-us_topic_0057845567__screen10560569105041">{
|
|
"links": {
|
|
"next": null,
|
|
"previous": null,
|
|
"self": "https://example.com/v3/OS-FEDERATION/mappings"
|
|
},
|
|
"mappings": [
|
|
{
|
|
"id": "ACME",
|
|
"links": {
|
|
"self": "https://example.com/v3/OS-FEDERATION/mappings/ACME"
|
|
},
|
|
"rules": [
|
|
{
|
|
"local": [
|
|
{
|
|
"user": {
|
|
"name": "{0}"
|
|
}
|
|
},
|
|
{
|
|
"group": {
|
|
"id": "0cd5e9"
|
|
}
|
|
}
|
|
],
|
|
"remote": [
|
|
{
|
|
"type": "UserName"
|
|
},
|
|
{
|
|
"type": "orgPersonType",
|
|
"any_one_of": [
|
|
"Contractor",
|
|
"SubContractor"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845567__section4712884102440"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845567__table46199306102440" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845567__row47553867102440"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0057845567__p26658041102440"><strong id="en-us_topic_0057845567__b37151362163018">Status Code</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.2"><p id="en-us_topic_0057845567__p11817687102440"><strong id="en-us_topic_0057845567__b38470707163018">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845567__row17708557102440"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845567__p25107012102440">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845567__p20402083102440">The request is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row49401026102440"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845567__p42060145102440">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845567__p51428573102440">The server failed to process the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row60203973102440"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845567__p44683606102440">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845567__p62602328102440">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row26550042102440"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845567__p3069832102440">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845567__p47329850102440">Access denied.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row23315473102440"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845567__p9505124102440">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845567__p31717617102440">The requested resource cannot be found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row17023100102440"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845567__p36693840102440">405</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845567__p19411057102440">The method specified in the request is not allowed for the requested resource.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row40481785102440"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845567__p57799159102440">413</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845567__p51220342102440">The request entity is too large.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row58329902102440"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845567__p27101584102440">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845567__p47744711102440">Internal server error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845567__row27049222102440"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845567__p43503383102440">503</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845567__p34113136102440">Service unavailable.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0057845588.html">Mapping</a></div>
|
|
</div>
|
|
</div>
|
|
|