Skip to main content

Step 6: Verify Security & Expose API Endpoints

One of dstack’s key features is verifiable security. Let’s verify your application is running in a genuine TEE and expose secure API endpoints.

Get Attestation Quote Using dstack SDK

The dstack JavaScript SDK provides direct access to attestation functionality:

Container Setup

To use dstack SDK in your Docker container, mount the dstack socket:

Alternative: Direct HTTP API

You can also access attestation via HTTP API:

Expose Secure API Endpoints

Create an API endpoint that provides attestation data:

Verification Process

For complete security verification:
  1. Verify TDX Quote: Use Intel’s DCAP-QVL to verify the quote signature
  2. Check Measurements: Validate MRTD and RTMRs against expected values
  3. Replay Event Log: Use the replayRtmrs() method to verify RTMR3 contains correct app information
  4. Validate App Identity: Ensure the app ID matches your deployment

Verify via Web Interface

  1. In the VMM dashboard, click on your deployment
  2. Navigate to the “Security” tab
  3. Click “View Attestation Report”
  4. Use external TEE verification tools to validate the attestation

Gateway URL Access

Your secure API endpoints will be accessible through dstack gateway URLs:
  • https://<app-id>.example.com/api/attestation
  • https://<app-id>.example.com/api/info