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 newVaultCertificateRequest
instance.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.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.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:
this
VaultCertificateRequest.VaultCertificateRequestBuilder
.
-
altNames
Configure alternative names. Replaces previously configured alt names.- Parameters:
altNames
- must not be null.- Returns:
this
VaultCertificateRequest.VaultCertificateRequestBuilder
.
-
withAltName
Add an alternative name.- Parameters:
altName
- must not be empty or null.- Returns:
this
VaultCertificateRequest.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:
this
VaultCertificateRequest.VaultCertificateRequestBuilder
.
-
withIpSubjectAltName
public VaultCertificateRequest.VaultCertificateRequestBuilder withIpSubjectAltName(String ipSubjectAltName) Add an IP subject alternative name.- Parameters:
ipSubjectAltName
- must not be empty or null.- Returns:
this
VaultCertificateRequest.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:
this
VaultCertificateRequest.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:
this
VaultCertificateRequest.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:
this
VaultCertificateRequest.VaultCertificateRequestBuilder
.- Since:
- 2.4
-
withOtherSans
Add custom OID/UTF8-string subject alternative name.- Parameters:
otherSans
- must not be empty or null.- Returns:
this
VaultCertificateRequest.VaultCertificateRequestBuilder
.- Since:
- 2.4
-
ttl
Configure a TTL.- Parameters:
ttl
- the time to live, must not be negative.timeUnit
- must not be null- Returns:
this
VaultCertificateRequest.VaultCertificateRequestBuilder
.
-
ttl
Configure a TTL.- Parameters:
ttl
- the time to live, must not be null or negative.- Returns:
this
VaultCertificateRequest.VaultCertificateRequestBuilder
.- Since:
- 2.0
-
format
Configure the certificate format.- Parameters:
format
- the certificate format to use. Can bepem
,der
, orpem_bundle
- Returns:
this
VaultCertificateRequest.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:
this
VaultCertificateRequest.VaultCertificateRequestBuilder
.- Since:
- 2.4
-
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:
this
VaultCertificateRequest.VaultCertificateRequestBuilder
.
-
build
Build a newVaultCertificateRequest
instance. RequirescommonName(String)
to be configured.- Returns:
- a new
VaultCertificateRequest
.
-