All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2023-11-02
Thank you, @kazauwa, for your contribution!
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.
- BREAKING: Make environment variables override what is defined in the Config, contrary to the previous behaviour (#25)
0.8.0 - 2023-09-10
Thank you, @area42 and @raider444, for your contributions!
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 ^^'
- 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)
- Bump all dev dependencies and Actions
0.7.2 - 2023-02-07
Thank you, @ingvaldlorentzen, for your contribution!
- Fix
TypeError
breaking Pydantic defaults when Vault returnsNone
(#13)
0.7.1 - 2021-09-02
- Better describe the project
- Add an example for dynamic paths in secrets
0.7.0 - 2021-08-16
Let's drop the "beta" version marker!
- Log discovered configuration to help debugging, see the "Logging" section in the Readme
- 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
0.6.0b0 - 2021-07-16
First beta release! 🎉 Beware of the breaking changes listed below!
- 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
- BREAKING: 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, add
secret/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", )
- BREAKING: Invert the priority of environment variables and Config values (config now overrides what is set in environment variables)
0.5.0a0 - 2021-06-28
- Support Kubernetes authentication method (#10)
- Support custom mount point for authentication methods (#10)
0.4.1a1 - 2021-06-21
This is a rerelease of 0.4.1a0 after some issues during deployment
- Allow Pydantic to use default values if secret is not found in Vault (#9)
0.4.1a0 - 2021-06-21 [YANKED]
This release has been YANKED because of a bad deployment
- Allow Pydantic to use default values if secret is not found in Vault (#9)
0.4.0a0 - 2021-04-11
- Support Approle authentication
0.3.0a0 - 2021-04-06
- Get Vault address, namespace & token from environment variables
- Get Vault token from
~/.vault-token
file
- Fix crash when a Settings field did not use
vault_secret_path
/vault_secret_key
0.2.0a0 - 2021-03-14
- Use the newly supported way of customizing settings sources, available since Pydantic 1.8
0.1.0a0 - 2020-03-21
- First alpha release