GithubHelp home page GithubHelp logo

lob / aws-creds Goto Github PK

View Code? Open in Web Editor NEW
12.0 50.0 6.0 132 KB

CLI tool to authenticate with Okta as the IdP to fetch AWS credentials

License: MIT License

Makefile 2.42% Go 96.76% Shell 0.82%
aws okta sts idp saml cli credentials

aws-creds's People

Contributors

dmlittle avatar imwillx avatar katiebalcewicz avatar kpflum-lob avatar kylekwong avatar muminkhan avatar nyergler avatar pop avatar robinjoseph08 avatar robotnerd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-creds's Issues

README

This repo needs some docs, especially since it's public.

Pre-built binary releases

The only way to install aws-creds right now is to manually build a binary.

It'd be much nicer to have releases with pre-built binaries using a script that looks something like this:

#!/bin/bash

# Need to use an older version of go for this release
export PATH=/usr/local/opt/[email protected]/bin:$PATH

# Only supporting amd64 for now
export GOARCH=amd64

# Hard-coding version, could derive from tag
export VERSION=v1.0.6

# Build for all major platforms
for os in $(echo darwin windows linux); do
    # Set the OS for this build
    export GOOS=$os

    # Set the binary name
    export AWS_CREDS_BIN=aws-creds_${VERSION}_${GOOS}_${GOARCH}

    # Debugging output
    echo "Building ${AWS_CREDS_BIN}"

    # Build the binary
    go build \
        -o bin/${AWS_CREDS_BIN} \
        -ldflags "-s -w -X github.com/lob/aws-creds/cmd.version=${VERSION}";
done

# Build shasum file
echo "Building checksums file"
pushd bin
    shasum -a 256 aws-creds_${VERSION}_* > aws-creds_$VERSION.sha256sum
popd

echo "Done"

A few problems with this are that MacOS doesn't like this at all and in fact it bars users from running binaries downloaded form GitHub built this way.

  • Figure out how to successfully build valid MacOS/Linux/Windows binaries.
  • Document how to build the release artifacts.
  • Add the release artifact builder to the repo.
  • Automate build + release steps.

Allow users to disable keyring interaction in .config

Headless users of aws-creds on Linux can not use zalando/go-keyring due to a known issue of gnome-keychain being incompatible in an env with no X11 server / gui.

$ aws-creds -p sandbox
The name org.freedesktop.secrets was not provided by any .service files

Installing gnome-keyring yields

$ sudo apt install gnome-keyring 
$ aws-creds -p sandbox
failed to unlock correct collection '/org/freedesktop/secrets/aliases/default'

There might be a potential workaround using gnome-keyring-daemon like:

$ gnome-keyring-daemon -r -d --unlock

but I found it to be quite brittle on WSL2, asking once and failing to prompt on subsequent re-runs of aws-creds

It would be really helpful if we can disable the keyring functionality in pkg/cmd/refresh.go by setting a flag in $HOME/.aws-creds/config or with a -p/-a argument from the cli like: aws-creds -a --no-keyring for one-off's.

if the user specifies a duration that's too long it'll print an error

nit: if the user specifies a duration that's too long it'll print an error, but there's no context about which env is the problem. Maybe check to see if the dur is over 12hrs or just put something like fmt.Fprintln(os.Stderr, "Failed to get creds for " + profile.Name) on line 54 (the error channel will print context at the end...not great but better than nothing ¯\_(ツ)_/¯)

Originally posted by @kpflum-lob in #30 (comment)

dbus error on ubuntu

I built and installed on ubuntu
I have this error when I run aws-creds
dbus: couldn't determine address of session bus

Add License

Hi, cool tool! Been looking for something like this, might like to use it or at least take inspiration from it.

Please add a license so I may do so!

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.