This topic describes how to grant an IAM user the read and write permissions on an OBS bucket.
You are advised to use bucket policies to grant resource-level permissions to an IAM user.
The preset read/write mode of OBS has the following permissions:
After the configuration is complete, read and write operations (uploading, downloading, and deleting all objects in the bucket) can be performed using APIs or SDKs. 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. .
If you want an IAM user to perform read and write operations on OBS Console or OBS Browser+, configure custom IAM policies by referring to Follow-up Procedure.
After the configuration is complete, the system still displays a message indicating that you do not have the permission to access the bucket. This is normal because the console invokes other advanced configuration APIs, but you can still perform operations allowed in read/write mode.
Parameter |
Description |
---|---|
Policy Mode |
Select Read and write. |
Principal |
|
Resources |
|
To perform read and write operations on OBS Console or OBS Browser+, you must add the obs:bucket:ListAllMyBuckets (for listing buckets) and obs:bucket:ListBucket (for listing objects in a bucket) permissions to the custom IAM policy.
obs:bucket:ListAllMyBuckets applies to all resources, while obs:bucket:ListBucket applies to the authorized bucket only. Therefore, you need to add two permissions to the policy.
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]
|
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.