Every IAM user with a console password should have MFA turned on
This check looks at IAM users that can sign in to the AWS console with a password and whether each one has a multi-factor authentication device assigned. The safe setting is that every such user has MFA enabled.
Why it matters
A console password is a single secret. If it is guessed, reused from another site or phished, anyone who has it can sign in as that user and use every permission the user holds. A second factor, such as an authenticator app or a hardware key, means a stolen password alone is not enough to get in.
AWS describes MFA as an extra layer of protection for IAM users and recommends it for all users that sign in with a password. See the AWS IAM documentation on MFA. The risk is highest for users with administrative permissions, but a user with only a few permissions can still be a way into the account.
How to check it yourself
In the AWS console open IAM, choose Users, and look at the MFA column. A user shown with no MFA device and a console password is a gap. For the whole account at once, use the IAM credential report, which lists for each user whether a password is enabled and whether MFA is active.
aws iam generate-credential-report
aws iam get-credential-report --query Content --output text | base64 --decode | cut -d, -f1,4,8
# columns: user, password_enabled, mfa_active
# a row with password_enabled=true and mfa_active=false is a findingBoth commands only read account data. Run read-only commands on a test environment or with a read-only role first.
How to fix it
In the console go to IAM, Users, pick the user, open the Security credentials tab and choose Assign MFA device. Pick an authenticator app, security key or hardware token and follow the prompts. The user, or an administrator working with the user, has to complete the step because it needs two consecutive codes from the device.
Scripted version for a virtual device (it writes to your account, so ConfigCobra never does this for you):
aws iam create-virtual-mfa-device --virtual-mfa-device-name EXAMPLE-USER-mfa \
--outfile qr.png --bootstrap-method QRCodePNG
aws iam enable-mfa-device --user-name EXAMPLE-USER \
--serial-number arn:aws:iam::111122223333:mfa/EXAMPLE-USER-mfa \
--authentication-code1 123456 --authentication-code2 654321If the user does not need console access at all, removing the console password is another way to close the gap. Where you can, moving people to a central single sign-on setup removes long-lived IAM passwords altogether.
What changes when you fix it
The affected people are the IAM users who sign in to the console with a password. After the fix they are asked for a code from their device at every console sign-in, and anyone who loses the device needs an administrator to reset it.
- Console sign-in takes one extra step for these users.
- Access keys used by scripts and applications are not affected by assigning a console MFA device.
- Shared or service-style IAM users with a console password are the awkward case: they need a device that someone holds, or the console password should be removed.
- Keep an administrator who can reset MFA for others, so a lost phone does not lock you out.
Check who is affected before you roll this out, then give each person notice and a device.
Included in
| Benchmark | CIS ID | Profile |
|---|---|---|
| CIS Amazon Web Services Foundations v7.0.0 | 2.10 | Level 1 |
Check this on your AWS
ConfigCobra runs this check with every other control of the CIS Amazon Web Services Benchmarks, read-only.