Keeping API keys out of plain text
Making the secure path the easiest one.
The problem
My platform calls several AI providers, each with a paid API key. Keys in config files or scripts end up in backups, logs and git history.
Approach
- All keys live in HashiCorp Vault. The apps read them from Vault at run time — there's no plain-text fallback.
- A settings screen lets me paste a new key, rotate it, or turn a provider on or off. Keys are never shown back on screen.
- Vault unseals automatically at boot through a systemd service, so a reboot doesn't take the platform down.
- Project rule: credentials stay in Vault, never in plain text.
Takeaway
Security controls that are hard to use get bypassed, so usability is part of security.