How to Find AWS IAM access key creation during setup of users that have a console password
AWS console defaults the checkbox for creating access keys to enabled. This results in many access keys being generated unnecessarily. In addition to unnecessary credentials, it also generates unnecessary management work in auditing and rotating these keys. Requiring that additional steps be taken by the user after their profile has been created will give a stronger indication of intent that access keys are (a) necessary for their work and (b) once the access key is established on an account that the keys may be in use somewhere in the organization.
This security check is part of the CIS Amazon Web Services Benchmarks and is rated severity medium.
This guide assumes that you have already installed and configured Resoto to collect your AWS cloud resources.
Execute the following
searchcommand in Resoto Shell or Resoto UI:
> search is(aws_iam_access_key) and access_key_status=="Active" and access_key_last_used.last_used==null and /ancestors.aws_iam_user.reported.password_enabled==true
kind=aws_iam_access_key, ..., region=resoto-poweruser
kind=aws_iam_access_key, ..., account=poweruser-team
searchcommand into the
> search is(aws_iam_access_key) and access_key_status=="Active" and access_key_last_used.last_used==null and /ancestors.aws_iam_user.reported.password_enabled==true | dump
The command output will list the details of all non-compliant
Fix detected issues by following the remediation steps:
- Delete all matching access keys that have been reported.
- Ensure to uncheck the setting that creates access keys by default during the initial user setup.
Please refer to the AWS IAM documentation for details.