Skip to content

See most recent SAML response in the browser

License

Notifications You must be signed in to change notification settings

rivethealth/chrome-saml

Repository files navigation

Chrome SAML

Chrome extension

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.

Screenshot

Install

Chrome Web Store

Or download ZIP from Releases and manually install as a browser extension.

Usage

  1. Perform your normal SAML login via Chrome.

  2. Click on the key icon in the upper right.

  3. Copy the base64 encoded or raw SAML response.

Rationale

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.

Example

Use GSuite as the IdP where the SP is the AWS CLI.

  1. 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.
  2. After being redirected to the AWS web console, copy the base-64 encoded SAML response captured by the browser extension.
  3. Run the command aws sts assume-role-with-saml or the even more convenient aws-cli-saml.
  4. Paste the SAML response, and a credentialed session is created for the AWS CLI.

Developing

Run

Requires GNU Make and yarn.

make extension

Navigate to chrome://extensions/ in Google Chrome, enable developer mode, and load unpacked extension from target/ng/dev/.

Format

make format

Explore size

make explore

Open target/explore.html.