Giter Club home page Giter Club logo

puppetlabs-pkcs7's Introduction

pkcs7

Table of Contents

  1. Description
  2. Parameters
  3. Configuration
  4. Usage
  5. Bolt CLI Usage

Description

This module includes Bolt plugins for creating key pairs and encrypting and decrypting sensitive values.

Parameters

pkcs7::secret_createkeys

The pkcs7::secret_createkeys task creates a key pair used to encrypt and decrypt values. It accepts the following values:

Option Type Description Default
force Boolean Whether to overwrite an existing key pair. false
keysize Integer The size of the key to generate. 2048
private_key String The path to the private key. Accepts an absolute path or a path relative to the boltdir. <boltdir>/keys/private_key.pkcs7.pem
public_key String The path to the public key. Accepts an absolute path or a path relative to the boltdir. <boltdir>/keys/public_key.pkcs7.pem

pkcs7::secret_decrypt

The pkcs7::secret_decrypt task decrypts an encrypted value and returns the plaintext. It accepts the following values:

Option Type Description Default
encrypted_value String The encrypted value.
private_key String The path to the private key. Accepts an absolute path or a path relative to the boltdir. <boltdir>/keys/private_key.pkcs7.pem
public_key String The path to the public key. Accepts an absolute path or a path relative to the boltdir. <boltdir>/keys/public_key.pkcs7.pem

pkcs7::secret_encrypt

The pkcs7::secret_encrypt task encrypts a sensitive value and returns an encrypted value. It accepts the following values:

Option Type Description Default
plaintext_value String The value to encrypt.
public_key String The path to the public key. Accepts an absolute path or a path relative to the boltdir. <boltdir>/keys/public_key.pkcs7.pem

Configuration

The pkcs7 plugin can be configured in a bolt.yaml file. The following values can be configured and apply to each plugin that uses the value:

  • keysize
  • private_key
  • public_key

Usage

The pkcs7::secret_decrypt task is aliased to resolve_reference, letting it be used anywhere that a resolve_reference task can be used such as a bolt.yaml, inventory.yaml, or a plan. To use the plugin, write a plugin reference anywhere you need to decrypt an encrypted value:

targets:
  - uri: example.com
    config:
      ssh:
        password:
          _plugin: pkcs7
          encrypted_value: |
            ENC[PKCS7,MY_ENCRYPTED_DATA]

Bolt CLI Usage

The pkcs7 plugins can be used directly from the Bolt CLI using the bolt secret commands. This module is bundled with Bolt and is the default plugin used by the bolt secret commands.

Creating keys

To create keys for a Bolt project, run the following command:

$ bolt secret createkeys [options]

Decrypting a value

To decrypt an encrypted value, run the following command:

$ bolt secret decrypt <encrypted_value> [options]

Encrypting a value

To encrypt plaintext, run the following command:

$ bolt secret encrypt <plaintext_value> [options]

puppetlabs-pkcs7's People

Contributors

beechtom avatar nicklewis avatar

Watchers

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