Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] cdk deploy using newStyleStackSynthesis cannot handle non-ASCII characters in username #10401

Closed
pergardebrink opened this issue Sep 16, 2020 · 1 comment · Fixed by #10451
Assignees
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. package/tools Related to AWS CDK Tools or CLI

Comments

@pergardebrink
Copy link

pergardebrink commented Sep 16, 2020

Steps to reproduce

  • Create/use a windows user with a username containing å (might also need to set computer to swedish locale or similar)
  • Create a CDK project using newStyleStackSynthesis: true
  • Run cdk deploy <stackname>

What did you expect to happen?

Stack to be deployed

What actually happened?

An error is reported:

Could not assume role in target account (did you bootstrap the environment with the right '--trust's?): 1 validation error detected: Value 'aws-cdk-PerGårdebrink' at 'roleSessionName' failed to satisfy constraint: Member must satisfy regular expression pattern: [\w+=,.@-]*

Environment

  • CLI Version : 1.61-1.63 (at least)
  • Framework Version: .NET Core 3.1
  • Node.js Version: 12.16.1
  • OS : Windows 10
  • Language (Version):

Other

This seems like it could be related to the same problem I had before: #7456

I tried to impersonate another local windows user without å in the username and then it worked perfectly with the same AWS credentials


This is 🐛 Bug Report

@pergardebrink pergardebrink added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 16, 2020
@pergardebrink pergardebrink changed the title cdk deploy using newStyleStackSynthesis cannot handle non-ASCII characters cdk deploy using newStyleStackSynthesis cannot handle non-ASCII characters in username Sep 17, 2020
@SomayaB SomayaB changed the title cdk deploy using newStyleStackSynthesis cannot handle non-ASCII characters in username [cli] cdk deploy using newStyleStackSynthesis cannot handle non-ASCII characters in username Sep 18, 2020
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Sep 18, 2020
@rix0rrr
Copy link
Contributor

rix0rrr commented Sep 21, 2020

😳 oops

rix0rrr added a commit that referenced this issue Sep 21, 2020
When assuming a role for uploading assets in the new-style synthesized
stacks, the OS username was used to build the session name out of.

OS usernames have a character set that is wider than the allowed
characters in `RoleSessionName` though, so we needed to sanitize
them.

Fixes #10401.
@mergify mergify bot closed this as completed in #10451 Sep 22, 2020
mergify bot pushed a commit that referenced this issue Sep 22, 2020
When assuming a role for uploading assets in the new-style synthesized
stacks, the OS username was used to build the session name out of.

OS usernames have a character set that is wider than the allowed
characters in `RoleSessionName` though, so we needed to sanitize
them.

Fixes #10401.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants