Skip to content

iam: SamlConsolePrincipal does not work in aws.amazon.com-regions #24243

@tonnico

Description

@tonnico

Describe the bug

With #24034 the default SAML:aud changed from aws.amazon.com to "Ref": "AWS::URLSuffix" which is resolves to amazonaws.com.

Expected Behavior

When not in china, it should resolves to aws.amazon.com.

Current Behavior

it is "Ref": "AWS::URLSuffix", which resolves to amazonaws.com.

Reproduction Steps

install 2.65.0
create an iam.SamlConsolePrincipal

Possible Solution

https://github.com/zorrofox/aws-cdk/blob/f8fe1d292feb3fc39a99687bf454a829302c4ff5/packages/%40aws-cdk/aws-iam/lib/principals.ts#L740

      StringEquals: {
-        'SAML:aud': cdk.Aws.PARTITION==='aws-cn'? 'https://signin.amazonaws.cn/saml': `https://signin.${cdk.Aws.URL_SUFFIX}/saml`,
+        'SAML:aud': cdk.Aws.PARTITION==='aws-cn'? 'https://signin.amazonaws.cn/saml': `https://signin.aws.amazon.com/saml`, 
      },

Additional Information/Context

No response

CDK CLI Version

2.65.0

Framework Version

No response

Node.js Version

OS

Language

Python

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-iamRelated to AWS Identity and Access ManagementbugThis issue is a bug.effort/smallSmall work item – less than a day of effortp0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions