Git Product home page Git Product logo

oktaws's Introduction

Build and Test

oktaws

This program authenticates with Okta, assumes a provided role, and pulls a temporary key with STS to support the role assumption built into the aws cli.

Installation

Grab a binary for your OS from the latest release, and put it somewhere in your PATH. Linux, MacOS and Windows OSes are supported.

Setup

Run oktaws init to have oktaws generate a config file for you. You will be prompted for various config items.

Oktaws configuration resides in ~/.oktaws/<OKTA ACCOUNT>.toml files, and have the following fields:

username = '<USERNAME>'
role = '<DEFAULT ROLE>'

[profiles]
profile1 = '<OKTA APPLICATION NAME>'
profile2 = { application = '<OKTA APPLICATION NAME>', role = '<ROLE OVERRIDE>' }

The role value above is the name (not ARN) of the role you would like to log in as. This can be found when logging into the AWS console through Okta.

The ~/.aws/config file is read for information, but not modified. See Assuming a Role for information on configuring the AWS CLI to assume a role.

Usage

You can run oktaws refresh profile1 to generate keys for a single profile, or just oktaws refresh to generate keys for all profiles.

$ oktaws refresh [AWS profile]
$ aws --profile [AWS profile] [command]

for example

$ oktaws refresh production
$ aws --profile production ec2 describe-instances

Debugging

Login didn't work? Use the -v flag to emit more verbose logs. Add more -vs for increased verbosity:

$ oktaws refresh production -vv

Upgrading

v0.15

oktaws v0.15 contains potentially breaking changes to the interface by introducing subcommands.

If your profile name conflicts with a subcommand, then you must use the oktaws refresh <profile> syntax, to disambiguate the profile from subcommands.

M1 Issues

There are currently publish issues related to M1 macos artifacts. I recommend using x86_64 artifacts through rosetta until this is resolved

Contributors

  • Jonathan Morley [@jonathanmorley]

oktaws's People

Contributors

bors[bot] avatar buerkle avatar darethas avatar dependabot-preview[bot] avatar dependabot[bot] avatar endemics avatar hopkinsth avatar jonathanmorley avatar lstanden avatar pinko-fowle avatar tlunter avatar

Forkers

isabella232

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.