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!

1回答
1
承認された回答

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
エキスパート
回答済み 1ヶ月前
profile picture
エキスパート
レビュー済み 25日前
  • Wow. Excellent find. I am indeed in us-east-1. Strange that it's inconsistent across regions. Thank you!!

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ