I’ve been trying to understand what version is created by default when enabling kv secret, and while it seems to be version 1 (I’ve tested it by using the version-1 paths), the description are hardly clear.
In this case I’ve enabled a secret without specifying the version, but the version is not specified unfortunately when I look it up:
I think this is unlikely. There would be very minimal benefit indeed in dropping support for KV v1, whereas the amount of grief caused to customers would be large.
It’s because allowed_parameters is a generic mechanism for filtering which JSON keys are allowed in the top-level of a request to Vault, but KV v2 changes the format of the request to place all the user data under a top-level data key - so the user data is now in a more deeply nested part of the JSON than what the allowed_parameters mechanism is testing.
My organization made a choice to mostly use KV v2, and I think it was the wrong choice, because so many of our users get tripped up by the need to insert /data/, /metadata/, etc. in URLs in various places.
KV v1:
Simple, few surprises, easy to educate users about
KV v2:
Versioning support - needing/wanting multiple versions of secrets stored, and to be able to look back at old versions, is the main reason to use v2
Encrypts the keys (v1 doesn’t encrypt the keys, someone with access to the raw storage can read them)
Supports server-side PATCH
Supports the /subkeys/ operation to peek at JSON subkeys inside a value, without disclosing the values