doc-exports/docs/obs/perms-cfg/obs_40_0032.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

46 lines
5.6 KiB
HTML

<a name="obs_40_0032"></a><a name="obs_40_0032"></a>
<h1 class="topictitle1">Granting Anonymous Users Public Read Permissions on a Directory</h1>
<div id="body1588765301379"><div class="section" id="obs_40_0032__section10302454102718"><h4 class="sectiontitle">Scenario</h4><p id="obs_40_0032__p016716217280">If all objects in a folder need to be accessible to anonymous users, you can configure a bucket policy to grant anonymous users the permission to access the folder.</p>
</div>
<div class="section" id="obs_40_0032__section786219432319"><h4 class="sectiontitle">Configuration Precautions</h4><p id="obs_40_0032__p1436151622312">The preset read-only mode of OBS has the following permissions:</p>
<ul id="obs_40_0032__ul12273198112311"><li id="obs_40_0032__li1327378202314">GetObject: downloading objects</li><li id="obs_40_0032__li127318812235">GetObjectVersion: downloading versioned objects</li></ul>
</div>
<div class="section" id="obs_40_0032__section14782838103419"><h4 class="sectiontitle">Procedure</h4><ol id="obs_40_0032__ol1570512004013"><li id="obs_40_0032__li973618915320"><span>In the navigation pane of OBS Console, choose <strong id="obs_40_0032__b8597891590">Object Storage</strong>.</span></li><li id="obs_40_0032__li143061822104011"><span>In the bucket list, click the bucket name you want to go to the <strong id="obs_40_0032__b1050710528386">Overview</strong> page.</span></li><li id="obs_40_0032__li125741927104010"><span>In the navigation pane, choose <strong id="obs_40_0032__b1576953414713">Permissions</strong>.</span></li><li id="obs_40_0032__li49461065486"><span>On the <strong id="obs_40_0032__b1489519200362">Bucket Policies</strong> page, click <strong id="obs_40_0032__b1089592019365">Create Bucket Policy</strong> under <strong id="obs_40_0032__b989662017360">Custom Bucket Policies</strong>.</span></li><li id="obs_40_0032__li2143744184017"><span>Configure parameters according to the following table, so that you can grant anonymous users the permission to access the folder and objects in it.</span><p><div class="fignone" id="obs_40_0032__fig6569962519"><span class="figcap"><b>Figure 1 </b>Granting public read permissions on a specific directory for anonymous users</span><br><span><img id="obs_40_0032__image956918645119" src="en-us_image_0000001436146565.png"></span></div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_40_0032__table2481197162816" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters for granting the permission to access a specified directory</caption><thead align="left"><tr id="obs_40_0032__row64826712819"><th align="left" class="cellrowborder" valign="top" width="31.71%" id="mcps1.3.3.2.5.2.2.2.3.1.1"><p id="obs_40_0032__p154822742816">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68.28999999999999%" id="mcps1.3.3.2.5.2.2.2.3.1.2"><p id="obs_40_0032__p348297102815">Value</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_40_0032__row1148237162814"><td class="cellrowborder" valign="top" width="31.71%" headers="mcps1.3.3.2.5.2.2.2.3.1.1 "><p id="obs_40_0032__p1348207182816">Policy Mode</p>
</td>
<td class="cellrowborder" valign="top" width="68.28999999999999%" headers="mcps1.3.3.2.5.2.2.2.3.1.2 "><p id="obs_40_0032__p174828712280">Select <strong id="obs_40_0032__b213864775734844">Read-only</strong>.</p>
</td>
</tr>
<tr id="obs_40_0032__row1248257102810"><td class="cellrowborder" valign="top" width="31.71%" headers="mcps1.3.3.2.5.2.2.2.3.1.1 "><p id="obs_40_0032__p1848237112812">Principal</p>
</td>
<td class="cellrowborder" valign="top" width="68.28999999999999%" headers="mcps1.3.3.2.5.2.2.2.3.1.2 "><ul id="obs_40_0032__ul165818244347"><li id="obs_40_0032__li1024761941819">Choose <strong id="obs_40_0032__b22071319115415">Include</strong> &gt; <strong id="obs_40_0032__b1976619136555">Cloud service user</strong>.</li><li id="obs_40_0032__li4245545161814"><strong id="obs_40_0032__b1617217618472">Account ID</strong>: Enter <strong id="obs_40_0032__b10172564478">*</strong> to indicate all anonymous users.</li></ul>
</td>
</tr>
<tr id="obs_40_0032__row14826742812"><td class="cellrowborder" valign="top" width="31.71%" headers="mcps1.3.3.2.5.2.2.2.3.1.1 "><p id="obs_40_0032__p248287202815">Resources</p>
</td>
<td class="cellrowborder" valign="top" width="68.28999999999999%" headers="mcps1.3.3.2.5.2.2.2.3.1.2 "><ul id="obs_40_0032__ul1546684213419"><li id="obs_40_0032__li1846617424342"><strong id="obs_40_0032__b197173940834844">Include</strong></li><li id="obs_40_0032__li1046624217342">Select <strong id="obs_40_0032__b38593620234844">Specific resources</strong>.</li><li id="obs_40_0032__li8466144263418">Set this parameter to all objects in the selected folder. If the folder name is <strong id="obs_40_0032__b114874976234844">folder-001</strong>, enter the value <strong id="obs_40_0032__b161441472534844">folder-001/*</strong>.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="obs_40_0032__li87481350183513"><span>Click <strong id="obs_40_0032__b105394746634845">OK</strong>.</span></li></ol>
</div>
<div class="section" id="obs_40_0032__section1799221134111"><h4 class="sectiontitle">Verification</h4><p id="obs_40_0032__p1978945810533">After the permission is set, click an object in the folder. Its URL is displayed under <strong id="obs_40_0032__b232711344153">Link</strong>. Share the URL over the Internet, so that all users can access or download the object through the Internet.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_40_0030.html">Granting Permissions to Anonymous Users</a></div>
</div>
</div>