Add CAUSALLAYER_ISSUER_KEYS env override for runtime key rotation - #11
Merged
Conversation
Lets operators add or rotate issuer keys without a redeploy: keys supplied via the env var (a JSON array of IssuerKey) are merged over the resolved registry, overriding registry keys with the same key_id. Mirrors the ISSUER_PUBLIC_KEYS override already in faultkey-cert-worker, keeping the two verification surfaces consistent. Tests: a key known only through the override passes issuer-trust + signature; a malformed override value is ignored without throwing. (The Ed25519 verification fix and round-trip test coverage this branch's predecessor carried already landed on main via #8; this is the one net-new piece.) https://claude.ai/code/session_01VrsSvG4PemnPeHzMcCuZC9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an env-var seam so issuer keys can be added or rotated without a redeploy. Keys supplied via
CAUSALLAYER_ISSUER_KEYS(a JSON array ofIssuerKey) are merged over the resolved registry — remote or pinned — overriding any registry key with the samekey_id.This mirrors the
ISSUER_PUBLIC_KEYSoverride already present infaultkey-cert-worker, keeping the two verification surfaces (the worker that stores certs and the verifier that validates them) consistent in how operators manage trust.Why
Tests (vitest, on top of the existing suite)
CAUSALLAYER_ISSUER_KEYSpasses both issuer-trust and signature verification (with remote + pinned registries deliberately unaware of it).27/27 tests pass;
tscbuild clean.Context
This is the one net-new piece carved out of the now-closed #10. The Ed25519 verification fix and round-trip test coverage that #10 also carried already landed on
mainvia #8, so only this override remained.https://claude.ai/code/session_01VrsSvG4PemnPeHzMcCuZC9
Generated by Claude Code