Git Product home page Git Product logo

spiffe-aws2-credential-process's Introduction

Integrate Spiffe and AWS credential-process

To use the spiffe token in AWS CLI/library, one is required to fetch the token and put that into a file for AWS CLI/library to consume.

This small utility simplifies the process by using the credential-process configuration.

Example

Before one would need to configure their .aws/config like this

[profile default]
role_arn = arn:aws:iam::123456789012:role/my-role
web_identity_token_file = /var/tmp/spiffe.creds.jwt

and have a process to periodically update the content of /var/tmp/spiffe.creds.jwt with a valid token.

Here we can simplify it to be

[profile default]
credential_process = spiffe-aws2-credential-process --role-arn arn:aws:iam::123456789012:role/my-role

Installation

# go install github.com/phsiao/spiffe-aws2-credential-process

The current supported options and their defaults are:

  -audience string
    	Audience the JWT token will be for (default "sts.amazonaws.com")
  -role-arn string
    	ARN of the role to assume
  -role-session-name string
    	Role session name to use (default "spiffe-aws2-credential-process")
  -session-duration duration
    	The duration, in seconds, of the role session. (default 1h0m0s)
  -socketPath string
    	Socket path to talk to spiffe agent (default "unix:/tmp/agent.sock")
  -spiffe-id string
    	Request a specific SPIFFE ID (instead of all SPIFFE IDs)
  -timeout duration
    	timeout waiting for the process to finish (default 10s)

spiffe-aws2-credential-process's People

Contributors

phsiao avatar

Watchers

 avatar  avatar  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.