Skip to content

fix(dstack-util): verify the KMS in get-keys as system setup does - #1565

Open
kvinwang wants to merge 1 commit into
nextfrom
fix/get-keys-verifier
Open

kvinwang wants to merge 1 commit into
nextfrom
fix/get-keys-verifier

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

dstack-util get-keys verified the KMS with AttestationVerifier::new_prod(None), while system setup verifies the same KMS with the collateral service from the guest's sys-config and any trust anchors the guest published. Since the KMS RPC certificate must carry a verified attestation, get-keys rejected a KMS that setup had just accepted on any host that configures its own PCCS, and in development guests.

Build the verifier the way setup does, falling back to the production defaults outside a CVM.

Found by tc-gos-setup-024 (#841) on tdxlab: before the change, get-keys failed fetching TCB info for the KMS's mock quote from the default PCCS; with it, the KMS attestation verifies against the published anchors.

Since the KMS RPC certificate must carry a verified attestation, get-keys
verifies it, but with a production verifier that ignores the guest's
sys-config. On a host that configures its own PCCS, or in a guest whose
TEE simulator published trust anchors, get-keys then rejected the KMS
that the guest's own setup had just accepted.

Build the verifier from the sys-config collateral URLs and the published
trust anchors, falling back to the production defaults outside a CVM.

Signed-off-by: Kevin Wang <wy721@qq.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant