Coder Social home page Coder Social logo

pillarcrypt's Introduction

Pillarcrypt

Decrypt gpg secrets stored in any ext_pillar. The implementation is more or less identical to the one used in varstack.

Make sure you have a keypair available on the salt master. Follow this guide to set it up: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html#setup

Installation

Pillarcypt is installed by

  1. placing the decrypt.py in the pillar extension module subfolder. The tree should look like this:
extension_modules/
└── pillar
    └── decrypt.py

For more information, see http://docs.saltstack.com/en/latest/ref/configuration/master.html#extension-modules

  1. Adding decrypt to the ext_pillar directive in the salt master config:
ext_pillar:
  - decrypt: {}

Configuration

By default the module will look for your keys under /etc/salt/gpgkeys, per the salt gpg renderer documentation: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html#setup

If you want to change that (or any other parameter), you can pass in options to gnupg in the salt master config like so:

ext_pillar:
  - decrypt:
    - homedir: /path/to/gnupg/homedir
    - verbose: True

All available options can be found in the gnupg documenation: http://pythonhosted.org/gnupg/gnupg.html#gnupg-module

Dependency

Install python-gnupg - https://pythonhosted.org/python-gnupg/

pip install python-gnupg

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.