pyro2927 / AWS_SSO_Containers

Firefox extension to route AWS SSO logins into unique containers.
https://addons.mozilla.org/en-US/firefox/addon/aws-sso-containers/
55 stars 16 forks source link

Handle SAML SSO login flow #18

Closed leodag closed 3 months ago

leodag commented 3 months ago

Closes #11.

I didn't really know how the login flow worked so it was made through network request observations and subsequent trial and error: At the end of the SAML login, a request to the same page is made which returns 302 to the AWS Console, and sets some cookies to the .aws.amazonaws.com domain. Just intercepting this 302 and setting those cookies in the desired container's cookie store is enough to get authentication to work.

In the process I ended up converting prepareContainer to an async function and anything that uses it as needed, so there were these two additional changes. I don't have an AWS SSO flow available to test if that's till working fine, but the changes are very straightforward so it should be.

If you'd rather not have these changes (the async part), tell me and I can keep it as it was.

OscarPalafox commented 3 months ago

Confirming MR fixes #11 as stated in this comment. Thanks!

pyro2927 commented 3 months ago

Thanks @leodag! Rolling this out in 1.7