Puppet 4.6 reference manual

Certificate Status

The certificate status endpoint allows a client to read or alter the status of a certificate or pending certificate request. It is only useful on the CA.

Under Puppet Server’s CA service, the environment parameter is ignored and can be omitted. Under a Rack or WEBrick Puppet master, environment is required and must be a valid environment, but it has no effect on the response.


GET /puppet-ca/v1/certificate_status/:certname?environment=:environment
Accept: pson

Retrieve information about the specified certificate. Similar to puppet cert --list :certname.

GET /puppet-ca/v1/certificate_statuses/:any_key?environment=:environment
Accept: pson

Retrieve information about all known certificates. Similar to puppet cert --list --all. A key is required but is ignored.


PUT /puppet-ca/v1/certificate_status/:certname?environment=:environment
Content-Type: text/pson

Change the status of the specified certificate. The desired state is sent in the body of the PUT request as a one-item PSON hash; the two allowed complete hashes are {"desired_state":"signed"} (for signing a certificate signing request; similar to puppet cert --sign) and {"desired_state":"revoked"} (for revoking a certificate; similar to puppet cert --revoke).

Note that revoking a certificate will not clean up other info about the host - see the DELETE request for more information.


DELETE /puppet-ca/v1/certificate_status/:hostname?environment=:environment
Accept: pson

Cause the certificate authority to discard all SSL information regarding a host (including any certificates, certificate requests, and keys). This does not revoke the certificate if one is present; if you wish to emulate the behavior of puppet cert --clean, you must PUT a desired_state of revoked before deleting the host’s SSL information.

If the deletion was successful, it returns a string listing the deleted classes like

"Deleted for myhost: Puppet::SSL::Certificate, Puppet::SSL::Key"

Otherwise it returns

"Nothing was deleted"

Supported HTTP Methods

This endpoint is disabled in the default configuration. It is recommended to be careful with this endpoint, as it can allow control over the certificates used by the puppet master.


Supported Response Formats


This endpoint can produce yaml as well, but the returned data is incomplete.


Certificate information

GET /puppet-ca/v1/certificate_status/mycertname?environment=env

HTTP/1.1 200 OK
Content-Type: text/pson


Revoking a certificate

PUT /puppet-ca/v1/certificate_status/mycertname?environment=production HTTP/1.1
Content-Type: text/pson
Content-Length: 27


This has no meaningful return value.

Deleting the certificate information

DELETE /puppet-ca/v1/certificate_status/mycertname?environment=production HTTP/1.1

Gets the response:

"Deleted for mycertname: Puppet::SSL::Certificate, Puppet::SSL::Key"


Find and search operations return objects which conform to the host schema.

Back to top