Identity management
To secure your Alibaba Cloud account and cloud resources, avoid using your Alibaba Cloud account to access Intelligent Advisor. Instead, use Resource Access Management (RAM) identities, such as RAM users and RAM roles, to access <Product Name>.
RAM users
RAM users must be created by an Alibaba Cloud account, or by a RAM user or RAM role that has administrator permissions. After a RAM user is created, you must grant the RAM user permissions to log on to the console or call APIs to access resources that belong to the Alibaba Cloud account.
Follow these recommendations when you use RAM users:
Use your Alibaba Cloud account to create a RAM user and grant administrator permissions to this RAM user. Then, use this RAM user to create and manage other RAM users.
Separate human users from programmatic users.
When you create a RAM user, you can configure two access modes: Console access and Programmatic access. Users with console access use a logon password to log on to the console. Users with programmatic access use an AccessKey pair to call APIs and access cloud resources. To prevent operational errors from affecting your services, create separate users for each access mode. For users with console access, enable multi-factor authentication (MFA).
Assign the least privilege to RAM users.
The principle of least privilege means granting a user only the permissions required to perform a task. This practice improves data security and reduces security risks from permission abuse by preventing users from having excessive permissions.
Do not store the AccessKey ID and AccessKey secret of a RAM user in your project code. If the AccessKey pair is leaked, the security of all resources in your account is at risk. Use methods such as Security Token Service (STS) or environment variables to obtain authorization.
If applicable, configure single sign-on (SSO) for RAM users. This allows them to use their corporate identities to log on to and access Alibaba Cloud resources.
Related operations for RAM users
RAM user groups
If you have multiple RAM users in your Alibaba Cloud account, you can create user groups to manage users who have the same responsibilities. This lets you grant permissions in batches and efficiently manage users and their permissions. Follow these recommendations when you use RAM user groups:
Follow the principle of least privilege when you grant permissions to RAM user groups.
If a RAM user's responsibilities change, remove the user from any groups they no longer belong to. This prevents permission abuse.
If a user group no longer requires certain permissions, remove those permissions from the group.
Related operations for RAM user groups
RAM roles
A RAM role is a RAM identity type with attached policies. Unlike a RAM user, a role is not bound to a single person or application—any trusted principal can assume it. Roles have no long-term credentials such as passwords or AccessKey pairs. When a principal assumes a role, the Security Token Service (STS) generates temporary security credentials valid only for that session.
The following are security recommendations for using RAM roles:
After you create a RAM role, do not change its trusted entity without careful consideration. Modifying the trusted entity in the trust policy of a RAM role can cause the original entity to lose permissions, which can affect business operations. Adding new trusted entities can also create a risk of excessive permissions. If you must make changes, test them thoroughly in a test account. After you confirm that everything works as expected, you can apply the changes to your tenant account.
After a RAM user that belongs to a trusted entity is granted the required permissions, the RAM user can call the AssumeRole - Obtain a temporary credential for a role API operation to obtain an STS token for the RAM role. An STS token is valid for a limited period after it is issued. You must set a reasonable validity period for the token to avoid the security risks that are associated with an excessively long validity period.
NoteThe maximum validity period of an STS token is determined by the maximum session duration of the role. For security reasons, you must also set the maximum session duration of the role to a reasonable value.
If applicable, configure SSO for RAM roles. This allows users to use their corporate identities to log on to and access Alibaba Cloud resources.