pub struct DstackTdxPolicy {
pub expected_bootchain: Option<ExpectedBootchain>,
pub app_compose: Option<Value>,
pub os_image_hash: Option<String>,
pub allowed_tcb_status: Vec<String>,
pub pccs_url: Option<String>,
pub cache_collateral: bool,
pub disable_runtime_verification: bool,
}Expand description
Policy configuration for dstack TDX verification.
Fields§
§expected_bootchain: Option<ExpectedBootchain>Expected bootchain measurements (MRTD, RTMR0-2).
app_compose: Option<Value>Expected app compose configuration.
os_image_hash: Option<String>Expected OS image hash (SHA256).
allowed_tcb_status: Vec<String>Allowed TCB status values.
pccs_url: Option<String>PCCS URL for collateral fetching.
Defaults to https://pccs.phala.network/tdx/certification/v4.
cache_collateral: boolCache collateral to avoid repeated fetches.
disable_runtime_verification: boolDisable runtime verification (NOT RECOMMENDED for production).
When false (default), all runtime fields (expected_bootchain, app_compose, os_image_hash) must be provided or verification will fail. Set to true only for development/testing.
Implementations§
Source§impl DstackTdxPolicy
impl DstackTdxPolicy
Sourcepub fn dev() -> Self
pub fn dev() -> Self
Relaxed policy for development.
Accepts common TCB statuses and disables runtime verification (bootchain, app_compose, os_image_hash checks are skipped).
Sourcepub fn validate(&self) -> Result<(), AtlsVerificationError>
pub fn validate(&self) -> Result<(), AtlsVerificationError>
Validate the policy configuration.
Checks that:
allowed_tcb_statusvalues are valid TCB status stringsos_image_hashis a valid hex string (if provided)expected_bootchainfields are valid hex strings (if provided)
Trait Implementations§
Source§impl Clone for DstackTdxPolicy
impl Clone for DstackTdxPolicy
Source§fn clone(&self) -> DstackTdxPolicy
fn clone(&self) -> DstackTdxPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more