Transport & Attestation
TL;DRThis page describes the current programmatic path: the Node SDK and reference
daemon connect to the engine over RA-TLS terminated inside the Darknyx CVM.
The deployment gateway passes the encrypted TLS stream through without seeing
the request. Before sending credentials or order intent, the client checks that
the certificate on its actual connection is bound by a fresh TDX quote to the
approved engine image, boot session, and settlement-signer set.
The trust boundary
At each engine boot, Darknyx generates a random TLS key in memory and never persists it. The engine serves HTTPS and WebSocket traffic with that key. The deployment gateway routes the connection by hostname but does not terminate its TLS, so plaintext first appears inside the measured engine:- Fresh transport identity. A later boot has a different certificate and must be verified again.
- Connection binding. The SDK compares the quote-bound SPKI with the certificate observed on the socket carrying the session; a quote fetched from an unrelated probe is not enough.
- One boundary for REST and streams. HTTPS and
wss://use the same boot-scoped enclave identity.
Verifying the engine
The programmatic client establishes trust before authentication. It first observes the engine’s self-signed certificate, requests fresh transport evidence over that connection, and verifies the complete chain below. A reconnect or boot change must be gated again; a hostname or ordinary CA certificate is not the root of trust.GET /transport-attestation
Returns a nonce-bound TDX quote whose manifest commits to the TLS SPKI, boot session, application identity, and complete settlement-signer set. The certificate is self-signed by design. Never work around that withcurl -k, NODE_TLS_REJECT_UNAUTHORIZED=0, or a custom client that simply
accepts every certificate. The SDK accepts it only after the quote proves the
SPKI belongs to the approved enclave boot.
GET /info
Returns the identity of the running image.GET /attestation
Returns an Intel TDX attestation quote plus the data needed to verify it. The quote is a hardware-signed measurement of the running VM. A client passing a freshreportData nonce gets a quote bound to that nonce (freshness) and to the
hash of the complete ordered signer set.
The verification chain
A verifying client confirms, in order:- The caller nonce is fresh and the transport quote’s hardware signature is valid with a current platform trusted computing base.
- Rebuilding the canonical transport manifest reproduces the quote-bound
digest, and its
tls_spki_sha256equals the certificate on the actual socket carrying the session. - The event log is structurally valid, contains exactly one runtime-typed
compose-hashevent, and has no impossible entry carrying both a supplied digest and a payload. Replaying it reproduces the DCAP-verified quote’s RTMR3, and the measured compose hash equals the independently pinned release value. - The manifest’s boot session matches
/info; its complete ordered signer set equals a finalized on-chainVaultConfig.tee_pubkeysread.
Gateway evidence is not the programmatic trust root
The dstack gateway also serves files under/evidences/ (quote.json,
cert.pem, ACME-account metadata, and an integrity checksum). Those files
describe the gateway’s certificate and confidential deployment; they are
not the Darknyx engine quote returned by /attestation.
They are useful when evaluating the surrounding deployment, but they are not
needed to authenticate the programmatic session: the gateway does not terminate
that session’s TLS. Fetching the evidence bundle cannot replace checking the
enclave certificate and /transport-attestation response on the connection the
client actually uses.