feat(notary): move correctness state to PostgreSQL#364
Conversation
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c331f14012
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c56e38ac3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let scope_hash = self.keys.replay_scope_hash(scope); | ||
| let jti_hash = self.keys.identifier_hash(JTI_IDENTIFIER_CONTEXT, jti); |
There was a problem hiding this comment.
Keep preauth replay keys stable across key rotation
For PostgreSQL-backed no-PIN pre-authorized codes (tx_code_required=false), the replay row is the only durable one-time-use state after redemption, but both the replay scope and JTI hashes here are derived from REGISTRY_NOTARY_SENSITIVE_STATE_KEY. If that key is rotated while a no-PIN code JWT is still unexpired, activation does not reject the rotation because there is no live login or tx-code row for that code, and a previously redeemed code is looked up under different hashes and can be redeemed again to mint another access token. Use a replay hash that is stable across sensitive-state key rotations, or persist/attest key generation for no-PIN code JTIs as well.
Useful? React with 👍 / 👎.
Summary
Why
Registry Stack 1.0 needs one understandable production state topology. Keeping Notary correctness state across Redis and process-local stores added operational dependencies and left multi-instance behavior ambiguous. This change gives each Notary an explicit PostgreSQL-owned state boundary while keeping Relay and Notary schemas, migrations, transactions, and readiness separate.
This is an intentional pre-1.0 breaking cutover. Removed Redis and legacy state configuration does not retain compatibility aliases.
Security and correctness notes
Validation
cargo fmt --all -- --checkcargo metadata --locked --format-version 1cargo check --locked --workspace --all-targetscargo clippy --locked --workspace --all-targets -- -D warningscargo test --locked --workspacecargo deny checkjust ci-preflightThe source-built Solmara results are integration evidence, not proof that the currently published v0.8.4 images support the new commands. Fresh-clone implementer verification is intentionally sequenced after this PR: publish one Registry Stack tag containing #355 and #364, atomically repin Solmara PR #9, run its smoke/restart/reader gates, merge it, then update the public tutorial against protected
solmara-lab/main.Post-1.0 follow-ups
Closes #356