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>
202 lines
13 KiB
HTML
202 lines
13 KiB
HTML
<a name="iam_08_0019"></a><a name="iam_08_0019"></a>
|
|
|
|
<h1 class="topictitle1">Creating a Virtual MFA Device</h1>
|
|
<div id="body1604926565941"><div class="section" id="iam_08_0019__section1681425414513"><h4 class="sectiontitle">Function</h4><p id="iam_08_0019__p18875185444513">This API is provided for IAM users to create a virtual MFA device.</p>
|
|
</div>
|
|
<div class="section" id="iam_08_0019__section4814454194518"><h4 class="sectiontitle">URI</h4><p id="iam_08_0019__p2875185414515">POST /v3.0/OS-MFA/virtual-mfa-devices</p>
|
|
</div>
|
|
<div class="section" id="iam_08_0019__section381416548457"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0019__table19815754194511" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters in the request header</caption><thead align="left"><tr id="iam_08_0019__row1287575424520"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="iam_08_0019__p68751654114515">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="iam_08_0019__p19875195484512">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_0019__p1687518549458">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="iam_08_0019__p887525419455">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0019__row587525434510"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_08_0019__p287545418452">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="iam_08_0019__p1187565417453">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_08_0019__p9875654144517">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_08_0019__p517518071411">Token (no special permission requirements) of the IAM user corresponding to the <strong id="iam_08_0019__b8908632258">user_id</strong> specified in the request body.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0019__table16818554124518" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request body</caption><thead align="left"><tr id="iam_08_0019__row8875145414515"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="iam_08_0019__p1387575434519">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="iam_08_0019__p19875155484513">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="iam_08_0019__p1687595434512">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="iam_08_0019__p16875105419458">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0019__row88751154114511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="iam_08_0019__p10875125411457"><a href="#iam_08_0019__table12820145444514">virtual_mfa_device</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="iam_08_0019__p13875454204510">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="iam_08_0019__p3875105417452">object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="iam_08_0019__p4875054204517">MFA device information.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="iam_08_0019__table12820145444514"></a><a name="table12820145444514"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0019__table12820145444514" frame="border" border="1" rules="all"><caption><b>Table 3 </b>virtual_mfa_device</caption><thead align="left"><tr id="iam_08_0019__row18751454184511"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="iam_08_0019__p1875954174511">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="iam_08_0019__p16875125415456">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="iam_08_0019__p1887665415459">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="iam_08_0019__p15876205417452">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0019__row78762548452"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="iam_08_0019__p20876154184515">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="iam_08_0019__p178762543450">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="iam_08_0019__p1287675494512">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="iam_08_0019__p8876195414459">Device name.</p>
|
|
<p id="iam_08_0019__p11876135484516">Minimum length: 1 character</p>
|
|
<p id="iam_08_0019__p48761554144517">Maximum length: 64 characters</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0019__row14876145411453"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="iam_08_0019__p987695412452">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="iam_08_0019__p18762542459">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="iam_08_0019__p587610545451">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="iam_08_0019__p1987645424511">ID of the user for whom you will create the MFA device.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_08_0019__section18824254144511"><h4 class="sectiontitle">Response Parameters</h4><p id="iam_08_0019__p1876954134513"><strong id="iam_08_0019__b1644593216444">Status code: 201</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0019__table178241354144519" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Parameters in the response body</caption><thead align="left"><tr id="iam_08_0019__row487611549453"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="iam_08_0019__p58769541452">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_0019__p11876054184510">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_0019__p187685410455">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0019__row1287675410454"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_08_0019__p1787605464519"><a href="#iam_08_0019__table782775454511">virtual_mfa_device</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_08_0019__p58761054104513">object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_08_0019__p9876175415452">MFA device information.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="iam_08_0019__table782775454511"></a><a name="table782775454511"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0019__table782775454511" frame="border" border="1" rules="all"><caption><b>Table 5 </b>virtual_mfa_device</caption><thead align="left"><tr id="iam_08_0019__row4876125484515"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="iam_08_0019__p3876175415458">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_0019__p4876135410456">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_0019__p1587615413452">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0019__row58765549458"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_08_0019__p10876454124519">serial_number</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_08_0019__p1087614548452">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_08_0019__p138764547453">Serial number of the MFA device.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0019__row17876145410452"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_08_0019__p4876754144513">base32_string_seed</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_08_0019__p11876454144520">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_08_0019__p1387625415457">Base32 seed, which a third-party system can use to generate a CAPTCHA code.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_08_0019__section5830205434511"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="iam_08_0019__screen887685420455">POST https://sample.domain.com/v3.0/OS-MFA/virtual-mfa-devices
|
|
|
|
{
|
|
"virtual_mfa_device" : {
|
|
"name" : "{device_name}",
|
|
"user_id" : "09f99d8f6a001d4f1f01c00c31968..."
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="iam_08_0019__section283265417454"><h4 class="sectiontitle">Example Response</h4><p id="iam_08_0019__p15429101717407"><strong id="iam_08_0019__b11779111315011">Status code: 201</strong></p>
|
|
<p id="iam_08_0019__p14669162314014">The request is successful.</p>
|
|
<pre class="screen" id="iam_08_0019__screen195082018248">{
|
|
"virtual_mfa_device": {
|
|
"serial_number": "iam:09f6bd6a96801de40f01c00c85691...:mfa/{device_name}",
|
|
"base32_string_seed": "{string}"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="iam_08_0019__section10832454134519"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0019__table1156113351521" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_08_0019__row16077351226"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="iam_08_0019__p1260719351728">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="iam_08_0019__p76071235922">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0019__row176078352216"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0019__p260793515220">201</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0019__p56071535121">The request is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0019__row196076351427"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0019__p1560719355219">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0019__p19607143515214">The request is invalid.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0019__row1617584845219"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0019__p1652019501377">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0019__p552075016378">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0019__row176073357217"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0019__p13607193520215">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0019__p116075351625">You do not have permission to perform this action.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0019__row179524545296"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0019__p19521454102912">409</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0019__p4237326145711">A conflict occurs when the requested resource is saved.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0019__row160712352215"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0019__p1760712351628">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0019__p36078353214">A system error occurred.</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>
|
|
|