Leader freshness (runtime-secret tracking + JWKS refresh) #5

Closed
opened 2026-09-13 20:40:00 +00:00 by ginjiruu · 0 comments
Owner

Parent

Spec: Shared in-memory state model (Registry + Snapshot) — #1

What to build

The leader also (a) watches referenced-Secret add/delete and updates the Registry secretReady flag (for kubectl observability) plus the CRD Degraded status — the leader/observability side of the failure model, distinct from the replica's per-replica behaviour side; and (b) refreshes the JWKS on a TTL and on any CRD change (re-fetching via the resolve step, keeping last-good on failure) and re-writes the Registry.

Acceptance criteria

  • When a referenced Secret is deleted, the Registry entry's secretReady flips false and the App's CRD is marked Degraded; on recreation, secretReady flips true.
  • The JWKS is re-fetched on a TTL timer and on any CRD change, and the Registry is re-written with the refreshed keys.
  • When a refresh fetch fails, the last-good JWKS is retained (not blanked).
  • These are the leader's observability/status side; the per-replica 5xx behaviour (the Replica mirror ticket) remains immediate and leader-independent.

Blocked by

  • #3 — Registry builder (the leader's core)
## Parent Spec: Shared in-memory state model (Registry + Snapshot) — https://git.animeteamspeak.moe/lab/authz-bridge/issues/1 ## What to build The leader also (a) watches referenced-Secret add/delete and updates the Registry `secretReady` flag (for `kubectl` observability) plus the CRD `Degraded` status — the leader/observability side of the failure model, distinct from the replica's per-replica behaviour side; and (b) refreshes the JWKS on a TTL and on any CRD change (re-fetching via the resolve step, keeping last-good on failure) and re-writes the Registry. ## Acceptance criteria - [ ] When a referenced Secret is deleted, the Registry entry's `secretReady` flips false and the App's CRD is marked Degraded; on recreation, `secretReady` flips true. - [ ] The JWKS is re-fetched on a TTL timer and on any CRD change, and the Registry is re-written with the refreshed keys. - [ ] When a refresh fetch fails, the last-good JWKS is retained (not blanked). - [ ] These are the leader's observability/status side; the per-replica 5xx behaviour (the Replica mirror ticket) remains immediate and leader-independent. ## Blocked by - #3 — Registry builder (the leader's core)
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lab/authz-bridge#5
No description provided.