granted
granted copied to clipboard
Compatibility problem with VSCode AWS extensions
The AWS extensions for VSCode that require sign-in to AWS create session tokens that Granted cannot parse, preventing it from working.
Steps to reproduce:
- Authorise an SSO session with "assume" and check you can successfully assume other roles as normal.
- Launch VSCode, authorise an AWS extension.
- Attempt to assume a new role, you will see an error similar to this:
[✘] operation error SSO: GetRoleCredentials, https response error StatusCode: 401, RequestID: 2a2d7c3f-c89d-4b1f-9ef7-8946f0c1369e, UnauthorizedException: Session token not found or invalid
- Remove any session token cache files for the extension(s):
rm ~/.aws/sso/cache/aws-toolkit-vscode-client*
- Assuming a new role now works again.
Granted version: 0.27.0 OS: macOS Sonoma & Ventura
Update: Looking at the contents of the files is appears that the aws-toolkit-vscode* files don't have accessToken or refreshToken defined within them; I'm not sure if this is a change that Amazon have made or not and may be related to the Amazon Q extension.