LoginSignup
1
1

More than 5 years have passed since last update.

[IAM policy]AWSの adminでないUserにもconsole access時にMFA設定をしてもらうためのPolicy

Posted at

背景

console accessのセキュリティ強化のため、IP制限をしたりすることもあるが、今回は、ConsoleAccess権を持っているがIAMの全部の権限はないUserに対して、MFA設定を個人で設定してもらえるようなPolicyを作成する

Policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "iam:DeleteVirtualMFADevice",
                "iam:CreateVirtualMFADevice"
            ],
            "Resource": "arn:aws:iam::351540792571:mfa/${aws:username}"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "iam:EnableMFADevice",
            "Resource": "arn:aws:iam::351540792571:user/${aws:username}"
        }
    ]
}

Resourceのところがmfa/${aws:username}user/${aws:username}と異なってるところに注意!

自分で一旦設定したらDeactivateできないようにしているので、それが必要な場合は、DeactivateMFADevice的な権限も与えると良い

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1