Provides implementation for the Vault PKI Secret backend APIs
Extends
- Vaulted
Methods
-
<inner> createCertRole( [mountName])
-
Creates or updates the role definition
Parameters:
Name Type Argument Default Description options.idstring role name
options.body.ttlstring <optional>
Time To Live value provided as a string duration with time suffix
options.body.max_ttlstring <optional>
maximum Time To Live provided as a string duration with time suffix
options.body.allow_localhoststring <optional>
true indicates clients can request certificates for localhost
options.body.allowed_domainsstring <optional>
Designates the domains of the role
options.body.allow_bare_domainsstring <optional>
false Designates clients can request certificates matching the value of the actual domains themselves
options.body.allow_subdomainsstring <optional>
false Designates clients can request certificates with CNs that are subdomains of the CNs allowed by the other role options.
options.body.allow_any_namestring <optional>
false Designates clients can request any CN
options.body.enforce_hostnamesstring <optional>
true Designates only valid host names are allowed for CNs, DNS SANs, and the host part of email addresses
options.body.allow_ip_sansstring <optional>
true Designates clients can request IP Subject Alternative Names
options.body.server_flagstring <optional>
true Designates certificates are flagged for server use
options.body.client_flagstring <optional>
true Designates certificates are flagged for client use
options.body.code_signing_flagstring <optional>
false Designates certificates are flagged for code signing use
options.body.email_protection_flagstring <optional>
false Designates certificates are flagged for email protection use
options.body.key_typestring <optional>
rsa type of key to generate for generated private keys
options.body.key_bitsstring <optional>
2048 number of bits to use for the generated keys
options.body.use_csr_common_namestring <optional>
false Designates when used with the CSR signing endpoint, the common name in the CSR will be used instead of taken from the JSON data
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> deleteCertRole( [mountName])
-
Deletes the role definition
Parameters:
Name Type Argument Default Description options.idstring role name
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> genIntermediatesExported( [mountName])
-
Generates a new private key and a CSR for signing (with private key)
Parameters:
Name Type Argument Default Description options.body.common_namestring The requested CN for the certificate
options.body.alt_namesstring <optional>
Requested Subject Alternative Names, in a comma-delimited list
options.body.ip_sansstring <optional>
Requested IP Subject Alternative Names, in a comma-delimited list
options.body.formatstring <optional>
pem Format for returned data
options.body.key_typestring <optional>
rsa Desired key type
options.body.key_bitsstring <optional>
2048 The number of bits to use
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> genIntermediatesInternal( [mountName])
-
Generates a new private key and a CSR for signing (without private key)
Parameters:
Name Type Argument Default Description options.body.common_namestring The requested CN for the certificate
options.body.alt_namesstring <optional>
Requested Subject Alternative Names, in a comma-delimited list
options.body.ip_sansstring <optional>
Requested IP Subject Alternative Names, in a comma-delimited list
options.body.formatstring <optional>
pem Format for returned data
options.body.key_typestring <optional>
rsa Desired key type
options.body.key_bitsstring <optional>
2048 The number of bits to use
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> genRootExported( [mountName])
-
Generates a new self-signed CA certificate and private key
Parameters:
Name Type Argument Default Description options.body.common_namestring The requested CN for the certificate
options.body.alt_namesstring <optional>
Requested Subject Alternative Names, in a comma-delimited list
options.body.ip_sansstring <optional>
Requested IP Subject Alternative Names, in a comma-delimited list
options.body.ttlstring <optional>
Requested Time To Live
options.body.formatstring <optional>
pem Format for returned data
options.body.key_typestring <optional>
rsa Desired key type
options.body.key_bitsstring <optional>
2048 The number of bits to use
options.body.max_path_lengthstring <optional>
-1 the maximum path length to encode in the generated certificate
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> genRootInternal( [mountName])
-
Generates a new self-signed CA certificate
Parameters:
Name Type Argument Default Description options.body.common_namestring The requested CN for the certificate
options.body.alt_namesstring <optional>
Requested Subject Alternative Names, in a comma-delimited list
options.body.ip_sansstring <optional>
Requested IP Subject Alternative Names, in a comma-delimited list
options.body.ttlstring <optional>
Requested Time To Live
options.body.formatstring <optional>
pem Format for returned data
options.body.key_typestring <optional>
rsa Desired key type
options.body.key_bitsstring <optional>
2048 The number of bits to use
options.body.max_path_lengthstring <optional>
-1 the maximum path length to encode in the generated certificate
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> getCaDer( [mountName])
-
Retrieves the CA certificate in raw DER-encoded form
Parameters:
Name Type Argument Default Description mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> getCaPem( [mountName])
-
Retrieves the CA certificate in PEM format
Parameters:
Name Type Argument Default Description mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> getCertCa( [mountName])
-
Retrieves CA certificate in PEM formatting in the certificate key of the JSON object
Parameters:
Name Type Argument Default Description mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> getCertCrl( [mountName])
-
Retrieves the current CRL certificate in PEM formatting in the certificate key of the JSON object
Parameters:
Name Type Argument Default Description mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> getCertRole( [mountName])
-
Queries the role definition
Parameters:
Name Type Argument Default Description options.idstring role name
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> getCertSerial( [mountName])
-
Retrieves certificate by serial number in PEM formatting in the certificate key of the JSON object
Parameters:
Name Type Argument Default Description options.idstring certificate serial number
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> getConfigCrl( [mountName])
-
Allows getting the duration for which the generated CRL should be marked valid
Parameters:
Name Type Argument Default Description options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> getConfigUrls( [mountName])
-
Fetch the URLs to be encoded in generated certificates
Parameters:
Name Type Argument Default Description options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> getCrlDer( [mountName])
-
Retrieves the current CRL in raw DER-encoded form
Parameters:
Name Type Argument Default Description mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> getCrlPem( [mountName])
-
Retrieves the current CRL in PEM format
Parameters:
Name Type Argument Default Description mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> getCrlRotate( [mountName])
-
This endpoint forces a rotation of the CRL
Parameters:
Name Type Argument Default Description options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> issueCertCredentials( [mountName])
-
Generates a new set of credentials (private key and certificate) based on the role named in the endpoint
Parameters:
Name Type Argument Default Description options.body.common_namestring The requested CN for the certificate
options.body.alt_namesstring <optional>
Requested Subject Alternative Names, in a comma-delimited list
options.body.ip_sansstring <optional>
Requested IP Subject Alternative Names, in a comma-delimited list
options.body.ttlstring <optional>
Requested Time To Live
options.body.formatstring <optional>
pem Format for returned data
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> revokeCertCredentials( [mountName])
-
Revokes a certificate using its serial number
Parameters:
Name Type Argument Default Description options.body.serial_numberstring serial number of the certificate to revoke
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> setConfigCa( [mountName])
-
Allows submitting the CA information for the backend via a PEM file containing the CA certificate and its private key, concatenated
Parameters:
Name Type Argument Default Description options.body.pem_bundlestring The key and certificate concatenated in PEM format
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> setConfigCrl( [mountName])
-
Allows setting the duration for which the generated CRL should be marked valid
Parameters:
Name Type Argument Default Description options.body.expirystring The time until expiration
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> setConfigUrls( [mountName])
-
Allows setting the issuing certificate endpoints
Parameters:
Name Type Argument Default Description options.body.issuing_certificatesstring <optional>
URL values for the Issuing Certificate field
options.body.crl_distribution_pointsstring <optional>
URL values for the CRL Distribution Points field
options.body.ocsp_serversstring <optional>
URL values for the OCSP Servers field
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> setSignedIntermediates( [mountName])
-
Allows submitting the signed CA certificate corresponding to a private key
Parameters:
Name Type Argument Default Description options.body.certificatestring The certificate in PEM format
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> signCertificate( [mountName])
-
Signs a new certificate based upon the provided CSR and the supplied parameters
Parameters:
Name Type Argument Default Description options.idstring role name
options.body.csrstring The PEM-encoded CSR
options.body.common_namestring The requested CN for the certificate
options.body.alt_namesstring <optional>
Requested Subject Alternative Names, in a comma-delimited list
options.body.ip_sansstring <optional>
Requested IP Subject Alternative Names, in a comma-delimited list
options.body.ttlstring <optional>
Requested Time To Live
options.body.formatstring <optional>
pem Format for returned data
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> signCertificateVerbatim( [mountName])
-
Signs a new certificate based upon the provided CSR. Values are taken verbatim from the CSR
Parameters:
Name Type Argument Default Description options.body.csrstring The PEM-encoded CSR
options.body.ttlstring <optional>
Requested Time To Live
options.body.formatstring <optional>
pem Format for returned data
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise
-
<inner> signIntermediateWithRoot( [mountName])
-
Uses the configured CA certificate to issue a certificate with appropriate values for acting as an intermediate CA
Parameters:
Name Type Argument Default Description options.body.csrstring The PEM-encoded CSR
options.body.common_namestring The requested CN for the certificate
options.body.alt_namesstring <optional>
Requested Subject Alternative Names, in a comma-delimited list
options.body.ip_sansstring <optional>
Requested IP Subject Alternative Names, in a comma-delimited list
options.body.ttlstring <optional>
Requested Time To Live
options.body.formatstring <optional>
pem Format for returned data
options.body.max_path_lengthstring <optional>
-1 the maximum path length to encode in the generated certificate
options.body.use_csr_valuesstring <optional>
1) Subject information, including names and alternate names, will be preserved from the CSR rather than using the values provided in the other parameters to this path; 2) Any key usages (for instance, non-repudiation) requested in the CSR will be added to the basic set of key usages used for CA certs signed by this path; 3) Extensions requested in the CSR will be copied into the issued certificate
options.tokenstring <optional>
the authentication token
mountNamestring <optional>
pki path name the pki secret backend is mounted on
Returns:
- Type
- Promise