External SSL termination
Use the following steps to configure external SSL termination.
Disable HTTPS for Puppet Server
You'll need to turn off SSL and have Puppet Server use the HTTP protocol instead: remove the
ssl-host settings from the
conf.d/webserver.conf file and replace them with
host settings. See Configuring the Webserver Service for more information on configuring the web server service.
Allow Client Cert Data From HTTP Headers
When using external SSL termination, Puppet Server expects to receive client certificate information via some HTTP headers.
By default, reading this data from headers is disabled. To allow Puppet
Server to recognize it, you'll need to set
authorization config section of the
See Puppet Server Configuration for more
information on the
Note: This assumes the default behavior of Puppet 5 and greater of using Puppet Server's hocon auth.conf rather Puppet's older ini-style auth.conf.
allow-header-cert-infoto 'true' puts Puppet Server in an incredibly vulnerable state. Take extra caution to ensure it is absolutely not reachable by an untrusted network.
allow-header-cert-infoset to 'true', authorization code will use only the client HTTP header values---not an SSL-layer client certificate---to determine the client subject name, authentication status, and trusted facts. This is true even if the web server is hosting an HTTPS connection. This applies to validation of the client via rules in the auth.conf file and any trusted facts extracted from certificate extensions.
client-authsetting in the
webserverconfig block is set to
want, the Jetty web server will still validate the client certificate against a certificate authority store, but it will only verify the SSL-layer client certificate---not a certificate in an
Reload Puppet Server
You'll need to reload Puppet Server for the configuration changes to take effect.
Configure SSL Terminating Proxy to Set HTTP Headers
The device that terminates SSL for Puppet Server must extract information from the client's certificate and insert that information into three HTTP headers. See the documentation for your SSL terminator for details.
The headers you'll need to set are
Mandatory. Must be either
SUCCESS if the certificate was validated, or something else if not. (The convention seems to be to use
NONE for when a certificate wasn't presented, and
FAILED:reason for other validation failures.) Puppet Server uses this to authorize requests; only requests with a value of
SUCCESS will be considered authenticated.
Mandatory. Must be the Subject DN of the agent's certificate, if a certificate was presented. Puppet Server uses this to authorize requests.
Optional. Should contain the client's PEM-formatted (Base-64)
certificate (if a certificate was presented) in a single URI-encoded string.
Note that URL encoding is not sufficient; all space characters must be
%20 and not
Note: Puppet Server only uses the value of this header to extract trusted facts from extensions in the client certificate. If you aren't using trusted facts, you can choose to reduce the size of the request payload by omitting the
mod_proxyconverts line breaks in PEM documents to spaces for some reason, and Puppet Server can't decode the result. We're tracking this issue as SERVER-217.