forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
75 lines
12 KiB
HTML
75 lines
12 KiB
HTML
<a name="obs_40_0023"></a><a name="obs_40_0023"></a>
|
|
|
|
<h1 class="topictitle1">Granting IAM User Groups Specific Permissions on Specific 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 specific operation permissions on specific OBS resources (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">Use an IAM custom policy to configure the permissions.</p>
|
|
</div>
|
|
<div class="section" id="obs_40_0023__section786219432319"><h4 class="sectiontitle">Precautions</h4><p id="obs_40_0023__p817120327254">After configuration, IAM user groups can perform allowed operations using APIs. If they log in to OBS Console or OBS Browser+ to perform those operations, a message will be displayed indicating that they do not have required permissions.</p>
|
|
<p id="obs_40_0023__p2095722518592">When they log in to OBS Console or OBS Browser+, APIs (such as <strong id="obs_40_0023__b34331469166">ListAllMyBuckets</strong> and <strong id="obs_40_0023__b13433194621618">ListBucket</strong>) are called to load the bucket list and object list and some other APIs will also be called on other pages, but their permissions do not cover those APIs. In such case, the message is diplayed.</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>.</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 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">Enter a policy name.</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">Select one based on your own habits. <strong id="obs_40_0023__b77688415919">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">[Format]</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 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. Examples are given as follows:</p>
|
|
<ul id="obs_40_0023__ul5609041191715"><li id="obs_40_0023__li389817471171"><strong id="obs_40_0023__b10899184761711">obs:*:*:bucket:</strong><strong id="obs_40_0023__b1489924721718">*</strong> (indicating any OBS bucket)</li><li id="obs_40_0023__li2060984191712"><strong id="obs_40_0023__b13659863294">obs:*:*:bucket:examplebucket</strong> (indicating that the policy applies to bucket <strong id="obs_40_0023__b109899017816">examplebucket</strong>)</li></ul>
|
|
<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">[Format]</p>
|
|
<p id="obs_40_0023__p1925689183116">Objects in a specified directory: <strong id="obs_40_0023__b19991655085">obs:*:*:object:</strong><em id="obs_40_0023__i052751113910">Bucket name</em><strong id="obs_40_0023__b1170011142091">/</strong><em id="obs_40_0023__i19757131614910">Prefix</em><strong id="obs_40_0023__b2076831914912">/*</strong></p>
|
|
<p id="obs_40_0023__p12557181110459">Specified object: <strong id="obs_40_0023__b934634918916">obs:*:*:object:</strong><em id="obs_40_0023__i1764535519910">Bucket name</em><strong id="obs_40_0023__b128853562918">/</strong><em id="obs_40_0023__i264518555918">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. Examples are given as follows:</p>
|
|
<ul id="obs_40_0023__ul1749611911817"><li id="obs_40_0023__li164971619121811"><strong id="obs_40_0023__b528922915117">obs:*:*:object:my-bucket/my-object/*</strong> (indicating any object in the <strong id="obs_40_0023__b18289529141116">my-object</strong> directory of bucket <strong id="obs_40_0023__b1289152921112">my-bucket</strong>)</li><li id="obs_40_0023__li10610192691814"><strong id="obs_40_0023__b12668105469">obs:*:*:object:</strong><strong id="obs_40_0023__b1566910154617">my-bucket/exampleobject</strong> (indicating object <strong id="obs_40_0023__b20792171571216">exampleobject</strong> in bucket <strong id="obs_40_0023__b1716812282124">my-bucket</strong>)</li></ul>
|
|
</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__b8111135943212">OK</strong>.</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">Apply 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><a href="https://docs.otc.t-systems.com/en-us/usermanual/iam/iam_01_0031.html" target="_blank" rel="noopener noreferrer">Add the IAM user you want to authorize to the created 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.</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>
|
|
|