-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
awscli does not respect Identity Center sso session duration length #7538
Comments
Hi @jeremymturner thanks for reaching out. This comment from the issue you linked mentioned how the https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html documentation page said:
That documentation has since been updated to note:
This is what I see when configuring session settings in the IAM Identity Center: You said you're using v2.9.8 which is currently the latest CLI version per the CHANGELOG. But you're saying that if you configure the session duration beyond 8 hours then it does not refresh the token? If you have a support plan I recommend reaching out through AWS Support for direct assistance with issues like this. |
Correct. If I configure the session duration to 24 hours, the Additionally, I looked at the boto3 module docs under the The actual token refresh (from SSO token to permission set/role token) seems to be working normally. It's just that the SSO token duration doesn't match what the UI has. |
Hi @jeremymturner - I reached out to the SSO team regarding this behavior, as it came up in another recent issue. I added their response here: #7104 (comment)
So based on that explanation I believe this is the expected behavior. |
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
The same thing happens here. For example with granted assume cli the session duration is indeed 12h: Leave me a comment for further details. |
Why was this closed? I'm seeing the same thing, the iam identity center is completely schizofrenic. I have several AWS accounts that I can log into via identity center. Some of them will give me 8h tokens regardless of the session expiration setting in identity center, but now I notice that one of the accounts always give me a 1h token (!), probably due to sso configuring it at a later time (so something has changed?) This is even more frustrating than having an 8h token. Web console session length is even worse, I seem to be logged out seemingly randomly, even though I have set the session duration to 3 days. |
@jishi i'm freaking out having to configure sso every hour |
regardless of what you are configuring in AWS Identity Center - you will get 8 hour access, why this is closed? |
+1, SSO configuration has no effect, it's always 8 hours |
+1 - We're having the 1 hour issue - our expiresAt on the latest cli (2.23.7) is always 1 hour (I think it used to be 8) - we used to use it to check whether our creds were still valid but that doesn't work anymore and it seems we now have to login more frequently - in identity center itself it's set to 12 which is definitely not being respected |
Describe the bug
When a user runs
aws sso login
, the returned SSO session token expiresAt returns a +8 hour value, regardless of what the administrator set under IAM Identity Center -> Settings -> Authentication -> Maximum session duration.Note that this is not looking at a session duration of any permission sets, just at IAM Identity Center itself.
Expected Behavior
awscli should respect the value set under IAM Identity Center -> Settings -> Authentication -> Maximum session duration when it returns the expiresAt value.
Current Behavior
awscli returns the current time +8 hours
Reproduction Steps
Possible Solution
Short-term fix:
Long-term fix:
Additional Information/Context
Resolution of this would also complete the request asked for in #6547.
CLI version used
aws-cli/2.9.8 Python/3.11.0 Darwin/21.6.0 source/arm64 prompt/off
Environment details (OS name and version, etc.)
macOS Monterey 12.6.1
The text was updated successfully, but these errors were encountered: