Add custom metadata to data responses #51
Merged
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.
Overview
This PR extends KVv2's key metadata field
custom_metadata
to theCreateOperation
,ReadOperation
, andPatchOperation
responses for the/<mount>/data/:path
endpoint. Extending this field to other endpoints allows for better auditing capability.There is an associated implicit change in ACL semantics in that the field is available to the data endpoint independent of the calling token's ACLs (i.e.
read
access to/<mount>/metadata/:path
). This concept has been mentioned in a separate docs PR.Design of Change
The
CreateOperation
,ReadOperation
, andPatchOperation
handlers already access the secret's key metadata. The field will simply be added to thelogical.Response
for these handlers. It should also be noted that this field will automatically be included in the CLI output and has been verified in Vault PR #12907.Related Issues/Pull Requests