Git Product home page Git Product logo

credential_process_toold's Introduction

Build Status

credential_process_toold

Convert credential_process inside aws credentials file to an older style creds file.

Install

go get -u github.com/cep21/credential_process_toold

With go1.11 or later,

GO111MODULE=on go get -u github.com/cep21/[email protected]

Why

Some older programs do not understand the credential_process field inside ~/.aws/credentials files. To get around this, you can read the file and regenerate it with credentials from an external process in a format that older cli programs will understand.

Example

Let's say you have a ~/.aws/credentials file like this.

[company-hatmaker]
region                = us-west-2
credential_process    = some_process --account-id 12345 --role Admin

[company-shoemaker]
region                = us-west-2
credential_process    = some_process --account-id 67891 --role Admin

You could then run the credential_process_toold binary on this file and pipe the output to another file

credential_process_toold generate > /tmp/another_file

If you were to cat this file, you will see generated credentials from the credentials_process.

[company-hatmaker]
region                = us-west-2
credential_process    = some_process --account-id 12345 --role Admin
aws_access_key_id     = DEADBEAFDEADBEAFDEADBEAF
aws_secret_access_key = ABCDEFG/ABCDEFGABCDEFG0123+
aws_session_token     = ABCDEFGABCDEFGABCDEFGABCDEFG+DEADBEAF+333211111


[company-shoemaker]
region                = us-west-2
credential_process    = some_process --account-id 67891 --role Admin
aws_access_key_id     = DEADBEAFDEADBEAFDEADBEAF
aws_secret_access_key = ABCDEFG/ABCDEFGABCDEFG0123+
aws_session_token     = ABCDEFGABCDEFGABCDEFGABCDEFG+DEADBEAF+333211111

You can now explicitly set the credentials file to what you generated and run older AWS-CLI style commands.

AWS_SHARED_CREDENTIALS_FILE=/tmp/another_file terraform init

credential_process_toold's People

Contributors

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