Configuring an Object Policy

Object policies are applied to the objects in a bucket. With an object policy, you can configure conditions and actions for objects in a bucket.

Procedure

  1. In the bucket list, click the bucket you want to operate to go to the Objects page.

  2. On the right of the object to be operated, choose More > Configure Object Policy. The Configure Object Policy dialog box is displayed.

  3. Select a proper policy mode as required. Valid options are as follows:

    • Read-only: The authorized user has the read permission on the object. For follow-up procedure, see 4.

    • Read and write: The authorized user has the read and write permissions on the object. For follow-up procedure, see 4.

    • Customized: The authorized user has the customized permissions on the object. For detailed configuration, see 5.

    Note

    You can configure only one object policy at a time.

  4. For read-only and read and write modes, enter information about the authorized user in the following format and click OK.

    Table 1 Object policy parameters in read-only or read and write mode

    Parameter

    Value

    Description

    Principal

    • Include or Exclude

    • Current account or Other account

    Indicates the user that the object policy applies to.

    • Include: The policy applies to specified users.

    • Exclude: The policy applies to users except the specified ones.

    Resources

    Include or Exclude

    Resources on which the object policy takes effect.

    • Include: The bucket policy applies to specified OBS resources.

    • Exclude: The bucket policy applies to OBS resources except the specified ones.

  5. For the customized mode, set parameters based on the site requirements and click OK.

    Table 2 Object policy parameters in the custom mode

    Parameter

    Value

    Description

    Effect

    Allow or Deny

    Effect of the object policy.

    • Allow: The policy allows the matched requests.

    • Deny: The policy denies the matched requests.

    Principal

    • Include or Exclude

    • Current account or Other account

    Specifies users on whom this object policy takes effect.

    • Include: The policy applies to specified users.

    • Exclude: The policy applies to users except the specified ones.

    Resources

    • Include or Exclude

    Resources on which the object policy takes effect.

    • Include: The bucket policy applies to specified OBS resources.

    • Exclude: The bucket policy applies to OBS resources except the specified ones.

    Actions

    Operation stated in the object policy.

    • Include: The bucket policy applies to specified actions.

    • Exclude: The bucket policy applies to actions except the specified ones.

    Conditions

    • Condition Operator: See Table 1.

    • Key: See Table 2 and Table 4.

    • Value: The entered value is associated with the key.

    Condition for an object policy to take effect.

  6. Click OK.

    After the object policy is configured successfully, it is displayed in the list under Custom Bucket Policies.