Description
kv2's read_secret_version
and read_secret
methods will have their new raise_on_deleted_version
parameter (#907) change from (effectively) True
to False
in v3.0.0
.
This is unlikely to affect most uses, but is a potentially breaking change in behavior.
When the value is True
, attempting to retrieve a (soft) deleted secret version, including the "latest" version of a secret if that version happens to be deleted, will result in an InvalidPath
exception. This the behavior that hvac
had historically.
When the value is False
, the actual result from Vault will be returned without raising an exception; that result will include no data, but have metadata related to the secret including when it was deleted.
It is also possible as of v1.1.0
to get the raw JSON response from Vault on raised exceptions, so you may also choose to keep the exception-raising functionality and check the result in your own code.
Only the default value is changing in v3.0.0
.
By changing your code now to explicitly choose which functionality you want, you can avoid any changes in behavior when the default value is changed.
For more implementation details, see: