Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Dstack Remote Attestation Example

🚨 Important: This example is a PoC intended to illustrate the principles only; it is not optimized for production use.

For a streamlined, production-ready workflow, use the Dstack Verifier: https://github.com/Dstack-TEE/dstack/tree/master/verifier

This example illustrates the remote attestation process for every component of the Dstack Applications. It encompasses everything from the CPU microcode to the TDVF, VM configuration, kernel, kernel parameters and application code. For further details, please refer to our attestation guide.

Overview

The verify.py script demonstrates how to:

  • Verify TDX quotes using Intel's DCAP
  • Parse and validate event logs
  • Replay and verify Runtime Measurement Registers (RTMRs)
  • Validate application integrity through compose hash verification

Prerequisites

Before running the example, ensure you have the following installed:

  1. Python 3.10+

    • Required for executing verify.py
  2. Dstack OS Image

  3. dcap-qvl

    • A TDX/SGX quote verification tool from Phala
    • Install with: cargo install dcap-qvl-cli
  4. dstack-mr

    • A tool to calculate expected measurement values for Dstack Base Images
    • Install with: go install github.com/kvinwang/dstack-mr@latest

Setup

  1. Generate the Application Report:

    • Run your Dstack application to produce a report.json file containing the attestation data
  2. Prepare the Compose File:

    • Create and properly configure the app-compose.json file to match your application's settings

Run the Example

Run the verification process simply by executing:

python verify.py