Skip to content

fix(auth): SSO source profile authentication fails with invalid token error #7613

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jreslock
Copy link

@jreslock jreslock commented Jul 7, 2025

An attempt at fixing this issue.

Problem:
Profiles sourced from SSO profiles fail to authenticate with 'The security token included in the request is invalid' error. This is a regression introduced in v3.47.0 by commit 6f6a8c2.

Solution:

  • Add recursive credential resolution for source profiles in makeSharedIniFileCredentialsProvider()
  • Check if source profile has static credentials; if not, recursively resolve them
  • Use resolved credentials for STS client instead of undefined values
  • Add test case for SSO source profile authentication

Fixes #6782

… error

Problem:
Profiles sourced from SSO profiles fail to authenticate with 'The security token included in the request is invalid' error. This is a regression introduced in v3.47.0 by commit 6f6a8c2.

Solution:
- Add recursive credential resolution for source profiles in makeSharedIniFileCredentialsProvider()
- Check if source profile has static credentials; if not, recursively resolve them
- Use resolved credentials for STS client instead of undefined values
- Add test case for SSO source profile authentication

Fixes aws#6782
@jreslock jreslock requested a review from a team as a code owner July 7, 2025 14:14
@jreslock
Copy link
Author

Hi @aws/aws-ides-team is there something missing from this PR that is blocking review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid security token error when using SSO-sourced profiles (regression since 3.47.0)
1 participant