forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
67 lines
7.4 KiB
HTML
67 lines
7.4 KiB
HTML
<a name="obs_03_0131"></a><a name="obs_03_0131"></a>
|
|
|
|
<h1 class="topictitle1">Configuring the Start Time and End Time of Access to Objects in a Bucket</h1>
|
|
<div id="body1557026128762"><p id="obs_03_0131__p13527855125217">You can configure the bucket policy to limit the time when objects in a bucket are accessible. In the following example, the access time window is from 2019-03-26T12:00:00Z to 2019-03-26T15:00:00Z.</p>
|
|
<div class="section" id="obs_03_0131__section17557163019204"><h4 class="sectiontitle">Procedure</h4><ol id="obs_03_0131__en-us_topic_0056349953_ol62991470"><li id="obs_03_0131__li99821455306"><span>In the bucket list, click the bucket you want to operate. The <strong id="obs_03_0131__obs_03_0307_b1395123914108">Overview</strong> page of the bucket is displayed.</span></li><li id="obs_03_0131__li141322034115610"><span>In the navigation pane, choose <strong id="obs_03_0131__obs_03_0142_b2055212481903">Permissions</strong>.</span></li><li id="obs_03_0131__li8120153165517"><span>Choose <strong id="obs_03_0131__b07801117125512">Bucket Policies</strong> > <strong id="obs_03_0131__b1778211712552">Custom Bucket Policies</strong>.</span></li><li id="obs_03_0131__li81441540133419"><span>Click <strong id="obs_03_0131__b69922018185512">Create Bucket Policy</strong>. The <strong id="obs_03_0131__b17993141811550">Create Bucket Policy</strong> dialog box is displayed.</span></li><li id="obs_03_0131__li17931032163517"><span>Configure the parameters according to the following table:</span><p>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0131__table7531653104420" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters for authorizing the permission to access a specified bucket</caption><thead align="left"><tr id="obs_03_0131__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_0131__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_0131__p15532145310443">Value</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0131__row953216536449"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0131__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_0131__p55421614212"><strong id="obs_03_0131__b172342029135518">Customized</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0131__row16532753114417"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0131__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_0131__p26391018182813"><strong id="obs_03_0131__b143218342553">Allow</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0131__row115321753164415"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0131__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_0131__ul1133312113418"><li id="obs_03_0131__li43331311164115"><strong id="obs_03_0131__b1994283616555">Include</strong></li><li id="obs_03_0131__li23431813154117">Select <strong id="obs_03_0131__b1161253710553">Other account</strong>, and enter an asterisk (*) as the account ID, indicating all anonymous users.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0131__row653285374414"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0131__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_0131__ul12411915123314"><li id="obs_03_0131__li441291593312"><strong id="obs_03_0131__b12264540175515">Include</strong></li><li id="obs_03_0131__li696933452613">Set the resource name to <strong id="obs_03_0131__b13757423111420">*</strong>, indicating all resources in the bucket.</li></ul>
|
|
<div class="note" id="obs_03_0131__note1576062222820"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_03_0131__p157602022102820">In this example, the policy configures permissions only for resources in the bucket. If you need to configure permissions for the entire bucket (for example, the permission to list objects in the bucket), you need to create another custom bucket policy for the entire bucket.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0131__row18790945165418"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0131__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_0131__ul1691025316358"><li id="obs_03_0131__li109104535354"><strong id="obs_03_0131__b1431713433559">Include</strong></li><li id="obs_03_0131__li38571256113513">Select <strong id="obs_03_0131__b171391822161720">*</strong> as the action name, which indicates all action permissions.</li></ul>
|
|
<div class="note" id="obs_03_0131__note1413715212302"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_03_0131__p101372052133018">Selecting all action permissions may cause resources to be deleted. To avoid this risk, you are advised to set the action name to <strong id="obs_03_0131__b1051317156197">Get*</strong>, indicating all read permissions.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0131__row3328954204119"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0131__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_0131__ul4774185114612"><li id="obs_03_0131__li177741358462">Condition Operator: DateGreaterThan</li><li id="obs_03_0131__li1764818167461">Key: CurrentTime</li><li id="obs_03_0131__li295412744610">Value: 2019-03-26T12:00:00Z (UTC format)</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0131__row7578193710492"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0131__p4237154224913">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_0131__ul162371942124912"><li id="obs_03_0131__li142371442174918">Condition Operator: DateLessThan</li><li id="obs_03_0131__li172371742154914">Key: CurrentTime</li><li id="obs_03_0131__li12387424494">Value: 2019-03-26T15:00:00Z (UTC format)</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="note" id="obs_03_0131__note7950104265115"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_03_0131__p16950194245113">The preceding two conditions must be configured in the same bucket policy.</p>
|
|
</div></div>
|
|
</p></li><li id="obs_03_0131__li20063255511"><span>Click <strong id="obs_03_0131__b15799175685516">OK</strong>.</span></li></ol>
|
|
</div>
|
|
<div class="section" id="obs_03_0131__section159232335471"><h4 class="sectiontitle">Verification</h4><p id="obs_03_0131__p1589143714477">During the specified time period, any user can access the specified resources in the bucket. Outside the specified time period, only the bucket owner can access the bucket.</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>
|
|
|