Skip to content

kms: require attestation for all KMS flows#579

Merged
kvinwang merged 1 commit intomasterfrom
kms-require-attestation
Mar 19, 2026
Merged

kms: require attestation for all KMS flows#579
kvinwang merged 1 commit intomasterfrom
kms-require-attestation

Conversation

@kvinwang
Copy link
Collaborator

@kvinwang kvinwang commented Mar 19, 2026

Summary

Stacked on top of #573, this PR removes the KMS quote_enabled split and makes attestation mandatory for all KMS flows.

Changes:

  • remove core.onboard.quote_enabled from KMS config
  • always require self attestation during bootstrap / auto-bootstrap
  • always embed attestation in KMS RPC certs
  • always use attested / RA-TLS onboarding to source KMS
  • always require attested callers on GetKmsKey
  • change auth-simple so kms.mrAggregated = [] is deny-all for KMS, matching the allowlist semantics used by on-chain auth
  • update deployment / auth-simple / manual-test docs to require an explicit KMS MR allowlist before bootstrap
  • add tests/docs/kms-bootstrap-onboard.md and expand the manual test docs with bootstrap / onboard / trusted-RPC deny cases

Rationale

The old quote_enabled switch left KMS with two different security models:

  • quoted KMS
  • no-quote / compatibility mode

That made bootstrap / onboard / trusted RPC behavior harder to reason about, and produced awkward partial-compatibility cases where one side skipped a new check but another side still required attestation.

This PR makes the model explicit and uniform:

  • KMS always requires attestation
  • local development without TDX hardware should use sdk/simulator
  • KMS authorization in auth-simple now uses a real MR allowlist instead of treating an empty list as "allow any"

Validation

  • cargo fmt --all
  • cargo check -p dstack-kms
  • cargo clippy -p dstack-kms --all-targets -- -D warnings
  • cd kms/auth-simple && bun run test:run
  • cd kms/auth-simple && bun run lint
  • manual teepod runbook validation for:
    • bootstrap deny / allow
    • onboard deny on receiver side
    • onboard deny on source side
    • runtime trusted-RPC self-auth deny

Notes

This is a stacked PR.

@kvinwang kvinwang marked this pull request as ready for review March 19, 2026 09:20
@kvinwang kvinwang changed the base branch from kms-bootstrap-onboard-auth-checks to master March 19, 2026 12:47
@kvinwang kvinwang force-pushed the kms-require-attestation branch from 93f467b to c8cddc3 Compare March 19, 2026 12:57
@kvinwang kvinwang merged commit 30c933a into master Mar 19, 2026
14 checks passed
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