Introduction
This chapter describes fine-grained permissions management for your OBS using Identity and Access Management (IAM). If your HUAWEI CLOUD account does not require individual IAM users, skip this chapter.
By default, new IAM users do not have any permissions assigned. You need to add a user to one or more groups, and attach permissions policies or roles to these groups. Users inherit permissions from the groups to which they are added and can perform specified operations on cloud services based on the permissions.
For details about policies and roles related to OBS in IAM, see Permissions Management. For more information about the syntax structure and examples of IAM permissions, see IAM Permissions.
You can grant users permissions by using roles and policies. Roles are a type of coarse-grained authorization mechanism that defines permissions related to user responsibilities. Policies define API-based permissions for operations on specific resources under certain conditions, allowing for more fine-grained, secure access control of cloud resources.
- Policy-based authorization is useful if you want to allow or deny the access to an API.
- Because of the cache, it takes about 13 minutes for the OBS role to take effect after being granted to users, enterprise projects, and user groups. After an OBS policy is granted, it takes about 5 minutes for the policy to take effect.
An account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned. The permissions required for calling an API are determined by the actions supported by the API. Only users who have been granted permissions allowing the actions can call the API successfully. For example, if an IAM user needs to create buckets using an API, the user must have been granted permissions that allow the obs:bucket:CreateBucket action.
Supported Actions
There are two kinds of policies: system-defined policies and custom policies. If the permissions preset in the system do not meet your requirements, you can create custom policies and apply these policies to user groups for refined access control. Operations supported by policies are specific to APIs. The following are common concepts related to policies:
- Permissions: Allow or deny operations on specified resources under specific conditions.
- APIs: REST APIs that can be called by a custom policy.
- Actions: added to a custom policy to control permissions for specific operations.
- IAM project or enterprise projects: type of projects for which an action will take effect. Policies that contain actions supporting both IAM and enterprise projects can be assigned to user groups and take effect in both IAM and Enterprise Management. Policies that only contain actions supporting IAM projects can be assigned to user groups and only take effect in IAM. Such policies will not take effect if they are assigned to user groups in Enterprise Project. For details about the differences between IAM and enterprise projects, see What Are the Differences Between IAM and Enterprise Management?
The check mark (√) indicates that an action takes effect. The cross mark (x) indicates that an action does not take effect.
OBS supports the following actions that can be defined in a custom policy:
- Bucket-related actions include actions supported by all OBS bucket-related APIs, such as the APIs for listing all buckets, creating and deleting buckets, setting bucket policies, setting bucket event notification, setting cross-region replication, and setting bucket logging.
- Object-related actions include APIs for uploading, downloading, and deleting objects.
Last Article: Permissions and Supported Actions
Next Article: Bucket-Related Actions
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.