Coder Social home page Coder Social logo

mtrippled / salt-pillar-vault Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ripple/salt-pillar-vault

0.0 0.0 0.0 12 KB

Saltstack external pillar for Hashicorp Vault with flexible minion targeting

License: Apache License 2.0

Python 100.00%

salt-pillar-vault's Introduction

salt-pillar-vault

Saltstack external pillar for Hashicorp Vault with flexible minion targeting

Requirements

  • hvac python module (>= v0.2.8)

Example Configuration

Your Vault server should be defined in the master config file with the following options:

    ext_pillar:
      - vault:
          url: https://vault:8200
          config: Path or salt:// URL to vault secret configuration
          token: (optional) Explicit token for token authentication
          app_id: (optional) Application ID for app-id authentication
          user_id: (optional) Explicit User ID for app-id authentication
          user_file: (optional) File to read for user-id value
          unset_if_missing: (optional) Leave pillar key unset if Vault secret not found

The url parameter is the full URL to the Vault API endpoint.

The config parameter is the path or salt:// URL to the secret map YML file to be parsed by the master.

The token parameter is an explicit token to use for authentication, and it overrides all other authentication methods.

The app_id parameter is an Application ID to use for app-id authentication.

The user_id parameter is an explicit User ID to pair with app_id for app-id authentication.

The user_file parameter is the path to a file on the master to read for a user-id value if user_id is not specified.

The unset_if_missing parameter determines behavior when the Vault secret is missing or otherwise inaccessible. If set to True, the pillar key is left unset. If set to False, the pillar key is set to None. Default is False

Mapping Vault Secrets to Minions

The config parameter, above, is a path to the YML file which will be used for mapping secrets to minions. The map uses syntax similar to the top file, and will be processed as a Jinja template:

    'filter':
      'variable': 'path'
      'variable': 'path?key'
    'filter':
      'variable': 'path?key'

Each filter is a compound matcher: https://docs.saltstack.com/en/latest/topics/targeting/compound.html

variable is the name of the variable which will be injected into the pillar data.

path is the path the desired secret on the Vault server.

key is optional. If specified, only this specific key will be returned for the secret at path. If unspecified, the entire secret json structure will be returned.

    'web*':
      'ssl_cert': '/secret/certs/domain?certificate'
      'ssl_key': '/secret/certs/domain?private_key'
    'db* and [email protected]':
      'db_pass': '/secret/passwords/database'
    '*':
      'my_key': '/secret/certs/{{ grains.id }}?private_key'

Authors

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.