doc-exports/docs/iam/api-ref/iam_02_0026.html
zhangyue 3b5a58b1fe IAM API 2.0.38
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2022-10-26 04:31:24 +00:00

219 lines
14 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<a name="iam_02_0026"></a><a name="iam_02_0026"></a>
<h1 class="topictitle1">Querying the Login Authentication Policy</h1>
<div id="body1597737539340"><div class="section" id="iam_02_0026__section1210412119201"><h4 class="sectiontitle">Function</h4><p id="iam_02_0026__p111711611102015">This API is used to query the login authentication policy.</p>
</div>
<div class="section" id="iam_02_0026__section81049117207"><h4 class="sectiontitle">URI</h4><p id="iam_02_0026__p14171311112014">GET /v3.0/OS-SECURITYPOLICY/domains/{domain_id}/login-policy</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0026__table0104181114202" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="iam_02_0026__row917161142010"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="iam_02_0026__p11171151102015">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.2.3.2.5.1.2"><p id="iam_02_0026__p111711111192011">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="iam_02_0026__p1917191112010">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.3.2.5.1.4"><p id="iam_02_0026__p1717191116201">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0026__row817111120201"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="iam_02_0026__p171717112205">domain_id</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.2.3.2.5.1.2 "><p id="iam_02_0026__p1171111102011">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="iam_02_0026__p2172101113202">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.2.5.1.4 "><p id="iam_02_0026__p20172181192020">Domain ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_02_0026__section181078118203"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0026__table410717114201" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="iam_02_0026__row817221152016"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="iam_02_0026__p15172141172019">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.2.2.5.1.2"><p id="iam_02_0026__p6172311152011">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="iam_02_0026__p16172181113203">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.2.5.1.4"><p id="iam_02_0026__p517211122013">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0026__row151721911132015"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_02_0026__p7172111118202">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.5.1.2 "><p id="iam_02_0026__p1717261172015">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_02_0026__p41728118203">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_02_0026__p3172141192014">Token with <strong id="iam_02_0026__b549810266472">Security Administrator</strong> permissions.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_02_0026__section911071111200"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0026__table21101311142019" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters in the response body</caption><thead align="left"><tr id="iam_02_0026__row317251117204"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.1"><p id="iam_02_0026__p7172141116203">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.2"><p id="iam_02_0026__p11728118200">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.2.2.4.1.3"><p id="iam_02_0026__p4172101113205">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0026__row717215111206"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.1 "><p id="iam_02_0026__p1517212112200"><a href="#iam_02_0026__table1311331112013">login_policy</a></p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.2 "><p id="iam_02_0026__p71721411172017">object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.2.2.4.1.3 "><p id="iam_02_0026__p12172411172016">Login authentication policy.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="iam_02_0026__table1311331112013"></a><a name="table1311331112013"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0026__table1311331112013" frame="border" border="1" rules="all"><caption><b>Table 4 </b>login_policy</caption><thead align="left"><tr id="iam_02_0026__row5172911172016"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="iam_02_0026__p17172611142010">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="iam_02_0026__p1117231116200">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="iam_02_0026__p19172111172019">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0026__row11172191102017"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0026__p417217115209">account_validity_period</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0026__p161727118205">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0026__p61728117201">Validity period (days) to disable users if they have not logged in within the period. Value range: 0240. Validity period (days) to disable users if they have not logged in within the period If this parameter is set to <strong id="iam_02_0026__b1099265119212">0</strong>, no users will be disabled.</p>
</td>
</tr>
<tr id="iam_02_0026__row517211119204"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0026__p3172161172013">custom_info_for_login</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0026__p717211111204">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0026__p8172211122017">Custom information that will be displayed upon successful login.</p>
</td>
</tr>
<tr id="iam_02_0026__row15172151110208"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0026__p717241132015">lockout_duration</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0026__p12172141112204">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0026__p17172411112019">Duration (minutes) to lock users out.</p>
</td>
</tr>
<tr id="iam_02_0026__row11172411122011"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0026__p18172511152014">login_failed_times</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0026__p1517216117200">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0026__p117221116208">Number of unsuccessful login attempts to lock users out.</p>
</td>
</tr>
<tr id="iam_02_0026__row817281119208"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0026__p61728116203">period_with_login_failures</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0026__p13172161110203">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0026__p9172611102017">Period (minutes) to count the number of unsuccessful login attempts.</p>
</td>
</tr>
<tr id="iam_02_0026__row1117220112202"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0026__p817221142013">session_timeout</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0026__p191725111202">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0026__p13172111182010">Session timeout (minutes) that will apply if you or users created using your account do not perform any operations within a specific period.</p>
</td>
</tr>
<tr id="iam_02_0026__row11172111110207"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0026__p19172511192012">show_recent_login_info</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0026__p18172311172015">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0026__p9172121113207">Indicates whether to display last login information upon successful login.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_02_0026__section10117311102015"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="iam_02_0026__screen18172141192016">GET https://sample.domain.com/v3.0/OS-SECURITYPOLICY/domains/{domain_id}/login-policy</pre>
</div>
<div class="section" id="iam_02_0026__section711831110200"><h4 class="sectiontitle">Example Response</h4><p id="iam_02_0026__p13172171112202"><strong id="iam_02_0026__b2092987205216">Status code: 200</strong></p>
<p id="iam_02_0026__p1172191162010">The request is successful.</p>
<pre class="screen" id="iam_02_0026__screen2172911162011">{
"login_policy" : {
"custom_info_for_login" : "",
"period_with_login_failures" : 15,
"lockout_duration" : 15,
"account_validity_period" : 99,
"login_failed_times" : 3,
"session_timeout" : 16,
"show_recent_login_info" : true
}
}</pre>
</div>
<p id="iam_02_0026__p697392122319"><strong id="iam_02_0026__b3260810135214">Status code: 403</strong></p>
<p id="iam_02_0026__p1597311211236">Access denied.</p>
<ul id="iam_02_0026__ul8973721122319"><li id="iam_02_0026__li149735213231">Example 1</li></ul>
<pre class="screen" id="iam_02_0026__screen16930028102315">{
"error_msg" : "You are not authorized to perform the requested action.",
"error_code" : "IAM.0002"
}</pre>
<ul id="iam_02_0026__ul374493282316"><li id="iam_02_0026__li20744123282319">Example 2</li></ul>
<pre class="screen" id="iam_02_0026__screen6300536172317">{
"error_msg" : "Policy doesn't allow %(actions)s to be performed.",
"error_code" : "IAM.0003"
}</pre>
<p id="iam_02_0026__p159731221172310"><strong id="iam_02_0026__b93197142521">Status code: 404</strong></p>
<p id="iam_02_0026__p89731721182314">The requested resource cannot be found.</p>
<pre class="screen" id="iam_02_0026__screen16973172114231">{
"error_msg" : "Could not find %(target)s: %(target_id)s.",
"error_code" : "IAM.0004"
}</pre>
<p id="iam_02_0026__p139731214232"><strong id="iam_02_0026__b13899815195218">Status code: 500</strong></p>
<p id="iam_02_0026__p14973421122316">Internal server error.</p>
<pre class="screen" id="iam_02_0026__screen19739214239">{
"error_msg" : "An unexpected error prevented the server from fulfilling your request.",
"error_code" : "IAM.0006"
}</pre>
<div class="section" id="iam_02_0026__section1812131152012"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0026__table18121171116208" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_02_0026__row1417241113203"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.19.2.1.3.1.1"><p id="iam_02_0026__p171726113207">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.19.2.1.3.1.2"><p id="iam_02_0026__p51731711172015">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0026__row121731111192019"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0026__p10173121172016">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0026__p181731411152017">The request is successful.</p>
</td>
</tr>
<tr id="iam_02_0026__row7173101132010"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0026__p19173171112014">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0026__p18173161162019">Authentication failed.</p>
</td>
</tr>
<tr id="iam_02_0026__row151734114202"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0026__p13173111122016">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0026__p151732119201">Access denied.</p>
</td>
</tr>
<tr id="iam_02_0026__row1017319117202"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0026__p917341111203">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0026__p0173151162012">The requested resource cannot be found.</p>
</td>
</tr>
<tr id="iam_02_0026__row13173611192012"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0026__p2017301112017">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0026__p3173211132011">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>