Get a user credential report
You can generate and download a user credential report from RAM for compliance audits. The report lists the credential status for your Alibaba Cloud account and RAM users, including console sign-in passwords, access keys, and multi-factor authentication (MFA).
Limitations
You cannot generate a user credential report if the number of RAM users exceeds 3,500.
Procedure
-
Log in to the RAM console as a RAM administrator.
-
In the left-side navigation pane, click Overview.
-
On the Overview tab, click Download Credential Report.
-
After the user credential report is generated, click Download to save the report to your computer.
NoteThe time required to generate the report depends on the number of RAM users in your Alibaba Cloud account. If generation takes a long time, you can click Download Later. You can generate a new user credential report in CSV format in the console every 4 hours. If you request a report less than 4 hours after the previous one was generated, the system returns the existing report instead of generating a new one.
Report fields
The user credential report contains the following fields.
|
Parameter |
Value |
Description |
|
user |
username@company-alias.onaliyun.com |
The name of the user. The first row is always the Alibaba Cloud account, displayed as |
|
user_creation_time |
2019-11-11T12:33:18Z |
The time when the RAM user was created. Note
The time format follows ISO 8601 and is in UTC. Format: YYYY-MM-DDThh:mm:ssZ. |
|
user_last_logon |
2019-11-11T12:45:18Z |
The last time the RAM user signed in to the console. Note
A RAM user can log in by using a password or user SSO. If a RAM user has never logged in, this field shows |
|
password_exist |
TRUE |
Indicates whether a console sign-in password exists. The value can be
Note
For a member account created in Resource Directory, password information for the Alibaba Cloud account is provided, but this password cannot be used. For more information, see Create a member. |
|
password_active |
N/A |
Indicates whether the sign-in password is enabled. The valid values are
|
|
password_last_changed |
2019-11-11T12:50:18Z |
The last time the password was changed. If the RAM user's login configuration information does not exist, it is Note
RAM records data only after April 5, 2016. If the last modification time is before this date, the value is |
|
password_next_rotation |
2019-11-13T12:50:18Z |
The next time the password must be changed.
|
|
mfa_active |
TRUE |
Indicates whether an MFA device is enabled. The value can be |
|
access_key_1_exist |
TRUE |
Indicates whether the first access key exists. The value can be |
|
access_key_1_active |
TRUE |
Indicates whether the first access key is active. The value can be |
|
access_key_1_last_rotated |
2019-11-11T12:50:18Z |
The time when the first access key was created or last changed. If you do not have an AccessKey, it is |
|
access_key_1_last_used |
2019-11-13T12:50:18Z |
The last time the first access key was used.
Note
Tracking for the last-used time started on June 1, 2019, and the data may have a delay of up to 2 hours. |
|
access_key_2_exist |
TRUE |
Indicates whether the second access key exists. The value can be |
|
access_key_2_active |
TRUE |
Indicates whether the second access key is active. The value can be |
|
access_key_2_last_rotated |
2019-11-11T12:50:18Z |
The time when the second access key was created or last changed. If an AccessKey is not available, the value is |
|
access_key_2_last_used |
2019-11-13T12:50:18Z |
The last time the second access key was used.
Note
Tracking for the last-used time started on June 1, 2019, and the data may have a delay of up to 2 hours. |
Currently, RAM users can create only 2 AccessKeys. Due to historical reasons, some users have more than 2 AccessKeys. These additional AccessKeys are displayed at the end of the CSV file and begin with additional_access_key_.
Export user permission policies
The user credential report contains only credential status information, such as console sign-in passwords, access keys, and MFA, but not permission policies. To export permission policies for your RAM users, you can use the RAM API.
Follow these steps:
-
Call the ListUsers operation to obtain a list of all RAM users.
-
For each user, call the ListPoliciesForUser operation to obtain the name (PolicyName) and type (PolicyType) of the attached permission policies. The PolicyType can be System or Custom.
Example Alibaba Cloud CLI commands:
List RAM users:
aliyun ram ListUsers
List permission policies for a specific user:
aliyun ram ListPoliciesForUser --UserName <RAM user name>