Repository navigation
Conversation
Signed-off-by: Kevin Wang <wy721@qq.com>
This branch has not been deployed
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.
Problem
Rotating the root or app epoch stops the KMS from issuing new keys to retired composes, but certificates it already signed stay valid until they expire. The requester chooses
not_after(the default is 10 years), and there is no revocation list. A pre-rotation certificate also carries nothing that marks it as old: the app CA keeps the same subject across app epochs, so a verifier cannot tell which epoch signed a peer certificate.Fix
SignCertstamps the(root_epoch, app_epoch)it authorized into a new extension,PHALA_RATLS_KEY_EPOCHS(OID1.3.6.1.4.1.62397.1.10). The extension is a MessagePack map, encoded the same way as app info.CertExt::get_key_epochsreads it, so a verifier that knows the current epochs can reject a peer certificate from an older one. Certificates from a local CA carry no epochs. Readers that do not know the extension ignore it.docs/app-key-epochs.mddocuments the extension and the lack of revocation.Verification
cargo test -p ra-tls -p cert-client -p dstack-kms --all-featurespasses, including a new certificate round-trip test for the extension.cargo clippyon these crates is clean.cargo check --workspace --all-features --testspasses.