AWS SSO Required permission to run aws sts get-caller-identity

0

For an AWS SSO user, when they run

`aws sts get-caller-identity`

the following error occurs

`An error occurred (ForbiddenException) when calling the GetRoleCredentials operation: No access`

I can't find any reference as to what permission the user needs to execute this command.

The user has the following policy:

arn:aws:iam::aws:policy/ReadOnlyAccess 

and this inline policy:

    {
            "Sid": "sts",
            "Effect": "Allow",
            "Action": "sts:GetServiceBearerToken",
            "Resource": "*",
            "Condition": {
                "NumericEquals": {
                    "sts:DurationSeconds": 43200
                },
                "StringEquals": {
                    "sts:AWSServiceName": "codeartifact.amazonaws.com"
                }
            }
        }
    ]
1개 답변
0

Are you using AWS SSO Permission Sets to assign IAM policies to your users? https://docs.aws.amazon.com/singlesignon/latest/userguide/iam-auth-access-overview.html. As you suggest you are applying an inline policy I would assume not (since inline policies only apply to IAM users)?

If you are using SSO Permission Sets, then the read only permission set AWSReadOnlyAccess which uses the AWS Managed Policy arn:aws:iam::aws:policy/job-function/ViewOnlyAccess does not specifically include STS:* as a permission. Therefore I would assume that it is being implicitly denied.

If you could clarify it would help greatly.

profile pictureAWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인