View and copy the most recent SAML response from the web browser.
This is useful for giving other programs (e.g. a CLI utility) a SAML response.
Works with Google Chrome and Mozilla Firefox.
Or download ZIP from Releases and manually install as a browser extension.
-
Perform your normal SAML login via Chrome.
-
Click on the key icon in the upper right.
-
Copy the base64 encoded or raw SAML response.
The was developed after running into anti-robot measures with GSuite SAML. Instead of replicating a browser, this approach uses your real browser and human to authenticate; after which the SAML can be copy-pasted to its destination.
Use GSuite as the IdP where the SP is the AWS CLI.
- Go to the SAML sign in URL, e.g. https://accounts.google.com/o/saml2/initsso?idpid=A0000000&spid=000000000000&forceauthn=false, and enter credentials.
- After being redirected to the AWS web console, copy the base-64 encoded SAML response captured by the browser extension.
- Run the command
aws sts assume-role-with-saml
or the even more convenient aws-cli-saml. - Paste the SAML response, and a credentialed session is created for the AWS CLI.
make extension
Navigate to chrome://extensions/ in Google Chrome, enable developer mode, and load unpacked extension from target/ng/dev/.
make format
make explore
Open target/explore.html.