Puppet stores its certificate infrastructure in the SSL directory (ssldir) which has a similar structure on all Puppet nodes, whether they are agent nodes, Puppet masters, or the certificate authority (CA) master.

Location

You can change its location using the ssldir setting in the puppet.conf file. See the Configuration reference for more information.

Note: The content of the ssldir is generated, grows over time, and is relatively difficult to replace. Some third-party Puppet packages for Linux place the ssldir in the cache directory (vardir) instead of the confdir. When a distro changes the ssldir location, it sets ssldir in the $confdir/puppet.conf file, usually in the [main] section.

To see the location of the ssldir on one of your nodes, run: puppet config print ssldir

If these files don’t exist on a node, it's because they are generated locally or requested from the CA Puppet master.

Agent and master credentials are identified by certname, so an agent process and a master process running on the same server can use the same credentials.

The ssldir for the Puppet CA, which runs on the CA master, contains similar credentials: private and public keys, certificate, and a master copy of the CRL. It maintains a list of all signed certificates in the deployment, a copy of each signed certificate, and an incrementing serial number for new certificates. To keep it separated from general Puppet credentials on the same server, all of the CA’s data is stored in the ca subdirectory.

The ssldir directory structure

All of the files and directories in the ssldir directory have corresponding Puppet settings, which can be used to change their locations. Generally, though, don't change the default values unless you have a specific problem to work around.

Ensure the permissions mode of the ssldir is 0771. The directory and each file in it should be owned by the user that Puppet runs as: root or Administrator on agents, and defaulting to puppet or pe-puppet on a master. Set up automated management for ownership and permissions on the ssldir.

The ssldir has the following structure. See the Configuration reference for details about each puppet.conf setting listed:

ca.pass: The randomly generated password to the CA’s private key, and one of the most security-critical files in the Puppet certificate infrastructure. Mode: 0640. Setting: capass.

requests (directory): Contains the certificate signing requests (CSRs) that have been received but not yet signed. The CA deletes CSRs from this directory after signing them. Mode: 0755. Setting: csrdir.

<name>.pem: CSR files awaiting signing.

serial: A file containing the serial number for the next certificate the CA signs. This is incremented with each new certificate signed. Mode: 0644. Setting: serial.

signed (directory): Contains copies of all certificates the CA has signed. Mode: 0755. Setting: signeddir.

<name>.pem: Signed certificate files.

certificate_requests (directory): Contains CSRs generated by this node in preparation for submission to the CA. CSRs stay in this directory even after they have been submitted and signed. Mode: 0755. Setting: requestdir.

<certname>.pem: This node’s CSR. Mode: 0644. Setting: hostcsr.

certs (directory): Contains signed certificates present on the node. This includes the node’s own certificate, and a copy of the CA certificate for validating certificates presented by other nodes. Mode: 0755. Setting: certdir.

password: The password to a node’s private key. Usually not present. The conditions in which this file would exist are not defined. Mode: 0640. Setting: passfile.

private_keys (directory): Contains the node's private key and, on the CA, private keys created by the puppet cert generate command. It never contains the private key for the CA certificate. Mode: 0750. Setting: privatekeydir.