The secret that failed open

A production service declared where its secrets came from, the generator produced no wiring for that key, and the pod started anyway — on data frozen at build time.

Telecom

The failure

gtpproxy-api-server is a small admin API that runs commands against the GTP proxy fleet (one instance, 250m CPU, 256MB). In prod it reads the fleet from a routing database (refreshed hourly); in dev it reads a file baked into the image. The prod meta file named a secrets source the generator has no handler for — three values generate wiring, and this was a fourth.

That key generated nothing, and nothing failed. The pod came up without a database password, never reached the database, and fell back to its development path (the one correct in dev), so the service stayed healthy and answered requests from a fleet picture frozen at build time. Nothing was exposed and nothing leaked. The failure mode was silent staleness, which in a fleet admin tool means acting on a fleet that has since moved on.

The fix was one line — name a source that does generate wiring (the same one a prober in this repository already used in prod). The secret itself had been there all along; the only thing missing was the word that referred to it.

Why it stayed hidden

Two things combined, and neither is unusual. A declarative generator stays silent about a key it does not recognise: an unsupported value raises no validation error (it is an absence), and an absence generates nothing. The application also carried a fallback that is right in one environment and wrong in the other — the expensive kind, because it works.

I would have preferred the generator reject the file outright. A key that is accepted, ignored and never mentioned again is worse than one refused loudly, and the asymmetry is easy to miss when you review a diff of the output instead of a diff of the request (only the second shows a key that went nowhere).

What a config repository makes legible

Getting that service onto managed secrets at all took a week of trial and error, still legible as seven small commits (June and August 2024): secrets moved out of bespoke config, a property to read them from the environment, a file source, a list of keys, a corrected path. Application code rarely preserves a week like that; a config repository preserves it whether anyone wants it or not.

The gate that is a human

Dev PRs auto-merge; prod PRs do not. The prod workflow additionally checks that the image already exists in the production registry before it will promote one, so production runs an image development already ran instead of building a fresh one (the same Dockerfile rebuilt is a different digest). Merging a prod PR needs three fields filled (change type, title, description), and the helper refuses an empty one, because those fields become the release notes and the changelog. The audit trail is a side effect of refusing to let anyone skip a form.