Configuring a Custom Bucket Policy
If you want to grant special permissions to specific users, you can configure custom bucket policies. If a standard bucket policy conflicts with a custom bucket policy, the authorization priority is given to the custom bucket policy and then the standard bucket policy.
Procedure
- In the bucket list, click the bucket to be operated. The Overview page of the bucket is displayed.
- In the navigation pane on the left, click Permissions to go to the permission management page.
- On the Bucket Policies tab page, configure a custom bucket policy according to your needs.
- Click Create Bucket Policy. Select a proper policy mode as required. Valid values are as follows:
- Read-only: The authorized user will be granted with the read permission on the bucket and objects. For subsequent operations, see 5.
- Read and write: The authorized user will be granted with read and write permissions on the bucket and objects. For subsequent operations, see 5.
- Customized: The authorized user will be granted with customized permissions on the bucket and objects. For detailed configuration, see 6.
Only one bucket policy mode can be configured at a time.
- For the read-only and read and write modes, enter information about the authorized user in the following format and click OK.
Table 1 Parameters in bucket policies Parameter
Value
Description
Principal
- Include or Exclude
- Current account or Other account
Specifies users on whom this bucket policy takes effect.
- Include: Specifies the user on whom the bucket policy statement takes effect.
- Exclude: Specifies that on all users except the specified user the bucket policy statement takes effect.
Resources
Indicates the resource that a bucket policy applies to. With the read-only mode and read and write mode, the policy can only apply to objects.
- Include: Specifies the OBS resources on which the bucket policy statement takes effect.
- Exclude: Specifies that on all OBS resources except the specified ones the bucket policy statement takes effect.
- For the customized mode, set parameters based on the site requirements and click OK.
Table 2 lists the meaning of each parameter.
Table 2 Parameters in bucket policies Parameter
Value
Description
Effect
Allow or Deny
Effect of a bucket policy.
- Allow: Indicates access requests are allowed, if they match the configurations of this bucket policy.
- Deny: Indicates access requests are denied, if they match the configurations of this bucket policy.
Principal
- Include or Exclude
- Current account or Other account
Specifies users on whom this bucket policy takes effect.
- Include: Specifies the user on whom the bucket policy statement takes effect.
- Exclude: Specifies that on all users except the specified user the bucket policy statement takes effect.
Resources
Indicates the resource that a bucket policy applies to.
- Include: Specifies the OBS resources on which the bucket policy statement takes effect.
- Exclude: Specifies that on all OBS resources except the specified ones the bucket policy statement takes effect.
Relationship between resource types and actions:
- When a resource is an object or an object set, only the actions related to the object can be configured.
- When the resource is a bucket, only the actions related to the bucket can be configured.
Actions
- Include or Exclude
- For details, see Actions.
Operations stated in the bucket policy.
- Include: Specifies the actions on which the bucket policy takes effect.
- Exclude: Specifies that on all actions except the specified ones the bucket policy takes effect.
Conditions
Conditions for the policy statement to take effect.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot