Interface ReactiveEncapsulatedKeyManager
A reactive manager for encapsulated keys.
EnvelopePropertyEncryptionProfile requires data keys to exist before they can be used for encryption. This
manager provides operations for creating and managing such keys.
When creating a key, the manager uses the configured BaseKeyEncapsulationService to generate and encapsulate
a new data key and registers the resulting EncapsulatedKeyRecord with the configured
BaseEncapsulatedKeyRecordRepository. Both synchronous and asynchronous implementations of these services
are supported.
- Since:
- 6.3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault org.reactivestreams.Publisher<EncapsulatedKey> create()Creates a new encapsulated key without key alias.default org.reactivestreams.Publisher<EncapsulatedKey> Creates a new encapsulated key with the provided key alias.org.reactivestreams.Publisher<EncapsulatedKey> create(String alias, KeyEncapsulationOptions encapsulationOptions) Creates a new encapsulated key with the provided key alias andKeyEncapsulationOptions.default org.reactivestreams.Publisher<Void> Deletes encapsulated key alias by id.org.reactivestreams.Publisher<Void> deleteById(String id) Deletes encapsulated key by id.org.reactivestreams.Publisher<EncapsulatedKey> findByAlias(String alias) Finds encapsulated key by its alias.org.reactivestreams.Publisher<Void> setAliasById(String id, String alias) Sets the alias of an encapsulated key by id.
-
Method Details
-
create
Creates a new encapsulated key without key alias.- Returns:
- a
Publisherthat publishes the encapsulated key
-
create
Creates a new encapsulated key with the provided key alias.- Parameters:
alias- the key alias, may be null- Returns:
- a
Publisherthat publishes the encapsulated key
-
create
org.reactivestreams.Publisher<EncapsulatedKey> create(String alias, KeyEncapsulationOptions encapsulationOptions) Creates a new encapsulated key with the provided key alias andKeyEncapsulationOptions.- Parameters:
alias- the key alias, may be nullencapsulationOptions- the key encapsulation options, may be null- Returns:
- a
Publisherthat publishes the encapsulated key
-
findByAlias
Finds encapsulated key by its alias.- Parameters:
alias- the key alias, must not be null- Returns:
- a
Publisherthat publishes the encapsulated key or completes without publishing when no key with the given alias exists
-
setAliasById
Sets the alias of an encapsulated key by id. The alias must not be used by another key. To assign an alias currently used by another key, it must first be deleted from that key.- Parameters:
id- the key id, must not be nullalias- the new key alias, may be null to remove the alias- Returns:
- a
Publisherthat completes without publishing
-
deleteAliasById
-
deleteById
-