doc-exports/docs/obs/perms-cfg/obs_40_0029.html
zhangyue 32b9354795 OBS PERMS DOC
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>
2023-04-18 07:48:10 +00:00

63 lines
8.4 KiB
HTML

<a name="obs_40_0029"></a><a name="obs_40_0029"></a>
<h1 class="topictitle1">Granting an Account the Specified Permissions on Certain Objects</h1>
<div id="body1588765301379"><div class="section" id="obs_40_0029__section43491717165116"><h4 class="sectiontitle">Scenario</h4><p id="obs_40_0029__p1829466339">This case describes how to grant other accounts the specified operation permission on a specified object in an OBS bucket. The following describes how to grant the permission to download an object.</p>
<p id="obs_40_0029__p131221236151420">If you need to configure other permissions, select the corresponding actions from the <strong id="obs_40_0029__b100374449134854">Action Name</strong> drop-down list in the bucket policy. For details about the actions supported by OBS, see <a href="obs_40_0041.html#obs_40_0041__en-us_topic_0118394684_section1623516525350">Action/NotAction</a>.</p>
<p id="obs_40_0029__p3431154410448">For details about how to grant permissions to an IAM user, see <a href="obs_40_0027.html">Granting IAM Users Under an Account the Access to a Bucket and Resources in the Bucket</a>.</p>
</div>
<div class="section" id="obs_40_0029__section106520378518"><h4 class="sectiontitle">Recommended Configuration</h4><p id="obs_40_0029__p103657437515">You are advised to use bucket policies to grant permissions to other accounts.</p>
</div>
<div class="section" id="obs_40_0029__section786219432319"><h4 class="sectiontitle">Configuration Precautions</h4><p id="obs_40_0029__p4883191595712">After the configuration is complete, you can download objects using APIs. However, if you log in to OBS Console or OBS Browser+ to download an object, an error is reported indicating that you do not have required permissions.</p>
<p id="obs_40_0029__p3603656113417">This is because when you log in to OBS Console or OBS Browser+, APIs (such as <strong id="obs_40_0029__b787091743816">ListAllMyBuckets</strong> and <strong id="obs_40_0029__b64222195381">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 is denied or your operation is not allowed.</p>
</div>
<div class="section" id="obs_40_0029__section18368164564"><h4 class="sectiontitle">Procedure</h4><ol id="obs_40_0029__ol170633855216"><li id="obs_40_0029__li973618915320"><span>In the navigation pane of OBS Console, choose <strong id="obs_40_0029__b1591195314582">Object Storage</strong>.</span></li><li id="obs_40_0029__li11242915363"><span>In the bucket list, click the bucket name you want to go to the <strong id="obs_40_0029__b14813156103712">Overview</strong> page.</span></li><li id="obs_40_0029__li13508181724617"><span>In the navigation pane, choose <strong id="obs_40_0029__b10759142594616">Permissions</strong>.</span></li><li id="obs_40_0029__li49461065486"><span>On the <strong id="obs_40_0029__b99977311234">Bucket Policies</strong> page, click <strong id="obs_40_0029__b499853111312">Create Bucket Policy</strong> under <strong id="obs_40_0029__b109980314316">Custom Bucket Policies</strong>.</span></li><li id="obs_40_0029__li3552175452220"><span>Configure parameters for a bucket policy.</span><p><div class="fignone" id="obs_40_0029__fig0845620144418"><span class="figcap"><b>Figure 1 </b>Configuring parameters for a bucket policy</span><br><span><img id="obs_40_0029__image1984812015445" src="en-us_image_0000001386185594.png"></span></div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_40_0029__table374341792315" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters for creating a bucket policy</caption><thead align="left"><tr id="obs_40_0029__row27504174239"><th align="left" class="cellrowborder" valign="top" width="23.599999999999998%" id="mcps1.3.4.2.5.2.2.2.3.1.1"><p id="obs_40_0029__p107559176234"><strong id="obs_40_0029__b118020145734854">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="76.4%" id="mcps1.3.4.2.5.2.2.2.3.1.2"><p id="obs_40_0029__p1976317170239"><strong id="obs_40_0029__b195497138634854">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="obs_40_0029__row1246385816164"><td class="cellrowborder" valign="top" width="23.599999999999998%" headers="mcps1.3.4.2.5.2.2.2.3.1.1 "><p id="obs_40_0029__p04631584161">Policy Mode</p>
</td>
<td class="cellrowborder" valign="top" width="76.4%" headers="mcps1.3.4.2.5.2.2.2.3.1.2 "><p id="obs_40_0029__p19463175819166">Select <strong id="obs_40_0029__b107684298334854">Customized</strong>.</p>
</td>
</tr>
<tr id="obs_40_0029__row169652214311"><td class="cellrowborder" valign="top" width="23.599999999999998%" headers="mcps1.3.4.2.5.2.2.2.3.1.1 "><p id="obs_40_0029__p136964228313">Effect</p>
</td>
<td class="cellrowborder" valign="top" width="76.4%" headers="mcps1.3.4.2.5.2.2.2.3.1.2 "><p id="obs_40_0029__p106961221034">Select <strong id="obs_40_0029__b16179744334854">Allow</strong>.</p>
</td>
</tr>
<tr id="obs_40_0029__row8783617122317"><td class="cellrowborder" valign="top" width="23.599999999999998%" headers="mcps1.3.4.2.5.2.2.2.3.1.1 "><p id="obs_40_0029__p478519172231">Principal</p>
</td>
<td class="cellrowborder" valign="top" width="76.4%" headers="mcps1.3.4.2.5.2.2.2.3.1.2 "><ul id="obs_40_0029__ul1341145419174"><li id="obs_40_0029__li6417546174">Select <strong id="obs_40_0029__b26863363234854">Include</strong> &gt; <strong id="obs_40_0029__b157525699634854">Other account</strong>.</li><li id="obs_40_0029__li106259549386"><strong id="obs_40_0029__b1928953110544">Account ID</strong>: Enter the ID of the account which you want to grant permissions to. You can obtain it from the <strong id="obs_40_0029__b112897315540">My Credentials</strong> page of the account.</li><li id="obs_40_0029__li1530533711817"><strong id="obs_40_0029__b88083778734854">User ID</strong>: Enter the account ID, which can be obtained from the <strong id="obs_40_0029__b135638497834854">My Credentials</strong> page of the account.<div class="note" id="obs_40_0029__note8498202544611"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_40_0029__p15498192594615">In this example, permissions are granted to an account, excluding any IAM user under the account. Therefore, the user ID is the same as the account ID.</p>
</div></div>
</li></ul>
</td>
</tr>
<tr id="obs_40_0029__row081741752319"><td class="cellrowborder" valign="top" width="23.599999999999998%" headers="mcps1.3.4.2.5.2.2.2.3.1.1 "><p id="obs_40_0029__p15821617102320">Resources</p>
</td>
<td class="cellrowborder" valign="top" width="76.4%" headers="mcps1.3.4.2.5.2.2.2.3.1.2 "><ul id="obs_40_0029__ul15636626173616"><li id="obs_40_0029__li1963652623617">Choose <strong id="obs_40_0029__b118248141834854">Include</strong> &gt; <strong id="obs_40_0029__b39214308434854">Specific resources</strong>.</li><li id="obs_40_0029__li1338101719199"><strong id="obs_40_0029__b70432035734854">Resource Name</strong>: Enter the object or the set of objects that will be accessed.<p id="obs_40_0029__p12830717162315">For one object, enter <em id="obs_40_0029__i383261716237">object name</em>.</p>
<p id="obs_40_0029__p68341917112319">For a set of objects, enter <em id="obs_40_0029__i17317115934854">object name prefix + *, * + object name suffix, or *</em>.</p>
</li></ul>
</td>
</tr>
<tr id="obs_40_0029__row3951641158"><td class="cellrowborder" valign="top" width="23.599999999999998%" headers="mcps1.3.4.2.5.2.2.2.3.1.1 "><p id="obs_40_0029__p10952134114519">Actions</p>
</td>
<td class="cellrowborder" valign="top" width="76.4%" headers="mcps1.3.4.2.5.2.2.2.3.1.2 "><ul id="obs_40_0029__ul1663065817513"><li id="obs_40_0029__li1563025812519"><strong id="obs_40_0029__b193520098934854">Include</strong></li><li id="obs_40_0029__li10224301466">Action Name: Select <strong id="obs_40_0029__b132905828534854">GetObject</strong>.</li></ul>
<p id="obs_40_0029__p175400381720">To configure other permissions, select the corresponding actions. For details about the actions supported by OBS, see <a href="obs_40_0041.html#obs_40_0041__en-us_topic_0118394684_section1623516525350">Action/NotAction</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="obs_40_0029__li4406132611218"><span>Click <strong id="obs_40_0029__b164104890034854">OK</strong>. The bucket policy is created.</span></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_40_0024.html">Granting Permissions to Other Accounts</a></div>
</div>
</div>