Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default value of raise_on_deleted_version will change from True to False in v3.0.0 #955

Open
briantist opened this issue Mar 4, 2023 · 3 comments
Assignees
Labels
announcement Announces some change or future change to be aware of kv Key/Value (KV) secrets engine secrets engines generally related to a Vault secrets engine
Milestone

Comments

@briantist
Copy link
Contributor

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:

@briantist briantist added the announcement Announces some change or future change to be aware of label Mar 4, 2023
@briantist briantist added this to the 3.0.0 milestone Mar 4, 2023
@briantist briantist pinned this issue Mar 4, 2023
@briantist briantist self-assigned this Mar 4, 2023
@briantist briantist added secrets engines generally related to a Vault secrets engine kv Key/Value (KV) secrets engine labels Jul 16, 2023
@iTrooz

This comment was marked as outdated.

@briantist

This comment was marked as outdated.

@iTrooz

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
announcement Announces some change or future change to be aware of kv Key/Value (KV) secrets engine secrets engines generally related to a Vault secrets engine
Projects
None yet
Development

No branches or pull requests

2 participants