Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
17 KiB
Configuring a Custom Bucket Policy (Common Mode)
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.
This topic describes how to configure a custom bucket policy in common mode (GUI).
Procedure
- In the bucket list, click the bucket you want to operate. The Overview page is displayed.
- In the navigation pane, choose Permissions.
- On the Bucket Policies tab page, configure a custom bucket policy according to your needs.
On the right of Custom Bucket Policies, select Common mode to configure the policy in the GUI mode.
- Click Create Bucket Policy. Select a proper policy mode as required. Valid values are as follows:
- Read-only: The authorized user will have the read permission on the bucket and objects. For subsequent operations, see 5.
- Read and write: The authorized user will have the read and write permissions on the bucket and objects. For subsequent operations, see 5.
- Customized: The authorized user will have the customized permissions on the bucket and objects. For detailed configuration, see 6.
- 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
- Cloud service user, Federated user
- If you select Federated user, you can specify the user to be an Identity provider or a User group.
Specifies users on whom this bucket policy takes effect, including cloud service users and federated users. A cloud service user is the one who accesses the cloud services through registration with the cloud services. A federated user is the one who accesses the cloud services through federated identity authentication.
- Include: The policy takes effect on specified users.
- Exclude: The policy takes effect on all users except the specified ones.
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: The policy takes effect on the specified OBS resources.
- Exclude: The policy takes effect on all OBS resources except the specified ones.
- For the customized mode, set parameters based on the site requirements and click OK.
Table 2 describes each parameter.
Table 2 Parameters for configuring a custom bucket policy Parameter
Value
Description
Effect
Allow or Deny
Effect of a bucket policy.
- Allow: The policy allows the matched requests.
- Deny: The policy denies the matched requests.
Principal
- Include or Exclude
- Cloud service user, Federated user
- If you select Federated user, you can specify the user to be an Identity provider or a User group.
Specifies users on whom this bucket policy takes effect, including cloud service users and federated users. A cloud service user is the one who accesses the cloud services through registration with the cloud services. A federated user is the one who accesses the cloud services through federated identity authentication.
- Include: The policy takes effect on specified users.
- Exclude: The policy takes effect on all users except the specified ones.
Resources
Indicates the resource that a bucket policy applies to.
- Include: The policy takes effect on the specified OBS resources.
- Exclude: The policy takes effect on all OBS resources except the specified ones.
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: The policy takes effect on specified actions.
- Exclude: The policy takes effect on all actions except the specified ones.
Conditions
Conditions under which the bucket policy takes effect