AWS Identity Center Assumed Role Principals

0

I am attempting to author an IAM Role Trust Policy that only permits sts:AssumeRole permissions for a role managed by the AWS IAM Identity Center. I have read through this document describing the Principal ARN that should be used in the Trust Policy, but am pretty confident that the documented PrincipalArn is incorrect. The documented format of the ARN is:

arn:aws:iam::$ACCOUNT_ID:role/aws-reserved/sso.amazonaws.com/$IDENTITY_CENTER_REGION/AWSReservedSSO_$PERMISSION_SET_NAME_*

However, when I use that exact format and attempt to assume the role I get AccessDenied errors. I AM however able to get it to work if I remove the $IDENTITY_CENTER_REGION component from the PrincipalArn and use the following format:

arn:aws:iam::$ACCOUNT_ID:role/aws-reserved/sso.amazonaws.com/AWSReservedSSO_$PERMISSION_SET_NAME_*

I see others have had similar difficulties getting this to work.

Is the documented ARN format incorrect? Or is there some configuration step I may have missed that leads to this difference?

Thanks for the help!

asked 13 days ago204 views
1 Answer
1
Accepted Answer

Hello.

In my environment, I was able to perform AssumeRole with the following trust policy.
My IAM Identity Center uses Tokyo as the region.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::$ACCOUNT_ID:role/aws-reserved/sso.amazonaws.com/ap-northeast-1/AWSReservedSSO_AWSAdministratorAccess_xxxxxxx"
            },
            "Action": "sts:AssumeRole"
        }
    ]
}

What region are you using with IAM Identity Center?
According to the AWS blog below, it seems that there is no need for a region code in the case of us-east-1.
https://aws.amazon.com/jp/blogs/containers/a-quick-path-to-amazon-eks-single-sign-on-using-aws-sso/

Note: If you configure SSO in a Region other than us-east-1, add the Region after “sso.amazonaws.com”. For example, for us-east-2, “…/sso.amazonaws.com/us-east-2/…”.

profile picture
EXPERT
answered 13 days ago
profile picture
EXPERT
reviewed 8 days ago
  • Wow. Excellent find. I am indeed in us-east-1. Strange that it's inconsistent across regions. Thank you!!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions