Class VaultCertificateRequest.VaultCertificateRequestBuilder
java.lang.Object
org.springframework.vault.support.VaultCertificateRequest.VaultCertificateRequestBuilder
- Enclosing class:
- VaultCertificateRequest
-
Method Summary
Modifier and TypeMethodDescriptionConfigure alternative names.build()Build a newVaultCertificateRequestinstance.commonName(String commonName) Configure the common name.Exclude the given common name from DNS or Email Subject Alternate Names (as appropriate).Configure the certificate format.ipSubjectAltNames(Iterable<String> ipSubjectAltNames) Configure IP subject alternative names.Set theNot Afterfield of the certificate with specified date value.Configure custom OID/UTF8-string subject alternative names.privateKeyFormat(String privateKeyFormat) Configure the key format.Configure a TTL.Configure a TTL.uriSubjectAltNames(Iterable<String> uriSubjectAltNames) Configure URI subject alternative names.Specifies the comma-separated list of requested User ID (OID 0.9.2342.19200300.100.1.1) Subject values to be placed on the signed certificate.userIds(Collection<String> userIds) Specifies the comma-separated list of requested User ID (OID 0.9.2342.19200300.100.1.1) Subject values to be placed on the signed certificate.withAltName(String altName) Add an alternative name.withIpSubjectAltName(String ipSubjectAltName) Add an IP subject alternative name.withOtherSans(String otherSans) Add custom OID/UTF8-string subject alternative name.withUriSubjectAltName(String uriSubjectAltName) Add an URI subject alternative name.
-
Method Details
-
commonName
Configure the common name.- Parameters:
commonName- must not be empty or null.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.
-
excludeCommonNameFromSubjectAltNames
public VaultCertificateRequest.VaultCertificateRequestBuilder excludeCommonNameFromSubjectAltNames()Exclude the given common name from DNS or Email Subject Alternate Names (as appropriate). Useful if the CN is not a hostname or email address, but is instead some human-readable identifier.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.
-
altNames
Configure alternative names. Replaces previously configured alt names.- Parameters:
altNames- must not be null.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.
-
withAltName
Add an alternative name.- Parameters:
altName- must not be empty or null.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.
-
ipSubjectAltNames
public VaultCertificateRequest.VaultCertificateRequestBuilder ipSubjectAltNames(Iterable<String> ipSubjectAltNames) Configure IP subject alternative names. Replaces previously configured IP subject alt names.- Parameters:
ipSubjectAltNames- must not be null.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.
-
withIpSubjectAltName
public VaultCertificateRequest.VaultCertificateRequestBuilder withIpSubjectAltName(String ipSubjectAltName) Add an IP subject alternative name.- Parameters:
ipSubjectAltName- must not be empty or null.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.
-
uriSubjectAltNames
public VaultCertificateRequest.VaultCertificateRequestBuilder uriSubjectAltNames(Iterable<String> uriSubjectAltNames) Configure URI subject alternative names. Replaces previously configured URI subject alt names.- Parameters:
uriSubjectAltNames- must not be null.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.- Since:
- 2.2
-
withUriSubjectAltName
public VaultCertificateRequest.VaultCertificateRequestBuilder withUriSubjectAltName(String uriSubjectAltName) Add an URI subject alternative name.- Parameters:
uriSubjectAltName- must not be empty or null.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.- Since:
- 2.2
-
otherSans
Configure custom OID/UTF8-string subject alternative names. Replaces previously configured other subject alt names.- Parameters:
otherSans- must not be null.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.- Since:
- 2.4
-
withOtherSans
Add custom OID/UTF8-string subject alternative name.- Parameters:
otherSans- must not be empty or null.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.- Since:
- 2.4
-
ttl
Configure a TTL.- Parameters:
ttl- the time to live, must not be negative.timeUnit- must not be null- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.
-
ttl
Configure a TTL.- Parameters:
ttl- the time to live, must not be null or negative.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.- Since:
- 2.0
-
notAfter
Set theNot Afterfield of the certificate with specified date value. Supports the Y10K end date for IEEE 802.1AR-2018 standard devices, 9999-12-31T23:59:59Z.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.- Since:
- 3.1
-
format
Configure the certificate format.- Parameters:
format- the certificate format to use. Can bepem,der, orpem_bundle- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.- Since:
- 2.4
-
privateKeyFormat
public VaultCertificateRequest.VaultCertificateRequestBuilder privateKeyFormat(String privateKeyFormat) Configure the key format.- Parameters:
privateKeyFormat- the key format to use. Can bepem,der, orpkcs8- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.- Since:
- 2.4
-
userId
Specifies the comma-separated list of requested User ID (OID 0.9.2342.19200300.100.1.1) Subject values to be placed on the signed certificate. This field is validated against allowed_user_ids on the role.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.- Since:
- 3.1
-
userIds
Specifies the comma-separated list of requested User ID (OID 0.9.2342.19200300.100.1.1) Subject values to be placed on the signed certificate. This field is validated against allowed_user_ids on the role.- Returns:
thisVaultCertificateRequest.VaultCertificateRequestBuilder.- Since:
- 3.1
-
build
Build a newVaultCertificateRequestinstance. RequirescommonName(String)to be configured.- Returns:
- a new
VaultCertificateRequest.
-