Releases: nymous/pydantic-vault
1.0.0
Thank you, @kazauwa, for your contribution!
Breaking changes
Field value priority change
Initially, values in a Config class took higher priority over environment variables, effectively making it hard to override hardcoded defaults
outside the source code. This release addresses this inconvenience and makes the ordering consistent with Pydantic and 12 Factor App.
Changed
- BREAKING: Make environment variables override what is defined in the Config, contrary to the previous behaviour (#25)
0.8.0
Thank you, @area42 and @raider444, for your contributions!
Breaking changes
Drop support of Python 3.6.
Recent versions of dependencies (hvac
and other dev dependencies) require 3.7 or more, and some have even started to drop 3.7.
I hope it won't hurt many, as Python 3.6 is unsupported since December 2021.
The code hasn't changed yet, so it should still run on 3.6, we don't test it anymore though ^^'
Added
- Support
hvac
1.X (relaxed the upper constraint onhvac
). Initially proposed by @area42 in #18, I just reapplied the change on top of the new main to avoid conflicts (#23) - Support providing a custom CA bundle for Vault certificate validation, or skipping SSL validation altogether (#24)
Internal
- Bump all dev dependencies and Actions
0.7.2
0.7.1
0.7.0
Let's drop the "beta" version marker!
Added
- Log discovered configuration to help debugging, see the "Logging" section in the Readme
Changed
- Bump minimum
hvac
version to 0.10.6 instead of 0.10.0, to actually support AppRole authentication, and support the recently released 0.11.0 - Clarify documentation about authentication methods priority, and document a workaround for Pydantic big file size
v0.6.0b0
First beta release! 🎉
Breaking changes
- Require explicit full secret path (#11)
This enables support for all secret engines instead of just KV v2, and allows you to use different secret engines in the same settings class.
To migrate, addsecret/data/
in front of all yourvault_secret_path
(replacesecret/
with your KV v2 mount point), and remove the now unusedvault_secret_mount_point
config. For example:See the examples in the readme for more information.# Before class Settings(BaseSettings): db_username = Field(..., vault_secret_path="my-api/prod", vault_secret_key="db_username") class Config: vault_secret_mount_point: str = "secret" # After class Settings(BaseSettings): db_username = Field(..., vault_secret_path="secret/data/my-api/prod", vault_secret_key="db_username")
- Invert the priority of environment variables and Config values (config now overrides what is set in environment variables)
Other changes
- Support any secret engine, not just KV v2 (#11)
- Support loading a whole secret at once as a dict if you don't specify the
vault_secret_key
- Add examples for KV v1, KV v2 and Database secret engines
- Add test coverage
v0.5.0a0
v0.4.1a1
YANKED v0.4.1a0
This release has been YANKED because of a bad deployment
- Allow Pydantic to use default values if secret is not found in Vault (#9)