forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
74 lines
11 KiB
HTML
74 lines
11 KiB
HTML
<a name="obs_40_0023"></a><a name="obs_40_0023"></a>
|
|
|
|
<h1 class="topictitle1">Granting IAM User Groups Specified Permissions on Certain OBS Resources</h1>
|
|
<div id="body1588765301379"><div class="section" id="obs_40_0023__section43491717165116"><h4 class="sectiontitle">Scenario</h4><p id="obs_40_0023__p3431154410448">This topic describes how to grant certain operation permissions on specific OBS resources (can be a bucket or an object) to multiple IAM users or user groups.</p>
|
|
</div>
|
|
<div class="section" id="obs_40_0023__section106520378518"><h4 class="sectiontitle">Recommended Configuration</h4><p id="obs_40_0023__p103657437515">IAM custom policies</p>
|
|
</div>
|
|
<div class="section" id="obs_40_0023__section786219432319"><h4 class="sectiontitle">Configuration Precautions</h4><p id="obs_40_0023__p817120327254">After the configuration is complete, you can perform allowed operations using APIs. However, if you log in to OBS Console or OBS Browser+ to perform those operations, an error is reported indicating that you do not have required permissions.</p>
|
|
<p id="obs_40_0023__p2095722518592">This is because when you log in to OBS Console or OBS Browser+, APIs (such as <strong id="obs_40_0023__b1130515291818">ListAllMyBuckets</strong> and <strong id="obs_40_0023__b137993304820">ListBucket</strong>) are called to load the bucket list and object list and some other APIs will also be called on other pages, but your permissions do not cover those APIs. In such case, your access to OBS Console or OBS Browser+ is denied or your operation is not allowed.</p>
|
|
<p id="obs_40_0023__p7807163365117">To allow IAM users to operate buckets and objects on OBS Console or OBS Browser+, add at least the <strong id="obs_40_0023__b1611149202711">obs:bucket:ListAllMyBuckets</strong> and <strong id="obs_40_0023__b86122918270">obs:bucket:ListBucket</strong> permissions to the custom policy.</p>
|
|
<div class="note" id="obs_40_0023__note5566228165219"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_40_0023__p1518015112445"><strong id="obs_40_0023__b12487175316569">obs:bucket:ListAllMyBuckets</strong> applies to all resources. You need to select all resources.</p>
|
|
<p id="obs_40_0023__p256692825216"><strong id="obs_40_0023__b272951591913">obs:bucket:ListBucket</strong> applies only to the authorized bucket. You can select all resources or a specified bucket as needed.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="obs_40_0023__section1976313561854"><h4 class="sectiontitle">Procedure</h4><ol id="obs_40_0023__ol170633855216"><li id="obs_40_0023__li10432131493113"><span>Log in to the management console using a cloud service account.</span></li><li id="obs_40_0023__li625685643115"><span>On the top menu bar, choose <strong id="obs_40_0023__b4329163635612">Service List</strong> > <strong id="obs_40_0023__b183291636155616">Management & Deployment</strong> > <strong id="obs_40_0023__b123291436185618">Identity and Access Management</strong>. The IAM console is displayed.</span></li><li id="obs_40_0023__li1848615103345"><span>In the navigation pane, choose <strong id="obs_40_0023__b742013972818">Permissions</strong>.</span></li><li id="obs_40_0023__li1388483016366"><span>Click <strong id="obs_40_0023__b819614439565">Create Custom Policy</strong> in the upper right corner.</span></li><li id="obs_40_0023__li1161395452712"><span>Configure parameters for a custom policy.</span><p><div class="fignone" id="obs_40_0023__fig108170917818"><span class="figcap"><b>Figure 1 </b>Configuring a custom policy</span><br><span><img id="obs_40_0023__image18181994819" src="en-us_image_0000001385859230.png"></span></div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_40_0023__table6375112782815" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters for configuring a custom policy</caption><thead align="left"><tr id="obs_40_0023__row6375927132818"><th align="left" class="cellrowborder" valign="top" width="25.25%" id="mcps1.3.4.2.5.2.2.2.3.1.1"><p id="obs_40_0023__p23757272286"><strong id="obs_40_0023__b138822153645142">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="74.75%" id="mcps1.3.4.2.5.2.2.2.3.1.2"><p id="obs_40_0023__p63751027152820"><strong id="obs_40_0023__b81592296045142">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_40_0023__row17375102752819"><td class="cellrowborder" valign="top" width="25.25%" headers="mcps1.3.4.2.5.2.2.2.3.1.1 "><p id="obs_40_0023__p1737572772816">Policy Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="74.75%" headers="mcps1.3.4.2.5.2.2.2.3.1.2 "><p id="obs_40_0023__p83758278280">Name of the custom policy</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_40_0023__row1937592712288"><td class="cellrowborder" valign="top" width="25.25%" headers="mcps1.3.4.2.5.2.2.2.3.1.1 "><p id="obs_40_0023__p173753272284">Policy View</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="74.75%" headers="mcps1.3.4.2.5.2.2.2.3.1.2 "><p id="obs_40_0023__p17375102714285">Set this parameter based on your own habits. <strong id="obs_40_0023__b4289123041619">Visual editor</strong> is used here.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_40_0023__row133751227142812"><td class="cellrowborder" valign="top" width="25.25%" headers="mcps1.3.4.2.5.2.2.2.3.1.1 "><p id="obs_40_0023__p203751027172816">Policy Content</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="74.75%" headers="mcps1.3.4.2.5.2.2.2.3.1.2 "><p id="obs_40_0023__p1928318374535">[Permission 1] It is mandatory when an authorized user needs to perform operations on OBS Console or OBS Browser+.</p>
|
|
<ul id="obs_40_0023__ul1488325514462"><li id="obs_40_0023__li10883125510469">Select <strong id="obs_40_0023__b88976299145142">Allow</strong>.</li><li id="obs_40_0023__li988318554466">Select <strong id="obs_40_0023__b151943995545142">Object Storage Service (OBS)</strong>.</li><li id="obs_40_0023__li19883155554614">Select <strong id="obs_40_0023__b12727183314324">obs:bucket:ListAllMyBuckets</strong> from the actions.</li><li id="obs_40_0023__li1991741116547">Select <strong id="obs_40_0023__b153479408322">All</strong> for resources.</li></ul>
|
|
<p id="obs_40_0023__p148511375414">[Permission 2]</p>
|
|
<ul id="obs_40_0023__ul127691549205313"><li id="obs_40_0023__li167691496533">Select <strong id="obs_40_0023__b74938556745142">Allow</strong>.</li><li id="obs_40_0023__li1676910494536">Select <strong id="obs_40_0023__b145468528145142">Object Storage Service (OBS)</strong>.</li><li id="obs_40_0023__li7820139488">Select the actions to be authorized.</li><li id="obs_40_0023__li77691949175310">Choose <strong id="obs_40_0023__b35010192029">Specific resources</strong> > <strong id="obs_40_0023__b4258125924">Bucket</strong> to specify bucket resources.<p id="obs_40_0023__p4392013822"><span style="color:#3D3F43;">[Format]</span></p>
|
|
<p id="obs_40_0023__p9933155311298"><strong id="obs_40_0023__b17700193119537">obs:*:*:bucket:</strong><em id="obs_40_0023__i102229783545142">bucket name</em></p>
|
|
<p id="obs_40_0023__p14703335307">[Note]</p>
|
|
<p id="obs_40_0023__p9142175873014">For bucket resources, IAM automatically generates the prefix of the resource path: <strong style="color:#3D3F43;" id="obs_40_0023__b123687613345142">obs:*:*:bucket:</strong>.</p>
|
|
<p id="obs_40_0023__p17463217363">For the path of a specific bucket, add the <em id="obs_40_0023__i27889316645142">bucket name</em> to the end. You can also add a wildcard character (*) to indicate any bucket. Example:</p>
|
|
<p id="obs_40_0023__p129731439193114"><strong style="color:#3D3F43;" id="obs_40_0023__b177524031545142">obs:*:*:bucket:</strong><strong style="color:#3D3F43;" id="obs_40_0023__b24859914545142">*</strong>, indicating any OBS bucket.</p>
|
|
<p id="obs_40_0023__p07854412554">To perform operations on OBS Console or OBS Browser+, grant the<strong id="obs_40_0023__b1392303593417"> obs:bucket:ListBucket</strong> permission to a specified bucket.</p>
|
|
</li><li id="obs_40_0023__li68704665514">Choose <strong id="obs_40_0023__b1294597612">Specific resources</strong> > <strong id="obs_40_0023__b63881013665">Object</strong> to specify an object resource.<p id="obs_40_0023__p325619913310"><span style="color:#3D3F43;">[Format]</span></p>
|
|
<p id="obs_40_0023__p1925689183116"><span style="color:#3D3F43;">obs:*:*:object:</span><em style="color:#3D3F43;" id="obs_40_0023__i50449033345142">bucket name/object name</em></p>
|
|
<p id="obs_40_0023__p182561698314">[Note]</p>
|
|
<p id="obs_40_0023__p770393763415">For object resources, IAM automatically generates the prefix of the resource path: <strong id="obs_40_0023__b132313378445142">obs:*:*:object:</strong></p>
|
|
<p id="obs_40_0023__p181983113519">For the path of a specific object, add the <em id="obs_40_0023__i187486116645142">bucket name/object name</em> to the end. You can also add a wildcard character (*) to indicate any object in a bucket. Example:</p>
|
|
<p id="obs_40_0023__p161341247133614"><strong id="obs_40_0023__b51485814945142">obs:*:*:object:my-bucket/my-object/*</strong>: any object in the <strong id="obs_40_0023__b211828846445142">my-object</strong> directory of the <strong id="obs_40_0023__b134773144545142">my-bucket</strong> bucket.</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_40_0023__row16191536115219"><td class="cellrowborder" valign="top" width="25.25%" headers="mcps1.3.4.2.5.2.2.2.3.1.1 "><p id="obs_40_0023__p83756273285">Scope</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="74.75%" headers="mcps1.3.4.2.5.2.2.2.3.1.2 "><p id="obs_40_0023__p1037542711283">The default value is <strong id="obs_40_0023__b297125014510">Global services</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</p></li><li id="obs_40_0023__li1293324623719"><span>Click <strong id="obs_40_0023__b87622676045142">OK</strong>. The custom policy is created.</span></li><li id="obs_40_0023__li81339157389"><span><a href="https://docs.otc.t-systems.com/en-us/usermanual/iam/iam_01_0030.html" target="_blank" rel="noopener noreferrer">Create a user group and assign permissions</a>.</span><p><p id="obs_40_0023__p1312812258417">Add the created custom policy to the user group by following the instructions in the IAM document.</p>
|
|
</p></li><li id="obs_40_0023__li12273529113919"><span>Add the IAM user you want to authorize to the created user group by referring to <a href="https://docs.otc.t-systems.com/en-us/usermanual/iam/iam_01_0031.html" target="_blank" rel="noopener noreferrer">Creating a User and Adding the User to a User Group</a>.</span><p><div class="note" id="obs_40_0023__note1402619155515"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_40_0023__p37253183814">Due to data caching, it takes about 10 to 15 minutes for a custom policy to take effect after the authorization.</p>
|
|
</div></div>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_40_0019.html">Granting Permissions to Multiple IAM Users or User Groups Under the Account</a></div>
|
|
</div>
|
|
</div>
|
|
|