doc-exports/docs/obs/umn/obs_03_0130.html
zhangyue b55201d729 OBS UMN DOC
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2024-03-18 15:39:30 +00:00

56 lines
6.1 KiB
HTML

<a name="obs_03_0130"></a><a name="obs_03_0130"></a>
<h1 class="topictitle1">Restricting Access to a Bucket for Specific Addresses</h1>
<div id="body1557026128761"><p id="obs_03_0130__p5170135082114">You can configure a bucket policy to restrict access to a bucket for specific addresses. This example describes how to deny access from clients whose IP address is in the range of <strong id="obs_03_0130__b17381718226">114.115.1.0/24</strong> to a bucket.</p>
<div class="section" id="obs_03_0130__section17557163019204"><h4 class="sectiontitle">Procedure</h4><ol id="obs_03_0130__en-us_topic_0056349953_ol62991470"><li id="obs_03_0130__li99821455306"><span>In the bucket list, click the bucket you want to operate. The <strong id="obs_03_0130__obs_03_0307_b144421021120">Overview</strong> page is displayed.</span></li><li id="obs_03_0130__li077741015611"><span>In the navigation pane, choose <strong id="obs_03_0130__obs_03_0142_b2055212481903">Permissions</strong>.</span></li><li id="obs_03_0130__li8120153165517"><span>Choose <strong id="obs_03_0130__b21707295505">Bucket Policies</strong> &gt; <strong id="obs_03_0130__b317132914502">Custom Bucket Policies</strong>.</span></li><li id="obs_03_0130__li81441540133419"><span>Click <strong id="obs_03_0130__b41911130175020">Create Bucket Policy</strong>. The <strong id="obs_03_0130__b8192230125013">Create Bucket Policy</strong> dialog box is displayed.</span></li><li id="obs_03_0130__li17931032163517"><span>Configure parameters listed in the table below.</span><p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0130__table7531653104420" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Restricting access to a bucket for specific addresses</caption><thead align="left"><tr id="obs_03_0130__row2532105311447"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.5.2.1.2.3.1.1"><p id="obs_03_0130__p16532195364414">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.5.2.1.2.3.1.2"><p id="obs_03_0130__p15532145310443">Value</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_03_0130__row953216536449"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0130__p1653265344417">Policy Mode</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.2 "><p id="obs_03_0130__p55421614212"><strong id="obs_03_0130__b38199484516">Customized</strong></p>
</td>
</tr>
<tr id="obs_03_0130__row16532753114417"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0130__p353219537448">Effect</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.2 "><p id="obs_03_0130__p26391018182813">Deny</p>
</td>
</tr>
<tr id="obs_03_0130__row115321753164415"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0130__p1553215538449">Principal</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.2 "><ul id="obs_03_0130__ul034219193595"><li id="obs_03_0130__li1834291975912"><strong id="obs_03_0130__b89101659165017">Include</strong> &gt; <strong id="obs_03_0130__b10821572511">Other account</strong></li><li id="obs_03_0130__li86471722155910">If the account ID is set to <strong id="obs_03_0130__b371945013539">*</strong>, the policy setting takes effect on all anonymous users.</li><li id="obs_03_0130__li1817212615912">Leave the user ID blank.</li></ul>
</td>
</tr>
<tr id="obs_03_0130__row653285374414"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0130__p753212538444">Resources</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.2 "><ul id="obs_03_0130__ul12411915123314"><li id="obs_03_0130__li441291593312"><strong id="obs_03_0130__b8351230522">Include</strong></li><li id="obs_03_0130__li13216171773317">Leave the field blank, indicating the policy takes effect on the entire bucket.</li></ul>
</td>
</tr>
<tr id="obs_03_0130__row18790945165418"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0130__p12791194519544">Actions</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.2 "><ul id="obs_03_0130__ul1691025316358"><li id="obs_03_0130__li109104535354"><strong id="obs_03_0130__b594281345212">Include</strong></li><li id="obs_03_0130__li38571256113513">Select the asterisk (*), indicating all actions are involved.</li></ul>
</td>
</tr>
<tr id="obs_03_0130__row3328954204119"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0130__p2329115416419">Conditions</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.2 "><ul id="obs_03_0130__ul4774185114612"><li id="obs_03_0130__li177741358462"><strong id="obs_03_0130__b510854380">Conditional Operator</strong>: <strong id="obs_03_0130__b1548105942">IpAddress</strong></li><li id="obs_03_0130__li1764818167461"><strong id="obs_03_0130__b416891529">Key</strong>: <strong id="obs_03_0130__b1980875416">SourceIP</strong></li><li id="obs_03_0130__li295412744610"><strong id="obs_03_0130__b1912124816313">Value</strong>: <strong id="obs_03_0130__b158527333177">114.115.1.0/24</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="obs_03_0130__li20063255511"><span>Click <strong id="obs_03_0130__b719094716521">OK</strong>.</span></li></ol>
</div>
<div class="section" id="obs_03_0130__section159232335471"><h4 class="sectiontitle">Verification</h4><p id="obs_03_0130__p1589143714477">Initiate an access request from an IP address in the range of <strong id="obs_03_0130__b6378127163111">114.115.1.0/24</strong>. The access is denied. Initiate an access request from an IP address beyond the range of <strong id="obs_03_0130__b13944161019320">114.115.1.0/24</strong>. The access is allowed.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0127.html">Application Cases</a></div>
</div>
</div>