Prompt
What should I use to manage database credentials across multiple services?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
A good default is a secrets manager, not environment files or hardcoded config.
Best options
- Cloud-native secrets manager if you’re on a major cloud:
- AWS Secrets Manager or AWS SSM Parameter Store
- GCP Secret Manager
- Azure Key Vault
- HashiCorp Vault if you need:
- cloud-agnostic setup
- more advanced secret rotation
- dynamic database credentials
- strong centralized control
Recommended pattern
Use:
- Secrets manager to store the database credentials
- Service identity / IAM / workload identity to authenticate services to the secret manager
- Short-lived or rotated credentials when possible
- Separate credentials per service rather than sharing one DB login across everything
Why this is better
- avoids secrets in code or images
- centralizes rotation and auditing
- limits blast radius if one service is compromised
- supports least privilege
Avoid
.envfiles for production- storing passwords in Git or CI variables long-term
- one shared root DB user for all services
If you tell me your cloud/provider and deployment style (Kubernetes, ECS, VMs, etc.), I can recommend the best specific setup.