Order of retrieval
The secrets manager in ShipWithDjango follows a specific order when retrieving secrets:
Cache: First, it checks its cache to see if the secret has already been retrieved during the current session.
Environment File: Next, it looks in the
.env
file. If the secret is found there, it returns that value.External Provider: If the secret is not found in the cache or the
.env
file, the manager will then query the configured external secret management service (Infisical, AWS, or Azure).
This layered approach allows you to easily override secrets for local development or testing by simply adding them to your .env
file, while still benefiting from the security of an external provider in other environments.
Last updated