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>
245 lines
18 KiB
HTML
245 lines
18 KiB
HTML
<a name="en-us_topic_0057845645"></a><a name="en-us_topic_0057845645"></a>
|
|
|
|
<h1 class="topictitle1">Querying a Mapping</h1>
|
|
<div id="body1492676120174"><div class="section" id="en-us_topic_0057845645__section544449010253"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0057845645__p19971204919191">This API is used to query the information about a mapping.</p>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845645__section961061110253"><h4 class="sectiontitle">URI</h4><ul id="en-us_topic_0057845645__ul4026201210253"><li id="en-us_topic_0057845645__li2681379210253">URI format<p id="en-us_topic_0057845645__p3999753810253"><a name="en-us_topic_0057845645__li2681379210253"></a><a name="li2681379210253"></a>GET /v3/OS-FEDERATION/mappings/{id}</p>
|
|
</li></ul>
|
|
<ul id="en-us_topic_0057845645__ul2443352310253"><li id="en-us_topic_0057845645__li1857511610253">URI parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845645__table3295831810253" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845645__row2859289710253"><th align="left" class="cellrowborder" valign="top" width="20.49%" id="mcps1.3.2.3.1.1.1.5.1.1"><p id="en-us_topic_0057845645__p3432335410253"><strong id="en-us_topic_0057845645__a6f95694edbbb43d8a152536754b86c82">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.360000000000003%" id="mcps1.3.2.3.1.1.1.5.1.2"><p id="en-us_topic_0057845645__p2872829510253"><strong id="en-us_topic_0057845645__a105e6ed8c3de4c5a9dde97ae5a71071e_1">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.23%" id="mcps1.3.2.3.1.1.1.5.1.3"><p id="en-us_topic_0057845645__p4529057710253"><strong id="en-us_topic_0057845645__a703d34a49a2f4162bc1a1a439f655f95_1">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="42.92%" id="mcps1.3.2.3.1.1.1.5.1.4"><p id="en-us_topic_0057845645__p4465811110253"><strong id="en-us_topic_0057845645__b842352706114032_1_1">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845645__row6053724210253"><td class="cellrowborder" valign="top" width="20.49%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845645__p456954510253">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.360000000000003%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845645__p3458885310253">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.23%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845645__p5023366910253">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.92%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845645__p4239536110253">Mapping ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845645__section1147224210253"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0057845645__ul5683644810253"><li id="en-us_topic_0057845645__li4176598910253">Parameters in the request header
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845645__table4034958610253" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845645__row2407090210253"><th align="left" class="cellrowborder" valign="top" width="20.62%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0057845645__p358602710253"><strong id="en-us_topic_0057845645__a3da1b7475f644c07832655d87318eb65">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.360000000000003%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0057845645__p2203278510253"><strong id="en-us_topic_0057845645__a105e6ed8c3de4c5a9dde97ae5a71071e_3">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.23%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0057845645__p3982516710253"><strong id="en-us_topic_0057845645__a703d34a49a2f4162bc1a1a439f655f95_3">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="42.79%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0057845645__p461313410253"><strong id="en-us_topic_0057845645__b842352706114032_1_3">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845645__row3811960610253"><td class="cellrowborder" valign="top" width="20.62%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845645__p68036610253">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.360000000000003%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845645__p5510966210253">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.23%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845645__p3469764710253">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.79%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845645__p5904602410253">Fill <strong id="en-us_topic_0057845645__b842352706161331">application/json;charset=utf8</strong> in this field.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845645__row6165217610253"><td class="cellrowborder" valign="top" width="20.62%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845645__p2777034510253">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.360000000000003%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845645__p3480547110253">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.23%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845645__p67087310253">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.79%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845645__p5434073510253">Authenticated token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="en-us_topic_0057845645__ul4334942594041"><li id="en-us_topic_0057845645__li5460051194041">Example request<pre class="screen" id="en-us_topic_0057845645__screen2956678210321"><em id="en-us_topic_0057845645__i38811058194315">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/ACME</em></pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845645__section3952345110253"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0057845645__ul4728293010253"><li id="en-us_topic_0057845645__li2289319210253">Parameters in the response body
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845645__table471214210253" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845645__row5835001710253"><th align="left" class="cellrowborder" valign="top" width="20.59%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="en-us_topic_0057845645__p2873092810253"><strong id="en-us_topic_0057845645__b6477496310452">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.310000000000002%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="en-us_topic_0057845645__p4550385610253"><strong id="en-us_topic_0057845645__a105e6ed8c3de4c5a9dde97ae5a71071e_5">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.22%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="en-us_topic_0057845645__p6193373710253"><strong id="en-us_topic_0057845645__a703d34a49a2f4162bc1a1a439f655f95_5">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="42.88%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="en-us_topic_0057845645__p5057677010253"><strong id="en-us_topic_0057845645__b842352706114032_3">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845645__row307766710253"><td class="cellrowborder" valign="top" width="20.59%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845645__p4796446910253">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.310000000000002%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845645__p5991676710253">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845645__p2141997810253">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.88%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845645__p5729667010253">Mapping ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845645__row4590798210253"><td class="cellrowborder" valign="top" width="20.59%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845645__p2755905710253">rules</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.310000000000002%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845645__p1769115310253">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845645__p1194883210253">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.88%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845645__p1814613755019">Rule used to map federated users to local users</p>
|
|
<p id="en-us_topic_0057845645__p2833135010253">Example rule for SAML:</p>
|
|
<pre class="screen" id="en-us_topic_0057845645__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_0057845645__p13647153563918"><strong id="en-us_topic_0057845645__b84235270617449">local</strong>: indicates the information about a federated user in the cloud system.</p>
|
|
<ul id="en-us_topic_0057845645__ul14819125213392"><li id="en-us_topic_0057845645__li198193521397"><strong id="en-us_topic_0057845645__b1181759624">user</strong>: indicates the name of a federated user in the cloud system. <strong id="en-us_topic_0057845645__b842352706114340">{0}</strong> indicates the first attribute of the user information in <strong id="en-us_topic_0057845645__b842352706114418">remote</strong>.</li><li id="en-us_topic_0057845645__li1819452183919"><strong id="en-us_topic_0057845645__b2008904459">group</strong>: indicates the user group to which a federated user belongs in the cloud system.</li></ul>
|
|
<p id="en-us_topic_0057845645__p281920526391"><strong id="en-us_topic_0057845645__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_0057845645__b842352706173622">remote</strong> is determined based on the assertion.</p>
|
|
<ul id="en-us_topic_0057845645__ul1054319873214"><li id="en-us_topic_0057845645__li209105567716"><strong id="en-us_topic_0057845645__b182381822311435">"type": "UserName" </strong>indicates an attribute in an IdP assertion.</li><li id="en-us_topic_0057845645__li5546168153216"><strong id="en-us_topic_0057845645__b164475247511438">"type": "orgPersonType"</strong> indicates an attribute in an IdP assertion.</li><li id="en-us_topic_0057845645__li10384142911557"><strong id="en-us_topic_0057845645__b11451105112137">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_0057845645__row5365556310253"><td class="cellrowborder" valign="top" width="20.59%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845645__p5113332410253">links</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.310000000000002%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845645__p4815861110253">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845645__p853338110253">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.88%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845645__p2011527610253">Mapping resource link.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="en-us_topic_0057845645__li59077145165238">Example response<pre class="screen" id="en-us_topic_0057845645__screen62845237105155">{
|
|
"mapping": {
|
|
"id": "ACME",
|
|
"links": {
|
|
"self": "https://example.com/v3/OS-FEDERATION/mappings/ACME"
|
|
},
|
|
"rules": [
|
|
{
|
|
"local": [
|
|
{
|
|
"user": {
|
|
"name": "{0}"
|
|
}
|
|
},
|
|
{
|
|
"group": {
|
|
"name": "0cd5e9"
|
|
}
|
|
}
|
|
],
|
|
"remote": [
|
|
{
|
|
"type": "UserName"
|
|
},
|
|
{
|
|
"type": "orgPersonType",
|
|
"not_any_of": [
|
|
"Contractor",
|
|
"Guest"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845645__section5627758010253"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845645__table6219017010253" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845645__row323840610253"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0057845645__p6098437110253"><strong id="en-us_topic_0057845645__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_0057845645__p4078700810253"><strong id="en-us_topic_0057845645__b38470707163018">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845645__row1541333310253"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845645__p4052047510253">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845645__p6093304910253">The request is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845645__row1152653710253"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845645__p6123433610253">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845645__p6103414610253">The server failed to process the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845645__row1243640810253"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845645__p71610410253">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845645__p5800447310253">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845645__row5227821310253"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845645__p667687410253">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845645__p395590710253">Access denied.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845645__row3560316710253"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845645__p6528425810253">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845645__p5353351710253">The requested resource cannot be found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845645__row1203960910253"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845645__p3568430910253">405</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845645__p474788410253">The method specified in the request is not allowed for the requested resource.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845645__row4273096210253"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845645__p3865592010253">413</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845645__p4412179010253">The request entity is too large.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845645__row6155179010253"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845645__p1963911210253">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845645__p4726423010253">Internal server error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845645__row2272489010253"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845645__p2877682610253">503</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845645__p4922158710253">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>
|
|
|