An organization (Account ID 123412341234. has attached the below mentioned IAM policy to a user. What does this policy statement entitle the user to perform?
A.
The policy allows the IAM user to modify all IAM users' access keys using the console, SDK, CLI or APIs
B.
The policy allows the IAM user to modify all IAM users' credentials using the console, SDK, CLI or APIs
C.
The policy allows the IAM user to modify all credentials using only the console
D.
The policy allows the IAM user to modify the IAM user's own credentials using the console, SDK, CLI or APIs
Suggested Answer:A🗳️
AWS Identity and Access Management is a web service which allows organizations to manage users and user permissions for various AWS services. If the organization (Account ID 123412341234. wants some of their users to manage keys (access and secret access keys. of all IAM users, the organization should set the below mentioned policy which entitles the IAM user to modify keys of all IAM users with CLI, SDK or API.
the correct question is:
An organization (Account ID 123412341234. has attached the below mentioned IAM policy to a user. What
does this policy statement entitle the user to perform?
{
“Version”: “2012-10-17”,
“Statement”: [{
“Sid”: “AllowUsersAllActionsForCredentials”,
“Effect”: “Allow”,
“Action”: [
“iam:*LoginProfile”,
“iam:*AccessKey*”,
“iam:*SigningCertificate*”
],
“Resource”: [“arn:aws:iam:: 123412341234:user/${aws:username}”]
}]
}
Ans: D.
The policy allows the user to modify all IAM user’s password, sign in certificates and access keys
using only CLI, SDK or APIs
Correct answer is (D) as stated in this page:
https://docs.aws.amazon.com/IAM/latest/UserGuide/access_permissions-required.html
"To allow users to perform any action related just to access keys, you can use iam:*AccessKey* in the Action element of a policy statement. This gives the user permission to perform the CreateAccessKey, DeleteAccessKey, GetAccessKeyLastUsed, ListAccessKeys, and UpdateAccessKey actions. (If an action is added to IAM in the future that has "AccessKey" in the name, using iam:*AccessKey* for the Action element will also give the user permission to that new action.) The following example shows a policy that allows users to perform all actions pertaining to their own access keys (replace account-id with your AWS account ID)."
Ans: D
In this case the ARN includes a variable (${aws:username}) that resolves to the current user's name
https://docs.aws.amazon.com/IAM/latest/UserGuide/access_permissions-required.html
The correct choice is not present - closest one is (a) but can not modify all
Right choice should be - The policy allows the user to Get/Create/Update/Delete the user’s own access keys using only CLI, SDK or APIs.
aws:username This is a string containing the friendly name of the current user—see the chart that follows.
My choice is A
Refer to: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_permissions-required.html
To allow users to perform any action related just to access keys, you can use iam:*AccessKey* in the Action element of a policy statement. This gives the user permission to perform the CreateAccessKey, DeleteAccessKey, GetAccessKeyLastUsed, ListAccessKeys, and UpdateAccessKey actions.
D
When you use a policy variable for the user name like this, you don't have to have a separate policy for each individual user. Instead, you can attach this new policy to an IAM group that includes everyone who should be allowed to manage their own access keys. When a user makes a request to modify his or her access key, IAM substitutes the user name from the current request for the ${aws:username} variable and evaluates the policy.
D is correct
Reference item = aws:username This is a string containing the friendly name of the current user—see the chart that follows.
from
Reference docs = https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
awsnoob
Highly Voted 1Â year, 1Â month agoAMohanty
1Â year agoFHU
Most Recent 8Â months, 3Â weeks agoxxxdolorxxx
1Â year agodavidy2020
1Â year agosunilpanda
1Â year agoNguyenLC1
1Â year agoNguyenLC1
1Â year agohussainbh
1Â year agokenkct
1Â year agokenkct
1Â year agoonlinebaba
1Â year agojadoxo
1Â year agoawscertified
1Â year agobadrobot
1Â year, 1Â month agobadrobot
1Â year agoaksliveswithaws
1Â year, 1Â month ago