Skip to content

Reference Architecture - new users do not have access to setup MFA #619

Answered by drafie
drafie asked this question in Help
Discussion options

You must be logged in to vote

This appears to be a result of the way the policy is written in the official security module.

https://github.com/gruntwork-io/terraform-aws-security/blob/01900ebb91f0bdc29f5cc14a6d9d3dce817b92ea/modules/iam-policies/main.tf#L673

This policy is written as:

        "Resource": [
            "arn:aws:iam::311698643943:user/${aws:username}",
            "arn:aws:iam::311698643943:mfa/${aws:username}"

But, I think it ought to be written as:

        "Resource": [
            "arn:aws:iam::311698643943:user/${aws:username}",
            "arn:aws:iam::311698643943:mfa/*"

Or the documentation should tell us the MFA Device must be named exactly the same as your username.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by drafie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment