Closed travisnburton closed 12 months ago
Limiting the combined profile name to 10 characters results in a working configuration:
> assume foo-bar/ba
[✔] [foo-bar/ba](us-east-1) session credentials will expire in 12 hours
C:\Users\Administrator>aws s3 ls
C:\Users\Administrator>set | find "AWS"
AWS_ACCESS_KEY_ID=<snip>
AWS_EXECUTION_ENV=EC2
AWS_PROFILE=foo-bar/ba
AWS_SECRET_ACCESS_KEY=<snip>
AWS_SESSION_TOKEN=<snip>
The issue is actually due to the 1024 character limit in Windows which is being hit in assume.bat when calling set /p ASSUME_OUTPUT=<%TEMP%\temp-assume.txt
Confirmed the fix in https://github.com/common-fate/granted/pull/465 correctly addresses this issue.
Versions Impacted
0.14.3, 0.14.1, 0.7.1
Issue
Given an AWS account named "foo-bar", and an SSO role named "baz". If we ran
granted sso populate
we would end up with an .aws/config file containing the following:If we were to
assume
that role from a Windows machine, the environment variables would not be set correctly, and awscli would fail to authenticate: