Giter VIP home page Giter VIP logo

gonelogin's Introduction

gonelogin

A simple onelogin -> aws cli client.

build

Copy the example/config.go into your main folder and change the constants to your organisations onelogin settings. Then run make to build gonelogin.

use

You can list available AWS roles by leaving the -role-arn parameter empty:

$ gonelogin \
    -username "<your onelogin username or email>" \
    -password "<your onelogin password>" \
    -mfa-code "<your onelogin mfa code>"
Successfully logged into onelogin
Available roles:
arn:aws:iam::111111111111:role/some-role
arn:aws:iam::222222222222:role/some-role
arn:aws:iam::222222222222:role/some-other-role

Assume into a single role by stating so:

$ gonelogin \
    -username "<your onelogin username or email>" \
    -password "<your onelogin password>" \
    -mfa-code "<your onelogin mfa code>" \
    -role-arn arn:aws:iam::111111111111:role/some-role
Successfully logged into onelogin
Wrote session token for profile some-role
Token is valid until: 2018-01-08 11:38:03 +0000 UTC

Use the AWS profile as always e.g. be running aws sts get-caller-identity --profile some-role.

You may specify the target role name by setting the -profile parameter as well.

Assume into multiple roles ar onc by stating multiple role arns like this:

$ gonelogin \
    -username "<your onelogin username or email>" \
    -password "<your onelogin password>" \
    -mfa-code "<your onelogin mfa code>" \
    -role-arn arn:aws:iam::111111111111:role/some-role,arn:aws:iam::222222222222:role/some-other-role
Successfully logged into onelogin
Wrote session token for profile some-role
Token is valid until: 2018-01-08 11:40:39 +0000 UTC
Wrote session token for profile some-other-role
Token is valid until: 2018-01-08 11:40:39 +0000 UTC

You may specify the target role names by setting the -profile parameter as well with multiple roles:

$ gonelogin \
    -username "<your onelogin username or email>" \
    -password "<your onelogin password>" \
    -mfa-code "<your onelogin mfa code>" \
    -role-arn arn:aws:iam::111111111111:role/some-role,arn:aws:iam::222222222222:role/some-role,arn:aws:iam::222222222222:role/some-other-role \
    -profile some-profile,some-other-profile,yet-another-profile
Successfully logged into onelogin
Wrote session token for profile some-profile
Token is valid until: 2018-01-08 11:40:39 +0000 UTC
Wrote session token for profile some-other-profile
Token is valid until: 2018-01-08 11:40:39 +0000 UTC
Wrote session token for profile yet-another-profile
Token is valid until: 2018-01-08 11:40:39 +0000 UTC

gonelogin's People

Contributors

felixb avatar

Stargazers

 avatar

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.