Created
August 3, 2015 05:09
-
-
Save rberger/bba4e7656e368a6e2b43 to your computer and use it in GitHub Desktop.
Additional iam policies to allow power users to update their console password and 2FA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowUsersAllActionsForCredentials", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:*LoginProfile", | |
"iam:*AccessKey*", | |
"iam:*SigningCertificate*" | |
], | |
"Resource": [ | |
"arn:aws:iam::<Your AWS Account ID>:user/${aws:username}" | |
] | |
}, | |
{ | |
"Sid": "AllowUsersToSeeStatsOnIAMConsoleDashboard", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:GetAccount*", | |
"iam:ListAccount*" | |
], | |
"Resource": [ | |
"*" | |
] | |
}, | |
{ | |
"Sid": "AllowUsersToListUsersInConsole", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:ListUsers" | |
], | |
"Resource": [ | |
"arn:aws:iam::<Your AWS Account ID>:user/*" | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowUsersToCreateDeleteTheirOwnVirtualMFADevices", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:*VirtualMFADevice" | |
], | |
"Resource": [ | |
"arn:aws:iam::<Your AWS Account ID>:mfa/${aws:username}" | |
] | |
}, | |
{ | |
"Sid": "AllowUsersToEnableSyncDisableTheirOwnMFADevices", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:DeactivateMFADevice", | |
"iam:EnableMFADevice", | |
"iam:ListMFADevices", | |
"iam:ResyncMFADevice" | |
], | |
"Resource": [ | |
"arn:aws:iam::<Your AWS Account ID>:user/${aws:username}" | |
] | |
}, | |
{ | |
"Sid": "AllowUsersToListVirtualMFADevices", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:ListVirtualMFADevices" | |
], | |
"Resource": [ | |
"arn:aws:iam::<Your AWS Account ID>:mfa/*" | |
] | |
}, | |
{ | |
"Sid": "AllowUsersToListUsersInConsole", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:ListUsers" | |
], | |
"Resource": [ | |
"arn:aws:iam::<Your AWS Account ID>:user/*" | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"NotAction": "iam:*", | |
"Resource": "*" | |
} | |
] | |
} |
Yes, I don't even remember writing this!
A better guide is https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_aws_my-sec-creds-self-manage-mfa-only.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🤔 AllowUsersToCreateDeleteTheirOwnVirtualMFADevices without MFA seems to me like a VERY bad idea...
This allows a hacker to remove and add their own MFA device 👋 MFA ...