forked from docs/doc-exports
Reviewed-by: Kabai, Zoltán Gábor <zoltan-gabor.kabai@t-systems.com> Co-authored-by: Wei, Hongmin <weihongmin1@huawei.com> Co-committed-by: Wei, Hongmin <weihongmin1@huawei.com>
191 lines
13 KiB
HTML
191 lines
13 KiB
HTML
<a name="iam_08_0016"></a><a name="iam_08_0016"></a>
|
|
|
|
<h1 class="topictitle1">Querying the Login Protection Configuration of a User</h1>
|
|
<div id="body1597737539340"><div class="section" id="iam_08_0016__section4392175003714"><h4 class="sectiontitle">Function</h4><p id="iam_08_0016__p15518135073717">This API can be used by the administrator to query the login protection configuration of a specified user or used by a user to query their login protection configuration.</p>
|
|
</div>
|
|
<div class="section" id="iam_08_0016__section12393135033711"><h4 class="sectiontitle">URI</h4><p id="iam_08_0016__p195181350163717">GET /v3.0/OS-USER/users/{user_id}/login-protect</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0016__table3394165014373" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="iam_08_0016__row3518145023712"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="iam_08_0016__p65185509375">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.2.3.2.5.1.2"><p id="iam_08_0016__p11518175018373">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="iam_08_0016__p35194506378">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.3.2.5.1.4"><p id="iam_08_0016__p951965043714">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0016__row11519250203711"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="iam_08_0016__p1519050143711">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.2.3.2.5.1.2 "><p id="iam_08_0016__p10519165010377">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="iam_08_0016__p9519135083711">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.2.5.1.4 "><p id="iam_08_0016__en-us_topic_0221482366_p4739184912254">User ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_08_0016__section24001250133716"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0016__table14401195013373" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="iam_08_0016__row10519050143718"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="iam_08_0016__p18519650173714">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.2.2.5.1.2"><p id="iam_08_0016__p651917504372">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="iam_08_0016__p7519165010379">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.2.5.1.4"><p id="iam_08_0016__p1519205093717">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0016__row45197503377"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_08_0016__p195199501373">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.5.1.2 "><p id="iam_08_0016__p751965015378">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_08_0016__p205191550193718">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_08_0016__p175199501375">A token with <strong id="iam_08_0016__b3452151224516">Security Administrator</strong> permissions is required if the administrator is requesting to query the login protection configuration of a specified user.</p>
|
|
<p id="iam_08_0016__p45191050193713">If a user is requesting to query their login protection configuration, the user token (no special permission requirements) of the user is required.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_08_0016__section540805043710"><h4 class="sectiontitle">Response Parameters</h4><p id="iam_08_0016__p11519105073711"><strong id="iam_08_0016__b198731737192116">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0016__table1240935063711" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters in the response body</caption><thead align="left"><tr id="iam_08_0016__row195197506378"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="iam_08_0016__p20519125073715">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="iam_08_0016__p15194507376">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="iam_08_0016__p251985093710">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0016__row14519175053710"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_08_0016__p451945011378"><a href="#iam_08_0016__table7414450103712">login_protect</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_08_0016__p17519145033715">object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_08_0016__p1351935023713">Login protection configuration.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="iam_08_0016__table7414450103712"></a><a name="table7414450103712"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0016__table7414450103712" frame="border" border="1" rules="all"><caption><b>Table 4 </b>login_protect</caption><thead align="left"><tr id="iam_08_0016__row19519105017376"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="iam_08_0016__p12519115053714">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="iam_08_0016__p1751945017371">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="iam_08_0016__p1051920505371">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0016__row351912506373"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_08_0016__p451975063715">enabled</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_08_0016__p19519165063712">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_08_0016__p35197507377">Indicates whether login protection has been enabled for a user. The value can be <strong id="iam_08_0016__b764910440218">true</strong> or <strong id="iam_08_0016__b265474482118">false</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0016__row15191500379"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_08_0016__p11519550153715">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_08_0016__p951915073714">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_08_0016__p1519165020376">User ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0016__row9519195013717"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_08_0016__p1351912505377">verification_method</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_08_0016__p1551945018378">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_08_0016__p851915013714">Login authentication method of the user.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_08_0016__section10420950163717"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="iam_08_0016__screen1519105023718">GET https://sample.domain.com/v3.0/OS-USER/users/{user_id}/login-protect</pre>
|
|
</div>
|
|
<div class="section" id="iam_08_0016__section242245003714"><h4 class="sectiontitle">Example Response</h4><p id="iam_08_0016__p11519145033717"><strong id="iam_08_0016__b1921725119212">Status code: 200</strong></p>
|
|
<p id="iam_08_0016__p14519105083711">The request is successful.</p>
|
|
<pre class="screen" id="iam_08_0016__screen251915083719">{
|
|
"login_protect" : {
|
|
"user_id" : "16b26081f43d4c628c4bb88cf32e9...",
|
|
"enabled" : true,
|
|
"verification_method" : "vmfa"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<p id="iam_08_0016__p19736164711162"><strong id="iam_08_0016__b2017716574214">Status code: 403</strong></p>
|
|
<p id="iam_08_0016__p10736184761614">Access denied.</p>
|
|
<ul id="iam_08_0016__ul16736154721618"><li id="iam_08_0016__li2736134715165">Example 1</li></ul>
|
|
<pre class="screen" id="iam_08_0016__screen18056572168">{
|
|
"error_msg" : "You are not authorized to perform the requested action.",
|
|
"error_code" : "IAM.0002"
|
|
}</pre>
|
|
<ul id="iam_08_0016__ul38081558161610"><li id="iam_08_0016__li5808155811160">Example 2</li></ul>
|
|
<pre class="screen" id="iam_08_0016__screen1115955381611">{
|
|
"error_msg" : "Policy doesn't allow %(actions)s to be performed.",
|
|
"error_code" : "IAM.0003"
|
|
}</pre>
|
|
<p id="iam_08_0016__p2736194791619"><strong id="iam_08_0016__b97871903226">Status code: 404</strong></p>
|
|
<p id="iam_08_0016__p973664715165">The requested resource cannot be found.</p>
|
|
<pre class="screen" id="iam_08_0016__screen1373634731610">{
|
|
"error_msg" : "Could not find %(target)s: %(target_id)s.",
|
|
"error_code" : "IAM.0004"
|
|
}</pre>
|
|
<div class="note" id="iam_08_0016__note360053352115"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="iam_08_0016__p2023069142513">If login protection has never been configured for a user, you cannot use this API to obtain the login protection configuration of the user. Otherwise, the error code IAM.0004 will be returned.</p>
|
|
</div></div>
|
|
<p id="iam_08_0016__p137361247201618"><strong id="iam_08_0016__b1554413112211">Status code: 500</strong></p>
|
|
<p id="iam_08_0016__p11736547121613">Internal server error.</p>
|
|
<pre class="screen" id="iam_08_0016__screen19736104771620">{
|
|
"error_msg" : "An unexpected error prevented the server from fulfilling your request.",
|
|
"error_code" : "IAM.0006"
|
|
}</pre>
|
|
<div class="section" id="iam_08_0016__section18441450143712"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0016__table17441550113718" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_08_0016__row252015509375"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.20.2.1.3.1.1"><p id="iam_08_0016__p20520165033710">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.20.2.1.3.1.2"><p id="iam_08_0016__p6520175018375">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0016__row1652055013712"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.20.2.1.3.1.1 "><p id="iam_08_0016__p1052016507375">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.20.2.1.3.1.2 "><p id="iam_08_0016__p352095014373">The request is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0016__row1952014506379"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.20.2.1.3.1.1 "><p id="iam_08_0016__p1652019501377">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.20.2.1.3.1.2 "><p id="iam_08_0016__p552075016378">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0016__row2052085011370"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.20.2.1.3.1.1 "><p id="iam_08_0016__p17520155083710">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.20.2.1.3.1.2 "><p id="iam_08_0016__p2520165043715">Access denied.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0016__row205201850173717"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.20.2.1.3.1.1 "><p id="iam_08_0016__p352012503370">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.20.2.1.3.1.2 "><p id="iam_08_0016__p352018509370">The requested resource cannot be found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0016__row1752015013718"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.20.2.1.3.1.1 "><p id="iam_08_0016__p652015012379">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.20.2.1.3.1.2 "><p id="iam_08_0016__p152019507376">Internal server error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="iam_02_0020.html">Security Settings</a></div>
|
|
</div>
|
|
</div>
|
|
|