Propreneur sidecar key rotation¶
Audience: operators Contract version: 1.0.0
Goals¶
Rotate signing and bootstrap credentials without downtime, without logging secret values, and with a clear revocation path.
Key types¶
| Key | Purpose | Storage |
|---|---|---|
| Sidecar token signing secret | Mint/verify Keprix product tokens | Vault or env (KEPRIX_PRODUCT_SIDECAR_TOKEN_SECRET) |
| Shared bootstrap token | Transitional Propreneur-to-Keprix auth | Vault or env (CARINA_KEPRIX_SHARED_TOKEN / product-specific alias) |
| Product API credentials | Southbound calls to Propreneur | Vault ref only; never in Git |
Overlapping rotation (current + next)¶
- Generate
nextsecret with a new key id (kid), for examplesidecar-v2. - Install
nexton Keprix and Propreneur so both accept current and next. - Switch issuers to mint with
nextonly. - Observe auth success and denial metrics for at least one soak window.
- Revoke
current(TokenService.revoke_kidor equivalent) and remove it from env. - Record an audit entry with old/new
kid, operator id, and correlation IDs. Never record secret material.
Revocation¶
- Revoke individual JTIs on suspected replay or stolen session.
- Revoke a whole
kidwhen a signing secret is exposed. - After revoke, expect existing tokens for that kid to fail closed with correlated audit (
expired_token,wrong_audience, or revoke-specific code).
Network limits¶
Keep Contabo private integration on http://127.0.0.1:13333. Rotating secrets does not justify opening the port publicly.
Verification checklist¶
- [ ] Dry-run provision still plans successfully.
- [ ] Health and capabilities succeed with the new kid.
- [ ] Mutation with read-only scope still denied.
- [ ] Old kid rejected after revoke.
- [ ] Logs show
kidand correlation ID only; no raw secrets.