Home / Learn Secure SQL / Secrets Management
Secrets Management
Where database passwords and connection strings should actually live.
The idea, explained simply
In plain terms
A secrets manager (such as a cloud provider's secret store, HashiCorp Vault, or similar) stores database credentials securely and lets an application fetch them at startup, rather than the credentials being hard-coded or committed to source control.
Why we use it
Credentials committed to a repository (even a private one) tend to leak eventually — through a fork, a backup, a misconfigured permission, or simply years of history — while a secrets manager can rotate and audit access to credentials independently of the application's codebase.
Under the hood
Store database credentials in a secrets manager or at minimum environment variables outside version control, fetch them at application startup, and rotate them periodically without needing a code change.
Real-world use
- Web application code review
- Backend development
- Database administration
Quick quiz
1. Database credentials are best stored...
Outside source control, in a secrets manager.