Skip to content

fix: unify RA-TLS cert attestation format and fix onboard os_image_hash#586

Closed
kvinwang wants to merge 1 commit intomasterfrom
fix/ra-tls-cert-format-and-onboard-workaround
Closed

fix: unify RA-TLS cert attestation format and fix onboard os_image_hash#586
kvinwang wants to merge 1 commit intomasterfrom
fix/ra-tls-cert-format-and-onboard-workaround

Conversation

@kvinwang
Copy link
Collaborator

Summary

  • RA-TLS cert format: use unified PHALA_RATLS_ATTESTATION OID for TDX certs instead of the legacy separate TDX_QUOTE + EVENT_LOG OIDs. The new format preserves vm_config (including os_image_hash). The reader already prefers the new format and falls back to old OIDs for backward compat with existing certs.
  • Onboard workaround: when the remote source KMS uses the old cert format (missing vm_config), the receiver-side ensure_kms_allowed fills os_image_hash from the local KMS's own value. This is safe because mrAggregated already validates OS image integrity through the RTMR measurement chain. Marked with TODO to remove once all source KMS instances are upgraded.
  • Docs: update test guide to remove the "0x" osImages workaround and note the fix.

Test plan

  • cargo check -p ra-tls -p dstack-kms
  • cargo clippy -p ra-tls -p dstack-kms --all-targets -- -D warnings
  • Integration test on TDX host: verify new cert contains PHALA_RATLS_ATTESTATION with config populated
  • Onboard from old-format source KMS: verify workaround fills os_image_hash

Two changes:

1. ra-tls: use unified PHALA_RATLS_ATTESTATION OID for TDX certs instead
   of the legacy separate TDX_QUOTE + EVENT_LOG OIDs. The new format
   preserves vm_config (including os_image_hash). The reader already
   prefers the new format and falls back to old OIDs for backward compat.

2. kms: when the remote source KMS uses the old cert format (missing
   vm_config), the receiver-side onboard check fills os_image_hash from
   the local KMS's own value. This is safe because mrAggregated already
   validates OS image integrity through the RTMR measurement chain.
   This workaround should be removed once all source KMS instances use
   the new cert format.
@kvinwang kvinwang force-pushed the fix/ra-tls-cert-format-and-onboard-workaround branch from 9f05e22 to 81e4eae Compare March 20, 2026 03:36
@kvinwang
Copy link
Collaborator Author

Merged into #585

@kvinwang kvinwang closed this Mar 20, 2026
@kvinwang kvinwang deleted the fix/ra-tls-cert-format-and-onboard-workaround branch March 20, 2026 03:39
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