Make plaintext
and ciphertext
optional for batch operations
#1049
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.
The Vault API requires setting
plaintext
andciphertext
for the encrypt/decrypt data API, even though the fields are ignored whenbatch_input
is set. This means that end users have to include an empty argument when doing batch operations, which is a bit annoying.While this works, it might be more ergonomic to have an
encrypt_data
and abatch_encrypt_data
function as most of theencrypt_data
args are ignored in batch mode anyways, which could potentially lead to bugs. This is a bit out of scope for this PR, just thought I would mention it here as an alternative.Also, I could not test locally due to self-signed certificate errors. Is there a certificate I need to install for testing?