Giter Club home page Giter Club logo

aws-sts-proxy's Introduction

AWS STS Proxy

A simple proxy that can be used to proxy AWS STS based off an oidc token. An oidc token contains all the information about a user that is required to create a temporary sts session and return that session back to the user. The STS session maps back to the user, because the session name is created based on the oidc token's username. Only the server application is allowed to assume the role it is creating tokens for, this allows for us to trust the name of the session name.

Usage

Configuration

EKS_ASSUME_ROLE: The Role to assume from the server
STRING_REQUIREMENT: A string to require in the users email address, or a 403 is thrown.
PORT: A port to run the application on. Default is 8080
HEALTHCHECK: A path to serve the healthcheck on. Default is /hc

Run Locally

dep ensure
go run main.go

POST /sts/token

Returns temproary credentials for a role the server assumes. User must pass Authentication TOKEN Header with request from oidc application. The server creats a session with the email retrieved from the oidc token.

Params
ROLE_ARN = A role the user wants to assume. The server must be able to assume this role or it will return a 403
Duration = The Duration of the temporary credentials. If the role does not accept this duration, the server will return 403.
ExternalId = An optional ExternalID if the role that is being assumed requires it. If this is not passed in and the role expects it, the server will return 403.

request a temporary sts token that maps back to your user

Example

curl -XPOST -H"Authorization: $TOKEN" localhost:8080/sts/token

Build

docker build -t sts-proxy .
docker-compose up

License

aws-sts-proxy is © copyright by WW International.

aws-sts-proxy is licensed under the Apache-2.0 Open Source license.

aws-sts-proxy's People

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.