-
Notifications
You must be signed in to change notification settings - Fork 34
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
OKTA_AWSCLI_CACHE_ACCESS_TOKEN=true does not work #114
Comments
@nikitaromm do you know if your session was logged out with the window of the cached token expiry window? Maybe your org has a policy that is causing log out on some trigger? I am releasing a token retry in #118 that will be released as v1.2.2 today. If the token gets an API error okta-aws-cli will jump back out to the device auth loop via the browser. |
note to self: maybe this is duplicate |
Hi @monde, Additionally, I wanted to mention that I recently updated the tool to v1.2.2. It appears that with this version, a web browser opens each time I use the tool instead of using the token. In previous versions, this behavior occurred when the Thanks |
Hi @monde, |
@nikitaromm I'll take a look and see if I can reproduce. If it's something obvious I'll see about a fix as v1.2.3. That said, all my effort is going into v2 of Remind me, in your use of v1.2.2 all of the arguments are by environment variables and you don't have a |
@monde yes, we are using environment variables. Just tried the beta version and seems it does not write creds into |
@nikitaromm can you give https://github.com/okta/okta-aws-cli/releases/tag/v2.0.0-beta.2 a try? I verified there was a bug in v2 (that was causing a panic 😢 ) in how it writes the aws credentials file. I fixed that. I'm on a macbook, I verified the cli was working for me using env vars as settings. Let me know what you find.
|
Version:
okta-aws-cli version 1.1.0
okta-aws-cli_1.1.0_darwin_arm64.tar.gz
Description:
When utilizing OKTA_AWSCLI_CACHE_ACCESS_TOKEN=true, we encounter an issue while attempting to log in for the second time. The error message received is as follows:
Error: fetching SSO web token received API response "400 Bad Request", error: "invalid_grant", description: "The application's assurance requirements are not met by the 'subject_token'."
Steps to Reproduce:
OKTA_AWSCLI_CACHE_ACCESS_TOKEN=true
.rm ~/.okta/awscli-access-token.json
resolves the issue, but this prevents us from using the cache token feature.Expected Behavior:
We should be able to use the cache token feature (
OKTA_AWSCLI_CACHE_ACCESS_TOKEN=true
) consistently without encountering the"invalid_grant"
error on subsequent login attempts.Additional Information:
We have multiple AWS accounts, and the ability to use the cache token feature is crucial for our workflow. This problem started occurring approximately two to three weeks ago, as before that, the caching feature worked great. It happens in the latest
okta-aws-cli
version as well. Assistance in resolving this issue would be greatly appreciated.The text was updated successfully, but these errors were encountered: