If you encounter a security vulnerability, or need to change your certs for some other reason (for example, you have a hostname change), you can regenerate the certificates and security credentials (private and public keys) generated for the PE console.

You can regenerate all certificates for the PE console only, including the certificates and keys for associated services running on PuppetDB.

On monolithic installs, the Puppet master shares an agent cert and security credentials with the PuppetDB and the PE console. For a monolithic install, you must regenerate all certs and security credentials.

Before you begin, review the following information:

You must be logged in as a root, (or in the case of Windows agents, as an account with Administrator Privileges) to make these changes.

If you encounter any errors during steps that involve service stop/start, rm, cp, or chmod commands, you should diagnose these before continuing, as the success each step is very important to the success of the next step.

In the following instructions, when <CERTNAME> is used, it refers to the Puppet master’s certname. To find this value, run puppet config print certname before starting.

Unless otherwise indicated, all commands are run on the PE console server.

On the console node, back up the following directories:

/etc/puppetlabs/puppet/ssl/

/opt/puppetlabs/server/data/console-services/certs

On the console node, shut down all PE-related services with the following commands:

On the console node, generate security credentials and request a new certificate from the CA Puppet master. These certs will end up in /etc/puppetlabs/puppet/ssl.

puppet agent --test --no-daemonize --noop

Note: This agent run will not complete successfully, but it is necessary to set up the agent certificate for the node. You will see some errors about node definition and the inability to execute http requests due to the console being offline. You can ignore these.

On the console node, purge the console-services directory.

rm -rf /opt/puppetlabs/server/data/console-services/certs/*

On the PE console node, copy the Puppet agent’s cert and security credentials to the console-services cert directory.