Git Product home page Git Product logo

summon-aws-secrets's Introduction

summon-aws-secrets

Summon provider for AWS Secrets Manager

Install

Use the auto-install script. This will install the latest version of summon-aws-secrets. The script requires sudo to place summon-aws-secrets in /usr/local/lib/summon.

curl -sSL https://raw.githubusercontent.com/cyberark/summon-aws-secrets/master/install.sh | bash

Otherwise, download the latest release and extract it to the directory /usr/local/lib/summon.

If you are running an Alpine-based system, you will need to add libc6 compatiblity package (apk add libc6-compat)!

Variable IDs

Variable IDs are used as identifiers for fetching Secrets. These are made up of a secret name (required) and secret key path (optional).

The format used is my/secret/name#mysecretkeypath, where #mysecretkeypath is optional and only relevant when the value returned by my/secret/name alone is valid JSON.

secret name (required)

This is the AWS secret name, which must be ASCII letters, digits, or any of the following characters: /_+=.@-

secret key path (optional)

The secret key path provides access to top-level values inside secrets stored as valid JSON.

Example

Example Secret JSON in aws:

{
  "user-1": "password-1",
  "user-2": "password-2",
  "user-3": "password-3"
}

Use of summon-aws-secrets without secret key path:

$ summon-aws-secrets prod/aws/iam/user/robot/access_key_id
{ "user-1": "password-1", "user-2": "password-2", "user-3": "password-3"}

Use of summon-aws-secrets with secret key path:

$ summon-aws-secrets prod/aws/iam/user/robot/access_key_id#user-2
password-2

Usage in isolation

Give summon-aws-secrets a variable ID and it will fetch it for you and print the value to stdout.

$ # Configure in similar fashion to AWS CLI see https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
$ summon-aws-secrets prod/aws/iam/user/robot/access_key_id
8h9psadf89sdahfp98

Flags

summon-aws-secrets supports a single flag.

  • -v, --version Output version number and quit

Usage as a provider for Summon

Summon is a command-line tool that reads a file in secrets.yml format and injects secrets as environment variables into any process. Once the process exits, the secrets are gone.

Example

As an example let's use the env command:

Following installation, define your keys in a secrets.yml file

AWS_ACCESS_KEY_ID: !var aws/iam/user/robot/access_key_id
AWS_SECRET_ACCESS_KEY: !var aws/iam/user/robot/secret_access_key

By default, summon will look for secrets.yml in the directory it is called from and export the secret values to the environment of the command it wraps.

Wrap the env in summon:

$ # Configure in similar fashion to AWS CLI see https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
$ summon --provider summon-aws-secrets env
...
AWS_ACCESS_KEY_ID=AKIAJS34242K1123J3K43
AWS_SECRET_ACCESS_KEY=A23MSKSKSJASHDIWM
...

summon resolves the entries in secrets.yml with the AWS Secrets Manager provider and makes the secret values available to the environment of the command env.

Configuration

This provider uses the same configuration pattern as the AWS CLI to connect to AWS.

Contributing

We welcome contributions of all kinds to this repository. For instructions on how to get started and descriptions of our development workflows, please see our contributing guide.

summon-aws-secrets's People

Contributors

andytinkham avatar bradleyboutcher avatar brikelly avatar doodlesbykumbi avatar fangel avatar gl-johnson avatar jakequilty avatar jepperson2 avatar john-odonnell avatar jtuttle avatar juniortaeza avatar lucasvianna avatar pinmarva avatar rpothier avatar sgnn7 avatar stefanhenseler avatar suboptimal avatar szh 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.