This topic describes how to grant certain operation permissions on specific folders in an OBS bucket to multiple IAM users or user groups.
IAM custom policies
After the configuration is complete, you can perform allowed operations using APIs. However, if you log in to OBS Console or OBS Browser+ to perform those operations, an error is reported indicating that you do not have required permissions.
This is because when you log in to OBS Console or OBS Browser+, APIs (such as ListAllMyBuckets and ListBucket) are called to load the bucket list and object list and some other APIs will also be called on other pages, but your permissions do not cover those APIs. In such case, your access to OBS Console or OBS Browser+ is denied or your operation is not allowed.
To allow IAM users to operate buckets and objects on OBS Console or OBS Browser+, add at least the obs:bucket:ListAllMyBuckets and obs:bucket:ListBucket permissions to the custom policy. (In this case, these two permissions are configured in permission 2 and 3.)
obs:bucket:ListAllMyBuckets applies to all resources. You need to select all resources.
obs:bucket:ListBucket applies only to the authorized bucket. You can select all resources or a specified bucket as needed.
Parameter |
Description |
---|---|
Policy Name |
Name of the custom policy |
Policy View |
Set this parameter based on your own habits. Visual editor is used here. |
Policy Content |
[Permission 1]
[Permission 2] It is mandatory when an authorized user needs to perform operations on OBS Console or OBS Browser+.
[Permission 3] It is mandatory when an authorized user needs to perform operations on OBS Console or OBS Browser+.
|
Scope |
The default value is Global services. |
Add the created custom policy to the user group by following the instructions in the IAM document.
Due to data caching, it takes about 10 to 15 minutes for a custom policy to take effect after the authorization.
After the configuration is complete, it is normal if the system still displays a message indicating that you do not have required permissions, because OBS Console also calls other APIs for advanced settings, but you can still perform the operations allowed on the folder.
The reason why there is no required permission is that listing objects on OBS Console is to list objects in the root folder. This rule does not match the configured custom policy for listing objects in folder folder-001/.
If some other permissions are required, hover your cursor over the username and choose Identity and Access Management > Permissions, and then repeat the operations above to configure custom policies as needed.