Add encryption, digest and secret support to security #2872
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First implementation of encryption and secrets in config
Related to #2395
This is the first update preparing for OCI and Hashicorp (HCP) Vault integrations.
This update adds the following methods to
Security
:encrypt
- to encrypt a secret using one of the configured security providersdecrypt
- to decrypt a cipher text obtained fromencrypt
on this service (or another with the same configuration)digest
- to sign or generate anHMAC
verifyDigest
- to verify a signature orHMAC
fromdigest
on this service (or another with the same configuration)secret
- to get a secretEncryption and secret has also the first implementation in
helidon-config-encryption
.These methods are expected to be provided by Vault integrations, such as HCP Vault and OCI Vault (and others in the future).
Mapping to Vault operations:
encrypt
,decrypt
- OCI Vault keys, using encryption endpoint; HCP Vault - Transit secrets enginedigest
,verifyDigest
- dttosecret
- OCI Vault secrets, HCP Vault kv2 secrets, kv1 secrets, Cubbyhole etc.These implementations and example(s) will be added in future PRs