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

AWS Session Expiration Issue #220

Closed
BPCS-wit opened this issue Feb 1, 2022 · 12 comments
Closed

AWS Session Expiration Issue #220

BPCS-wit opened this issue Feb 1, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@BPCS-wit
Copy link

BPCS-wit commented Feb 1, 2022

When using SSO to AWS over browser a session is created which is only to last 8 hours (setup within AWS). But the leapp app assuming 7 days. After 8 hours (when switching profiles) an invalid token message appears.
Only way to solve is to go to Integrations->Logout -> then Login again

Leapp Version
0.8.1.0

Expected behavior
Reopen the browser SSO dialog to refresh the token

Screenshots
image

Desktop (please complete the following information):

  • Windows 10 (x64)
@BPCS-wit BPCS-wit added the bug Something isn't working label Feb 1, 2022
@pethron
Copy link
Contributor

pethron commented Feb 1, 2022

Can this be linked to #108 ?
@ericvilla @andreacavagna01

@BPCS-wit
Copy link
Author

BPCS-wit commented Feb 1, 2022

@pethron yes it can. Actually the issue appeared last week for me after updating from 0.8.0 to 0.8.1 therefore I thought the issue is new.

@ericvilla
Copy link
Contributor

@pethron @BPCS-wit I'll check it out! Thank you for reporting

@tgjohnst
Copy link

tgjohnst commented Feb 8, 2022

I have also been encountering this issue, thanks for flagging the issue and temporary workaround. Looking forward to a fix.

@jaypan13
Copy link

jaypan13 commented Feb 9, 2022

First of all thank you very much to all developers for creating such wonderful tool and idea 💯.

With my case, I upgraded today from 0.7.3 to 0.8.1 on my mac. All profiles showed up but none of them were connecting. When opened integrations menu, it was showing 3 days and online opposed to 8 hours. So tried to log off and then logged back in as temporary workaround. It started showing 8 hours and online.

image

But when was trying to activate any session, it was showing error with Region.

image

Tried multiple attempts but it is now not allowing me to activate any session. I had followed up this and current 220 issue very recently, like couple of days before. I deleted all entries from keychain. After logout it shows "Cleaning configuration file" and then restarts but still not able to login. But I am not able to now open any session at all. Not sure if I should create different issue as this is mixture of both.

@andreacavagna01
Copy link
Contributor

@Jay1305 Thank you so much for the appreciation to the project! At least you can try to delete the ~/.Leapp/Leapp-lock.json file. This will erase your current configuration and you will start with a brand new configuration, this will make the app works.
We are still troubleshooting this issue even for the next version

@jaypan13
Copy link

jaypan13 commented Feb 12, 2022

Hey @andreacavagna01! Thanks for your reply. I had tried literally everything (deleted leapp-lock, removed from keychain,
restarted mac, and so on mentioned in this comment, but from that day leapp is not working at all when I upgraded from 0.7.3 to 0.8.2. So finally decided to download the dev code to at least find what the issue is with my local environment. I am not js developer so can you please tell me what I can find more here?

It is getting failed here -
image

Console
image

Thanks again :)

Edit -
I am not sure if that helped but I used aws sso configure with my settings on my machine (which I didn't do before) and now I am able to connect the sessions from Leapp. I am not 100% positive that sso configure would have helped me as Leapp was working regardless before.

@zswanson
Copy link

This may have been something on the AWS side - we'd been seeing this with 0.8.1 for at least 2 weeks and then its suddenly stopped and the integration options no longer show that 7 day expiration period.

@andreacavagna01
Copy link
Contributor

Absolutely. We save the expiration code time directly from AWS SSO OIDC sdk. But the token is valid only for 8 hours

@ericvilla
Copy link
Contributor

ericvilla commented Feb 15, 2022

I can confirm it too. The aws-sdk/clients/ssooidc's createToken method returned a token valid for 7 days (no Leapp overhead). We tried to force a previous version of the AWS SDK, but it still wasn't working. Now it seems to work as expected, returning a token valid for 8 hours.

@BPCS-wit
Copy link
Author

So, the behavior changed for me. Now I am getting 8 hours (as expected) for session duration. After the 8 hours a new token is generated. For me, the app is now working as expected.
Maybe an issue on the AWS site?

@ericvilla
Copy link
Contributor

Yes @BPCS-wit, it was not related to Leapp itself but to the AWS SSO createToken API response. I'm going to close the issue

ericvilla added a commit that referenced this issue Feb 24, 2022
feat: new Segment filtering feature

fix(#209): Maintain IAM Role Chained Configurations based on SSO Assumer session

fix(#217): gpu_init on WSL2 - Leapp_0.8.1_amd64.deb

fix(#220): AWS Session Expiration Issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants