Description
The root user account is the most privileged user in an AWS account. AWS Access Keys provide programmatic access to a given AWS account. It is recommended that all access keys associated with the root user account be deleted.
Rationaleβ
Deleting access keys associated with the root user account limits vectors by which the account can be compromised. Additionally, deleting the root access keys encourages the creation and use of role based accounts that are least privileged.
Auditβ
Perform the following to determine if the root user account has access keys:
From Consoleβ
- Login to the AWS Management Console.
- Click
Services
. - Click
IAM
. - Click on
Credential Report
. - This will download a
.csv
file which contains credential usage for all IAM users within an AWS Account - open this file. - For the
<root_account>
user, ensure theaccess_key_1_active
andaccess_key_2_active
fields are set toFALSE
.
From Command Lineβ
Run the following command:
aws iam get-account-summary | grep "AccountAccessKeysPresent"
If no root
access keys exist the output will show "AccountAccessKeysPresent": 0,
. If the output shows a 1
, then root
keys exist and should be deleted.
Referencesβ
- http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-bestpractices.html
- http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html
- http://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountSummary.html
- CCE-78910-7
- https://aws.amazon.com/blogs/security/an-easier-way-to-determine-thepresence-of-aws-account-access-keys/
Additional Informationβ
- IAM User account "root" for us-gov cloud regions is not enabled by default. However, on request to AWS support enables 'root' access only through accesskeys (CLI, API methods) for us-gov cloud region.
- Implement regular checks and alerts for any creation of new root access keys to promptly address any unauthorized or accidental creation.