feat: cache NVIDIA GPU attestation collateral#791
Open
kvinwang wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a persistent “PCCS-like” cache service for NVIDIA GPU attestation collateral (OCSP + RIM) and wires it through VMM/sys-config so GPU guests can complete local attestation without relying on NVIDIA’s live services during warm boot.
Changes:
- Introduces
dstack-gpu-attest-proxyHTTP service with bounded persistent caches for OCSP and RIM collateral. - Adds
nvidia_attestation_proxy_urlplumbing (VMM config →.sys-config.json→ guestnvattestinvocation), including selecting NVIDIA’s Trust Outpost OCSP policy when proxy mode is enabled. - Updates Yocto packaging and docs; applies an NVIDIA SDK patch to enforce OCSP
thisUpdate/nextUpdatefreshness validation.
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| os/yocto/layers/meta-nvidia/recipes-graphics/nvattest/nvattest_2026.06.09.bb | Applies OCSP freshness patch and installs the Trust Outpost policy into the GPU image. |
| os/yocto/layers/meta-nvidia/recipes-graphics/nvattest/files/0001-validate-ocsp-response-freshness.patch | Patches NVIDIA SDK to enforce OCSP validity windows even when nonce can’t match. |
| dstack/vmm/vmm.toml | Documents the new optional VMM config knob. |
| dstack/vmm/src/config.rs | Adds nvidia_attestation_proxy_url to VMM config struct. |
| dstack/vmm/src/app.rs | Exposes nvidia_attestation_proxy_url via sys-config; adds coverage in tests. |
| dstack/scripts/bin/dstack-cloud | Supports emitting nvidia_attestation_proxy_url into generated .sys-config.json. |
| dstack/gpu-attest-proxy/src/ocsp.rs | Implements OCSP request key derivation (nonce-agnostic) and cache expiry calculation from signed timestamps. |
| dstack/gpu-attest-proxy/src/main.rs | CLI entrypoint / configuration for running the proxy daemon. |
| dstack/gpu-attest-proxy/src/lib.rs | HTTP server, upstream fetching, caching logic, and request routing. |
| dstack/gpu-attest-proxy/src/cache.rs | Persistent cache storage with metadata + body digests and bounded eviction. |
| dstack/gpu-attest-proxy/README.md | Documents deployment, cache behavior, and operational headers. |
| dstack/gpu-attest-proxy/Cargo.toml | New crate manifest for the proxy. |
| dstack/dstack-util/src/system_setup.rs | Routes nvattest OCSP/RIM calls through proxy when configured; selects Trust Outpost policy. |
| dstack/dstack-util/Cargo.toml | Adds url dependency for proxy URL validation. |
| dstack/dstack-types/src/lib.rs | Adds nvidia_attestation_proxy_url to sys-config schema. |
| dstack/Cargo.toml | Adds gpu-attest-proxy to the Rust workspace. |
| dstack/Cargo.lock | Locks new crate and dependency graph updates. |
| docs/tutorials/vmm-configuration.md | Documents how to enable the GPU attestation cache/proxy. |
| docs/security/cvm-boundaries.md | Documents the trust boundary implications of nvidia_attestation_proxy_url. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Builds on #789 and removes NVIDIA's live OCSP/RIM services from the warm GPU-VM boot path.
dstack-gpu-attest-proxy, a persistent PCCS-like cache:POST /ocspkeys responses by the DER OCSP request list, excluding the per-request nonceGET /v1/rim/<id>caches version-addressed NVIDIA RIM documentsnextUpdate(or one hour fromthisUpdatewhen absent)nvidia_attestation_proxy_urlto VMM config and.sys-config.jsonnvattestOCSP and RIM calls through the configured proxyallow_trust_outpost_ocsp.regoin the GPU image and select it only in proxy modethisUpdate/nextUpdatewithOCSP_check_validity, so accepting a cached nonce mismatch cannot turn an old signedgoodresponse into an indefinite replayThe proxy never signs or rewrites collateral. The guest still verifies NVIDIA signatures, certificate/RIM chains, response freshness, measurements, CC state, and the independent fresh GPU evidence nonce added by #789.
Configuration
Run the proxy on a host/fleet address reachable during early guest boot:
Then configure the VMM:
See
dstack/gpu-attest-proxy/README.mdfor TTLs and environment variables.Verification
cargo fmt --all -- --checkcargo clippy -p dstack-gpu-attest-proxy -p dstack-util -p dstack-types -p dstack-vmm --all-targets -- -D warningscargo test -p dstack-gpu-attest-proxy -p dstack-util -p dstack-types -p dstack-vmmpython3 -m py_compile dstack/scripts/bin/dstack-cloudgit apply --checkagainst NVIDIA SDK commit9d12801cea8a198ea0f29640dfaf8a4017c841c5X-Dstack-Cache: MISSX-Dstack-Cache: HITopenssl ocsp-verifiable asgoodwith the original signednextUpdateStacked on #789; review only the final commit in this PR.