Venafi Tools for Salt


First, you need to configure the master file. This is because all module functions require either a configured api_key (for Cloud) or a ttp_user with a tpp_password and a base_url (for Trust Platform).

For Venafi Cloud:

  api_key: abcdef01-2345-6789-abcd-ef0123456789
  base_url: ""    (optional)

If you don't have a Venafi Cloud account, you can sign up for one on the enrollment page.

For Venafi Platform:

  base_url: ""
  tpp_user: admin
  tpp_password: "Str0ngPa$$w0rd"
  trust_bundle: "/opt/venafi/bundle.pem"

It is not common for the Venafi Platform's REST API (WebSDK) to be secured using a certificate issued by a publicly trusted CA, therefore establishing trust for that server certificate is a critical part of your configuration. Ideally this is done by obtaining the root CA certificate in the issuing chain in PEM format and copying that file to your Salt Master (e.g. /opt/venafi/bundle.pem). You then reference that file using the 'trust_bundle' parameter as shown above.

For the Venafi module to create keys and certificates it is necessary to enable external pillars. This is done by adding the following to the /etc/salt/master file:

  - venafi: True

Runner Functions


This command is used to enroll a certificate from Venafi Cloud or Venafi Platform.


ID of the minion for which the certificate is being issued. Required.


DNS subject name for the certificate. Required if csr_path is not specified.


Full path name of certificate signing request file to enroll. Required if dns_name is not specified.


Venafi Cloud zone ID or Venafi Platform folder that specify key and certificate policy. Defaults to "Default". For Venafi Cloud, the Zone ID can be found in the Zone page for your Venafi Cloud project.


Business Unit, Department, etc. Do not specify if it does not apply.


Exact legal name of your organization. Do not abbreviate.


City/locality where your organization is legally located.


State or province where your organization is legally located. Must not be abbreviated.


Country where your organization is legally located; two-letter ISO code.


Password for encrypting the private key.

The syntax for requesting a new certificate with private key generation looks like this:

salt-run venafi.request \
country=US state=California loc=Sacramento org="Company Name" org_unit=DevOps \
zone=Internet key_password=SecretSauce

And the syntax for requesting a new certificate using a previously generated CSR looks like this:

salt-run venafi.request csr_path=/tmp/minion.req zone=Internet


This command is used to show last issued certificate for domain.


DNS subject name of the certificate to look up.

salt-run venafi.show_cert


This command lists domains that have been cached on this Salt Master.

salt-run venafi.list_domain_cache


This command deletes a domain from the Salt Master's cache.


A domain name, or a comma-separated list of domain names, to delete from this master's cache.

salt-run venafi.del_cached_domain

Transfer certificate to a minion

To transfer a cached certificate to a minion, you can use Venafi pillar.

Example state (SLS) file:

      - contents_pillar:
      - replace: True

      - contents_pillar:
      - replace: True

      - contents_pillar:
      - replace: True