Class TransitSecurityProvider.TransitDigestConfig.Builder
java.lang.Object
io.helidon.integrations.vault.secrets.transit.TransitSecurityProvider.TransitDigestConfig.Builder
- All Implemented Interfaces:
Builder<TransitSecurityProvider.TransitDigestConfig.Builder,
,TransitSecurityProvider.TransitDigestConfig> Supplier<TransitSecurityProvider.TransitDigestConfig>
- Enclosing class:
TransitSecurityProvider.TransitDigestConfig
public static class TransitSecurityProvider.TransitDigestConfig.Builder
extends Object
implements Builder<TransitSecurityProvider.TransitDigestConfig.Builder,TransitSecurityProvider.TransitDigestConfig>
Fluent API builder for
TransitSecurityProvider.TransitDigestConfig
.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the instance from this builder.Update this builder from configuration.context
(Base64Value context) Specifies the context for key derivation.hashAlgorithm
(String hashAlgorithm) Specifies the hash algorithm to use for supporting key types (notably, not including ed25519 which specifies its own hash algorithm).Name of the key (Vault server side) used for this digest.keyVersion
(int keyVersion) Specifies the version of the key to use for digest.marshalingAlgorithm
(String marshalingAlgorithm) Specifies the way in which the signature should be marshaled.signatureAlgorithm
(String signatureAlgorithm) When using a RSA key, specifies the RSA signature algorithm to use for signing.Type of digest, eitherTYPE_SIGNATURE
orTYPE_HMAC
.
-
Field Details
-
TYPE_SIGNATURE
Digest is a signature.- See Also:
-
TYPE_HMAC
Digest is an HMAC.- See Also:
-
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<TransitSecurityProvider.TransitDigestConfig.Builder,
TransitSecurityProvider.TransitDigestConfig> - Returns:
- instance of the built type
-
config
Update this builder from configuration. Only "key-name" is mandatory.Configuration options:
Secret configuration key description builder method "key-name" Name of the key used for this digest operation keyName(String)
key-version
Version of the key to use keyVersion(int)
context
Context as base64 encoded text. context(Base64Value)
signature-algorithm
Signature algorithm. signatureAlgorithm(String)
marshalling-algorithm
Marshalling algorithm. marshalingAlgorithm(String)
hash-algorithm
Hash algorithm. hashAlgorithm(String)
type
Type of digest, defaults to "signature". type(String)
- Parameters:
config
- config to use- Returns:
- updated builder
-
type
- Parameters:
type
- type to use- Returns:
- updated builder
-
keyName
Name of the key (Vault server side) used for this digest. Note that key type must be valid for the type used. Signatures require an asymmetric key, HMAC requires a symmetric key.- Parameters:
keyName
- name of the key- Returns:
- updated builder
-
keyVersion
Specifies the version of the key to use for digest. If not set, uses the latest version. Must be greater than or equal to the key'smin_encryption_version
, if set. Optional.- Parameters:
keyVersion
- key version- Returns:
- updated request
-
context
Specifies the context for key derivation. This is required if key derivation is enabled for this key; currently only available with ed25519 keys.- Parameters:
context
- context- Returns:
- updated request
-
signatureAlgorithm
public TransitSecurityProvider.TransitDigestConfig.Builder signatureAlgorithm(String signatureAlgorithm) When using a RSA key, specifies the RSA signature algorithm to use for signing. Supported signature types are:pss pkcs1v15
See signature algorithm constants on this class.
- Parameters:
signatureAlgorithm
- signature algorithm to use- Returns:
- updated request
- See Also:
-
marshalingAlgorithm
public TransitSecurityProvider.TransitDigestConfig.Builder marshalingAlgorithm(String marshalingAlgorithm) Specifies the way in which the signature should be marshaled. This currently only applies to ECDSA keys. Supported types are: asn1: The default, used by OpenSSL and X.509 jws: The version used by JWS (and thus for JWTs). Selecting this will also change the output encoding to URL-safe Base64 encoding instead of standard Base64-encoding.- Parameters:
marshalingAlgorithm
- marshaling algorithm- Returns:
- updated request
- See Also:
-
hashAlgorithm
Specifies the hash algorithm to use for supporting key types (notably, not including ed25519 which specifies its own hash algorithm). See hash algorithm constants on this class.- Parameters:
hashAlgorithm
- algorithm to use- Returns:
- updated request
- See Also:
-