Forge Home

cfssl

Install and configure CFSSL PKI.

1,156 downloads

107 latest version

4.7 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 3.0.1 (latest)
  • 3.0.0
  • 2.1.1
  • 2.1.0
  • 2.0.0
  • 1.1.0
  • 1.0.0
released Jul 2nd 2024
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 8.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'adullact-cfssl', '3.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add adullact-cfssl
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install adullact-cfssl --version 3.0.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: pki, cfssl

Documentation

adullact/cfssl — version 3.0.1 Jul 2nd 2024

cfssl

This module install and configure CFSSL to serve as a PKI.

Table of Contents

  1. Description
  2. Setup - The basics of getting started with cfssl
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

With this module you can setup a self signed root certificat authority and intermediates authorities signed by the root authority. Then via a API you can serve one of these authorities.

Setup

What cfssl affects

In addition to CFSSL, this module install Go, Goose and PostgreSQL.

Beginning with cfssl

To setup your own self signed root authority, it is as simple as :

class { 'cfssl':
  rootca_manifest => {
    cn      => 'MYEXEMPLE ROOT CA',
    subject => {
      'C' => 'FR',
      'L' => 'MONTPELLIER',
      'O' => 'MYEXEMPLE ORG',
    },
  },
}

From here, you are able to procude certificates from cfssl command line with shell on the host.

Usage

With served self signed root certificate authority

In this example :

  • self signed root ca is installed.
  • this root ca is served via HTTP API server for X509 certificates.
  • a CRL is generated in $cfssl::crldir directory, updated periodicaly as defined by $cfssl::crl_gentimer.
  • the CRL have a duration of validity defined by cfssl::crl_expiry
class { 'cfssl':
  rootca_manifest => {
    cn      => 'MYEXEMPLE ROOT CA',
    subject => {
      'C' => 'FR',
      'L' => 'MONTPELLIER',
      'O' => 'MYEXEMPLE ORG',
    },
  },
  serve_ca        => 'MYEXEMPLE ROOT CA',
  crl_manage      => true,
}

With served intermediate certificate authority

In this example :

  • a self signed root authority is installed.
  • an intermediate authority signed by root authority is installed.
  • this intermediate authority is served via HTTP API server for X509 certificates.
  • CRL are generated in $cfssl::crldir directory, updated periodicaly as defined by $cfssl::crl_gentimer.
  • the CRL have a duration of validity defined by cfssl::crl_expiry
class { 'cfssl':
  rootca_manifest => {
    cn      => 'MYEXEMPLE ROOT CA',
    subject => {
      'C' => 'FR',
      'L' => 'MONTPELLIER',
      'O' => 'MYEXEMPLE ORG',
    },
  },
  intermediatesca => {
    'MYEXEMPLE INTERMDIATE CA' => {
      subject => {
        'C' => 'FR',
        'L' => 'MONTPELLIER',
        'O' => 'MYEXEMPLE ORG',
      },
    },
  },
  serve_ca   => 'MYEXEMPLE INTERMDIATE CA',
  crl_manage => true,
}

Note about authkey

With CFSSL serve, it is possible to restrict acces to end points sign and authsign. In this case a key have to be configured in serve_config parameter. It is possible to generated a key with this command : hexdump -n 16 -e "4/4 \"%08X\" 1 \"\n\"" /dev/random

Reference

Details are in REFERENCE.md file.

Limitations

Supported OSes are given in metadata.json file.

Development

Home at URL https://gitlab.adullact.net/adullact/puppet-cfssl

Issues and MR are welcome.

Release Notes/Contributors/Etc.

Details in CHANGELOG.md.

Copyright (C) 2018 Association des Développeurs et Utilisateurs de Logiciels Libres
                     pour les Administrations et Colléctivités Territoriales.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/agpl.html>.