GithubHelp home page GithubHelp logo

sts's Introduction

STS

STS is a command-line application to obtain temporary credentials via the AWS (Amazon Web Services) Security Token Service.
It's intended to be a drop-in replacement for the functionality provided by the official awscli application: https://aws.amazon.com/cli/ .

Benefits

  • Option to drop into a shell with the temporary credentials already set
  • Automatically acquire MFA device serial (via IAM request and checking environment variables)
  • Option to unset AWS environment variables first, so that subsequent calls for get-session-token etc. don't attempt to use existing temporary credentials
  • Native binary available, so simpler installation with no dependencies

Known issues

  • STS currently assumes you are using an MFA device, so always requests a token code. If MFA isn't activated, then hit <enter> to bypass 'Enter token value:' prompt.
  • assume-role-with-saml not yet implemented
  • assume-role-with-web-identity not yet implement
  • minimal testing on Windows

Roadmap

  • proper documentation
  • bash/zsh completion

Installation

Download the latest release for your OS and architecture from: https://github.com/jonhadfield/sts/releases.

For example, on 64-bit Linux:

curl -L "https://github.com/jonhadfield/sts/releases/download/1.1.0/sts_linux_amd64" -o /usr/local/bin/sts ; chmod +x /usr/local/bin/sts

on MacOS:

curl -L "https://github.com/jonhadfield/sts/releases/download/1.1.0/sts_darwin_amd64" -o /usr/local/bin/sts ; chmod +x /usr/local/bin/sts

Example Usage

Note: In order to get temporary credentials, you must first provide your permanent credentials as detailed here.

Obtain temporary credentials for a user:

sts get-session-token --serial-number arn:aws:iam::123456789012:mfa/user --token-code 123456

Obtain temporary credentials for an assumed role:

sts assume-role --role-session-name myrolesession --role-arn arn:aws:iam::123456789012:role/myrole

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.