Secrets management: a practical guide
The advice here is unglamorous, which is probably why it gets skipped. This guide covers what secrets management actually involves, where it usually goes wrong, and how to tell whether yours is in reasonable shape.
Cloud work rewards teams who automate early and punishes teams who click through consoles. Nothing below assumes a large team or a large budget — most of it is a decision somebody has to make and then write down.
What is actually at stake
Secrets in a repository are a breach waiting for a schedule. This is the sort of thing that compounds, quietly, in both directions. It is the sort of thing that looks like polish right up until it costs you an enquiry.
For most businesses the question is not whether this matters but how much of it is worth doing right now. That depends on what you are trying to achieve in the next few months, not on best practice in the abstract. The reasoning matters more than the rule, because the rule has exceptions.
What good looks like
Rotate them on a cadence, not after an incident. Small and consistent beats large and occasional here. Check it against what you would want a competitor's site to get wrong.
Operability is a feature, and it has to be built rather than bought. The version that works in practice is usually less elaborate than the version described in the guides.
Every secret should have a documented owner. The cost of getting this wrong is rarely visible on the day it happens. Budget a little time for it every quarter and it never becomes a project of its own.
A working checklist
If you want a quick read on where you stand, work through this. Anything you cannot answer confidently is where to start.
- Secrets in a repository are a breach waiting for a schedule
- Rotate them on a cadence, not after an incident
- Every secret should have a documented owner
- Someone is named as the owner, not just assumed to be
- There is a date in the calendar to review it again
- The decision and the reasoning behind it are written down somewhere findable
- You could explain the current setup to a new hire in five minutes
Warning signs
The most common failure is not doing this badly. It is doing it once, during a launch, and never revisiting it. Circumstances move, the setup does not, and the gap widens quietly until something breaks or somebody notices the numbers.
- It was configured during a launch and has not been touched since
- Different people in the business believe different things are true about it
- There is no way to tell whether the last change helped or hurt
- The only person who understands it has left, or is about to
The bill is a design document: it tells you exactly what your architecture actually does. There is a version of this that is over-engineered, and it is worth avoiding.
How we approach it
On our projects this gets handled during the build rather than added afterwards, because retrofitting it costs several times more than including it. We write down what was decided and why, so the next person to touch it is not guessing.
If you are working with someone else, the questions worth asking are simple: who owns this, how will we know it is working, and what happens when it needs to change?
Where to go from here
Pick the single item from the checklist above that would cause the most trouble if it turned out to be wrong. Fix that one, confirm it worked, then move on. Worth checking on your own setup before it becomes someone else's problem to fix.