Class CreateKey.Request
- java.lang.Object
-
- io.helidon.integrations.common.rest.ApiJsonBuilder<T>
-
- io.helidon.integrations.common.rest.ApiJsonRequest<T>
-
- io.helidon.integrations.vault.VaultRequest<CreateKey.Request>
-
- io.helidon.integrations.vault.secrets.transit.CreateKey.Request
-
- All Implemented Interfaces:
ApiRequest<CreateKey.Request>
- Enclosing class:
- CreateKey
public static final class CreateKey.Request extends VaultRequest<CreateKey.Request>
Request object. Can be configured with additional headers, query parameters etc.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateKey.Request
allowPlaintextBackup(boolean allowBackup)
If set, enables taking backup of named key in the plaintext format.static CreateKey.Request
builder()
Fluent API builder for configuring a request.CreateKey.Request
convergentEncryption(boolean convergent)
If enabled, the key will support convergent encryption, where the same plaintext creates the same ciphertext.CreateKey.Request
derived(boolean derived)
Specifies if key derivation is to be used.CreateKey.Request
exportable(boolean exportable)
Enables keys to be exportable.CreateKey.Request
name(String name)
Specifies the name of the encryption key to create.CreateKey.Request
type(String type)
Specifies the type of key to create.-
Methods inherited from class io.helidon.integrations.vault.VaultRequest
add, addCommaDelimitedArray, addToCommaDelimitedArray, durationToTtl, preBuild
-
Methods inherited from class io.helidon.integrations.common.rest.ApiJsonRequest
addHeader, addQueryParam, headers, queryParams, requestId, requestId, requestMediaType, requestMediaType, responseMediaType, responseMediaType
-
Methods inherited from class io.helidon.integrations.common.rest.ApiJsonBuilder
add, add, add, add, add, add, addBase64, addToArray, addToArray, addToArray, addToArray, addToArray, addToArray, addToObject, addToObject, addToObject, addToObject, addToObject, emptyArray, me, postBuild, toJson
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.integrations.common.rest.ApiRequest
toJson
-
-
-
-
Method Detail
-
builder
public static CreateKey.Request builder()
Fluent API builder for configuring a request. The request builder is passed as is, without a build method. The equivalent of a build method isApiJsonBuilder.toJson(javax.json.JsonBuilderFactory)
used by theRestApi
.- Returns:
- new request builder
-
name
public CreateKey.Request name(String name)
Specifies the name of the encryption key to create.- Parameters:
name
- key name- Returns:
- updated request
-
convergentEncryption
public CreateKey.Request convergentEncryption(boolean convergent)
If enabled, the key will support convergent encryption, where the same plaintext creates the same ciphertext. This requires derived to be set to true. When enabled, each encryption(/decryption/rewrap/datakey) operation will derive a nonce value rather than randomly generate it. Optional, defaults tofalse
.- Parameters:
convergent
- whether the key supports convergent encryption- Returns:
- updated request
-
derived
public CreateKey.Request derived(boolean derived)
Specifies if key derivation is to be used. If enabled, all encrypt/decrypt requests to this named key must provide a context which is used for key derivation. Optional, defaults tofalse
.- Parameters:
derived
- whether key derivation should be used- Returns:
- updated request
-
exportable
public CreateKey.Request exportable(boolean exportable)
Enables keys to be exportable. This allows for all the valid keys in the key ring to be exported. Once set, this cannot be disabled. Optional, defaults tofalse
.- Parameters:
exportable
- whether the key is exportable- Returns:
- updated request
-
allowPlaintextBackup
public CreateKey.Request allowPlaintextBackup(boolean allowBackup)
If set, enables taking backup of named key in the plaintext format. Once set, this cannot be disabled. Optional, defaults tofalse
.- Parameters:
allowBackup
- whether to allow plain text backup- Returns:
- updated request
-
type
public CreateKey.Request type(String type)
Specifies the type of key to create. The currently-supported types are:aes128-gcm96
- AES-128 wrapped with GCM using a 96-bit nonce size AEAD (symmetric, supports derivation and convergent encryption)aes256-gcm96
- AES-256 wrapped with GCM using a 96-bit nonce size AEAD (symmetric, supports derivation and convergent encryption, default)chacha20-poly1305 - ChaCha20-Poly1305 AEAD (symmetric, supports derivation and convergent encryption)
-ed25519
- ED25519 (asymmetric, supports derivation). When using derivation, a sign operation with the same context will derive the same key and signature; this is a signing analogue to convergent_encryptionecdsa-p256
- ECDSA using the P-256 elliptic curve (asymmetric)ecdsa-p384
- ECDSA using the P-384 elliptic curve (asymmetric)ecds-p521
- ECDSA using the P-521 elliptic curve (asymmetric)rsa-2048
- RSA with bit size of 2048 (asymmetric)rsa-3072
- RSA with bit size of 3072 (asymmetric)rsa-4096
- RSA with bit size of 4096 (asymmetric)
aes256-gcm96
.- Parameters:
type
- type to use- Returns:
- updated request
-
-