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>
227 lines
15 KiB
HTML
227 lines
15 KiB
HTML
<a name="iam_02_0024"></a><a name="iam_02_0024"></a>
|
|
|
|
<h1 class="topictitle1">Querying the Password Policy</h1>
|
|
<div id="body1597737539340"><div class="section" id="iam_02_0024__section21921250161915"><h4 class="sectiontitle">Function</h4><p id="iam_02_0024__p18330135013195">This API is used to query the password policy.</p>
|
|
</div>
|
|
<div class="section" id="iam_02_0024__section101931550171918"><h4 class="sectiontitle">URI</h4><p id="iam_02_0024__p733013509196">GET /v3.0/OS-SECURITYPOLICY/domains/{domain_id}/password-policy</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0024__table6194185015199" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="iam_02_0024__row83304506198"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="iam_02_0024__p133014507193">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_0024__p14330550141920">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_0024__p2330750121911">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_0024__p153309501199">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_02_0024__row203301850171918"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="iam_02_0024__p333055010192">domain_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.2.3.2.5.1.2 "><p id="iam_02_0024__p113301150181919">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="iam_02_0024__p1533015506195">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.2.5.1.4 "><p id="iam_02_0024__p113327503192">Domain ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_02_0024__section1120011505199"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0024__table72011950171918" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="iam_02_0024__row13320507194"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="iam_02_0024__p12332195051916">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_0024__p733215020199">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_0024__p18332195018199">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_0024__p2332250131919">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_02_0024__row23321950141910"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_02_0024__p73321250101911">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_0024__p633218504192">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_02_0024__p233212508192">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_02_0024__p33321450151916">Token with <strong id="iam_02_0024__b1789816136478">Security Administrator</strong> permissions.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_02_0024__section11206165016195"><h4 class="sectiontitle">Response Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0024__table1320705020191" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters in the response body</caption><thead align="left"><tr id="iam_02_0024__row143322050121913"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.1"><p id="iam_02_0024__p43327506194">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_0024__p15332195017196">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_0024__p1733219504191">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_02_0024__row1633275019194"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.1 "><p id="iam_02_0024__p73325506198"><a href="#iam_02_0024__table321455061914">password_policy</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.2 "><p id="iam_02_0024__p633225021911">object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.2.2.4.1.3 "><p id="iam_02_0024__p43323508195">Password policy.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="iam_02_0024__table321455061914"></a><a name="table321455061914"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0024__table321455061914" frame="border" border="1" rules="all"><caption><b>Table 4 </b>password_policy</caption><thead align="left"><tr id="iam_02_0024__row103321050151911"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="iam_02_0024__p1033219509193">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_0024__p933217501197">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_0024__p53321750101918">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_02_0024__row17332195021911"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0024__p203321502191">maximum_consecutive_identical_chars</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0024__p2033275051916">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0024__p1332135031920">Maximum number of times that a character is allowed to consecutively present in a password. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0024__row11332185061918"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0024__p19332750181915">maximum_password_length</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0024__p153323504192">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0024__p1332195012197">Maximum number of characters that a password can contain.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0024__row43322500194"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0024__p143321750191917">minimum_password_age</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0024__p833235011196">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0024__p0332175051918">Minimum period (minutes) after which users are allowed to make a password change. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0024__row5332350141913"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0024__p333212507199">minimum_password_length</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0024__p73321050151913">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0024__p0332950141919">Minimum number of characters that a password must contain.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0024__row1333235014196"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0024__p1733295015191">number_of_recent_passwords_disallowed</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0024__p2332105020198">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0024__p133321506193">Number of previously used passwords that are not allowed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0024__row12332115081911"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0024__p2332165071917">password_not_username_or_invert</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0024__p5332750201910">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0024__p1833225051919">Indicates whether the password can be the username or the username spelled backwards.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0024__row20332550151915"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0024__p7332135020199">password_requirements</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0024__p933275017192">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0024__p2033219502192">Characters that a password must contain.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0024__row33321250171912"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0024__p1933275031910">password_validity_period</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0024__p73321650151919">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0024__p103321503195">Password validity period (days).</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_02_0024__section1922625013197"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="iam_02_0024__screen1332155091915">GET https://sample.domain.com/v3.0/OS-SECURITYPOLICY/domains/{domain_id}/password-policy</pre>
|
|
</div>
|
|
<div class="section" id="iam_02_0024__section13228450141917"><h4 class="sectiontitle">Example Response</h4><p id="iam_02_0024__p20332050121912"><strong id="iam_02_0024__b1560045724616">Status code: 200</strong></p>
|
|
<p id="iam_02_0024__p733295013191">The request is successful.</p>
|
|
<pre class="screen" id="iam_02_0024__screen6332105013198">{
|
|
"password_policy" : {
|
|
"password_requirements" : "A password must contain at least two of the following: uppercase letters, lowercase letters, digits, and special characters.",
|
|
"minimum_password_age" : 20,
|
|
"minimum_password_length" : 8,
|
|
"maximum_password_length" : 32,
|
|
"number_of_recent_passwords_disallowed" : 2,
|
|
"password_validity_period" : 60,
|
|
"maximum_consecutive_identical_chars" : 3,
|
|
"password_not_username_or_invert" : true
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<p id="iam_02_0024__p141981357202116"><strong id="iam_02_0024__b161486594462">Status code: 403</strong></p>
|
|
<p id="iam_02_0024__p1119825712111">Access denied.</p>
|
|
<ul id="iam_02_0024__ul1719815752114"><li id="iam_02_0024__li111981457102111">Example 1</li></ul>
|
|
<pre class="screen" id="iam_02_0024__screen247642182217">{
|
|
"error_msg" : "You are not authorized to perform the requested action.",
|
|
"error_code" : "IAM.0002"
|
|
}</pre>
|
|
<ul id="iam_02_0024__ul1314925172210"><li id="iam_02_0024__li16149195192212">Example 2</li></ul>
|
|
<pre class="screen" id="iam_02_0024__screen1840012814229">{
|
|
"error_msg" : "Policy doesn't allow %(actions)s to be performed.",
|
|
"error_code" : "IAM.0003"
|
|
}</pre>
|
|
<p id="iam_02_0024__p419845716218"><strong id="iam_02_0024__b86101204712">Status code: 404</strong></p>
|
|
<p id="iam_02_0024__p119819570218">The requested resource cannot be found.</p>
|
|
<pre class="screen" id="iam_02_0024__screen12198145710214">{
|
|
"error_msg" : "Could not find %(target)s: %(target_id)s.",
|
|
"error_code" : "IAM.0004"
|
|
}</pre>
|
|
<p id="iam_02_0024__p181981057122114"><strong id="iam_02_0024__b109718419470">Status code: 500</strong></p>
|
|
<p id="iam_02_0024__p1519818576218">Internal server error.</p>
|
|
<pre class="screen" id="iam_02_0024__screen1819845752110">{
|
|
"error_msg" : "An unexpected error prevented the server from fulfilling your request.",
|
|
"error_code" : "IAM.0006"
|
|
}</pre>
|
|
<div class="section" id="iam_02_0024__section1924765051916"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0024__table1624825012192" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_02_0024__row7333155017194"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.19.2.1.3.1.1"><p id="iam_02_0024__p14333155012194">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_0024__p533355091920">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_02_0024__row1633312503190"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0024__p233345019191">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0024__p23331750121915">The request is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0024__row4333050161915"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0024__p53331950151911">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0024__p83331250201916">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0024__row16333135013199"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0024__p1233375015192">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0024__p11333950151911">Access denied.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0024__row14333145021917"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0024__p10333250121916">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0024__p12333125051913">The requested resource cannot be found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0024__row533315501199"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0024__p13331650151912">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0024__p83331250181917">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>
|
|
|