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

Token cache issue in okta-aws-cli: reauthentication required after every 3 aws accounts #198

Closed
nikitaromm opened this issue Feb 28, 2024 · 4 comments
Labels
triaged triaged into Okta's Jira backlog

Comments

@nikitaromm
Copy link

Version:

okta-aws-cli version v2.1.2

Description:

Currently, when utilizing okta-aws-cli for multiple accounts within a loop while setting OKTA_AWSCLI_CACHE_ACCESS_TOKEN=true, after every 3 accounts, it disregards the $HOME/.okta/awscli-access-token.json file and prompts for re-authentication.

Steps to Reproduce:

  • Set OKTA_AWSCLI_CACHE_ACCESS_TOKEN=true
  • Run okta-aws-cli for multiple accounts in a loop
  • Observe the behavior after processing every 3 accounts

Expected Behavior:

The expectation is that the same $HOME/.okta/awscli-access-token.json token remains valid and can be utilized seamlessly across all accounts within the loop without the need for re-authentication.

@nikitaromm nikitaromm changed the title $HOME/.okta/awscli-access-token.json Token cache issue in okta-aws-cli: reauthentication required after every 3 aws accounts Feb 28, 2024
@monde
Copy link
Collaborator

monde commented Mar 12, 2024

@nikitaromm is the OIDC client id the same for each invocation? The cached access token is bound to the client id.

@nikitaromm
Copy link
Author

@monde yes, we are using the same OIDC client id for each invocation. It worked in the past and we were able to use the same token for 15+ AWS accounts with no problem.

@monde
Copy link
Collaborator

monde commented Mar 13, 2024

@nikitaromm thanks for the confirmation. I'm interested to see what this odd and apparently deterministic behavior is all about.

@nikitaromm
Copy link
Author

@monde sure, please let me know which details you require.

monde added a commit that referenced this issue Jul 8, 2024
@monde monde added the triaged triaged into Okta's Jira backlog label Jul 8, 2024
monde added a commit that referenced this issue Jul 8, 2024
@monde monde closed this as completed in 446e6bd Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged triaged into Okta's Jira backlog
Projects
None yet
Development

No branches or pull requests

2 participants