Replaces the dead secret-rotation scaffold. One CRD, shared state machine, two providers: machine keys (overlap, no gap) and client secrets (atomic, verified rollback). 12 tests, go build/vet clean. Not wired to Argo until the image exists.
Replaces the dead secret-rotation scaffold. One CRD, shared state machine, two providers: machine keys (overlap, no gap) and client secrets (atomic, verified rollback). 12 tests, go build/vet clean. Not wired to Argo until the image exists.
Replace the dead secret-rotation scaffold (an Argo app that could not render, a
CRD that was never installed, and no controller code) with a working design.
One resource describes one credential:
spec.provider zitadel-machine-key | zitadel-oidc-client
spec.strategy overlap | atomic
spec.target Secret to write, consumers to roll, reload hot|restart
spec.verify introspection or token exchange
The state machine is shared by every provider:
Prepare -> Publish -> Verify -> Retire
Order is the safety property. Retire runs only for an overlapping provider and
only after the new credential obtained a token. A failure before that point leaves
the working credential in place, which is exactly what went wrong by hand today
when a regenerated Grafana secret was never re-pointed.
Machine keys overlap in ZITADEL, so that provider rotates with no gap. Client
secrets do not overlap, so that provider is atomic: it publishes, rolls the
consumer, verifies, and restores the previous value from a shadow key if the
introspection check fails.
The controller authenticates with its own machine key, the single bootstrap
credential, read from a mounted Secret. Everything else it creates itself, so no
credential value needs to live in git.
Verified: go build and go vet clean, 12 tests pass covering scheduling, the shadow
key rollback path, provider strategies and assertion signing.
Not yet wired to Argo CD: the image must be built and pushed first, so the app is
not added until a Deployment can actually pull.
rock
merged commit afec7e9867 into main2026-10-27 20:53:13 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Replaces the dead secret-rotation scaffold. One CRD, shared state machine, two providers: machine keys (overlap, no gap) and client secrets (atomic, verified rollback). 12 tests, go build/vet clean. Not wired to Argo until the image exists.