Forge Home

lab_cert

The mha-lab_cert module is the companion module to mha-lab_ca.

4,952 downloads

4,952 latest version

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

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.0 (latest)
released Nov 20th 2018
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 7.0.0
  • , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'mha-lab_cert', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add mha-lab_cert
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install mha-lab_cert --version 0.1.0

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

Documentation

mha/lab_cert — version 0.1.0 Nov 20th 2018

lab_cert

Table of Contents

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

Description

The mha-lab_cert module is the companion module to mha-lab_ca a SSL Certificate Authority for Lab and development environments.

In use the mha-lab_cert module takes a FQDN or a CNAME with or without an Array of alternate DNS names. Then generate x509 key and csr file. It then sends the csr to lab_ca for signing and retrives the signed certificate.

Please exercise caution if you use this module it was designed be simple and usable. With limited security measures. The design goal is to be able generate 'in house' certificates that can be used in web browsers and for server to server communications.

Setup

Setup Requirements

At the minimum update (in init.pp) the following from the defaults!

  $cert_share = 'lab-ca.example.com:/Certificates',

In lab_cert::cert you may want to change the following:

  $country   = 'CA',
  $state     = 'Ontario',
  $city      = 'Ottawa',
  $org       = 'Example',
  $org_unit  = 'Certificate Administration',
  $caemail   = 'cert_admin@example.com',

Note: The Server that runs lab_ca NFS exports a CA Store.

  $certs_nfs        = '/srv/nfs'
  $certs_base       = "${certs_nfs}/Certificates"

The lab_cert helper scripts will mount and umount $cert_share as needed.

Beginning with lab_cert

Note: the lab_cert::cert class will add our CN to the alt_names list

  lab_cert::cert { 'www.example.com':
    alt_names => [ 'www2.example.com' ],
    country   => 'US',
    org       => 'Example.com, LLC',
    org_unit  => 'Web Team',
    state     => 'CA',
  }

To make a certificate for the host:

  lab_cert::cert { $::fqdn:
    alt_names => [ $::hostname ],
  }

Reference

This Puppet module is in part based on arusso/ssl by: Aaron Russo. From original it has had a lot of changes...

Limitations

Developed and tested on CentOS 7.5. But should be good for RHEL 7.x. Also with Puppet 5.5 and Foreman for the GUI. (See theforeman.org)

Development

At the moment please email suggestions to the code and default config files.

Note: At the moment this code is in the early stages of development it still needs a few enhancements. As time permits or a need crops up I plan to look into them.