Puppet HTTP API: Certificate Status

This version is no longer supported, maintained, or updated. For current versions, see Puppet versions and packages.

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.

In all requests the :environment must be given, but it has no bearing on the request. Certificates are global.


GET /:environment/certificate_status/:certname
Accept: pson

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

GET /:environment/certificate_statuses/:any_key
Accept: pson

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


PUT /:environment/certificate_status/:certname
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 /:environment/certificate_status/:hostname
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 /env/certificate_status/mycertname

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


Revoking a certificate

PUT /production/certificate_status/mycertname HTTP/1.1
Content-Type: text/pson
Content-Length: 27


This has no meaningful return value.

Deleting the certificate information

DELETE /production/certificate_status/mycertname 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.

How helpful was this page?
Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.