Code Monkey home page Code Monkey logo

aws-auth-interceptor's Introduction

aws-auth-interceptor

Intercepts previously authenticated SSO sessions by attaching to google chrome via remote devtools. Returns a list of available accounts/roles for login into AWS.

Attaches to an authenticated session, intercepts the samlResponse and gathers a list of available accounts/roles.

Logs in and configures the AWS CLI with the chosen account - with the persisted session in the browser.

Usage

Make sure Google Chrome is running with remote devtools enabled /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 &

Ensure you are already authenticated with your SSO (e.g - clicking through to the AWS SSO link shows the account login landing page)

The below has been tested with google SSO - others are untested thus far.

AWS_LOGIN_URL = The SSO link which provides access to the AWS login landing page, authenticating your session. export AWS_LOGIN_URL=https://your.sso.link.here.com export AWS_SAML_PROVIDER_NAME=your-saml-provider-name-here (the last part of the arn)

go run main.go (will build soon)

TODOs

  • Possibly hook up with native google login? (or do that in another tool)
  • Clean up the way the DOM tree is traversed
  • Clean up error handling
  • Split into different functions/packages
  • Change how the commands are written (aws configure), we can probably bus it
  • Add github actions builder
  • Tests?

aws-auth-interceptor's People

Contributors

j-nix avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.