Duration of an hour is wrong
Opened this issue · 4 comments
Description
Hi, I was just looking at the code and testing to see if I could create a version with a longer than 1 hour console session and stumbled across the linked line. It states that there are 3200 seconds in an hour but 60 * 60 is in fact 3600? Perhaps I'm missing something or maybe it is a typo?
Thanks,
Rob
Just searched for it and it also appears here:
And here:
Thanks, surely this is a typo in the test. Thanks for the segnalation
Just chiming in; there's a typo in the variable's name instead of the actual duration.
The duration is purposely set to less than an hour to make it work with tools (like Terraform, AWS CLI, and such) that cache the credentials and don't always ask an external provider for the credentials. This caused some long-running commands or commands that were run near the expiration of the credentials to fail; the missing 400 seconds are practically a buffer. I think it's better to put it into the docs and comments.
Hi everyone! There are two kinds of duration: one relative to the Leapp Session credentials, and the other relative to the web console. The second one has been set to 55 minutes in one of the latest releases; if the web console session expires, the user can manually re-open it from the desktop app to extend the duration.
"Default Webconsole Duration", which can be set from the global options menu, accepts values from 1 to 12 hours. This value is used to generate IAM Role Federated credentials and to open a new Web Console session. When a new Web Console session is created, even if its duration is 12 hours, it is considered expired when the underlying (AWS IAM Role Federated)/(AWS IAM Role Chained)/(AWS SSO Role) Session credentials are expired. i.e., AWS IAM Role Federated is the only scenario in which a Web Console session duration may last 12 hours.
I hope it makes sense to you @RebSheb. If you want to deepen the topic, please don't hesitate to keep in touch with us!