Configuration
Relevant source files
The following files were used as context for generating this wiki page:
Configuration in the Tinfoil Verifier project encompasses the management of versioning constraints, hardware-specific attestation policies, and trusted root definitions. Its primary purpose is to ensure that only authorized versions of software and specific hardware configurations are accepted during the remote attestation process.
The system relies on a combination of JSON-based configuration files, embedded hardware collateral, and predefined security policies (such as TCB levels and SVN numbers) to validate the integrity of enclaves.
Version Management and Constraints
The project utilizes semantic versioning (semver) to control which versions of software are considered valid. This is handled through a Config structure that parses versioning constraints from a JSON input.
Configuration Structure
| Field | Type | Description |
|---|---|---|
allowed | string | A semver constraint string (e.g., ">= 1.2.3, != 1.2.4"). |
constraints | *semver.Constraints | The internal compiled representation of the allowed string. |
Sources: config/config.go:9-13
Version Validation Logic
The Parse function initializes the configuration by unmarshaling a JSON string and compiling the constraints. The IsValidVersion method then checks a specific version string against these compiled rules.
Hardware Attestation Policy
Hardware configuration is enforced through strict verification policies for different Trusted Execution Environments (TEEs), specifically Intel TDX and AMD SEV-SNP.
Intel TDX Verification Policy
The TDX configuration includes embedded collateral (QE Identity, TCB Info, CRLs) and hardcoded policy requirements.
- Minimum TCB Evaluation Number: 18
- Intel QE Vendor ID:
939a7233-f79c-4ca9-940a-0db3957f0607 - Expected TD Attributes: All zeros except
SEPT_VE_DISABLE(0x10) - Accepted MRSEAMs: Specific hashes corresponding to authorized Intel TDX modules.
Sources: attestation/tdx.go:62-71, attestation/tdx.go:217-238
AMD SEV-SNP Verification Policy
The SEV-SNP configuration defines the minimum requirements for the Secure Version Number (SVN) and Trusted Computing Base (TCB).
| Policy Component | Minimum Value / Requirement |
|---|---|
| Build Number | 21 |
| Firmware Version | 1.55 |
| Guest Policy | SMT=True, Debug=False, MigrateMA=False |
| TCB Parts | BlSpl: 0x7, SnpSpl: 0xe, UcodeSpl: 0x48 |
Sources: attestation/sev.go:88-132
Trusted Roots and Collateral
The verifier uses embedded JSON and PEM files as a source of truth for its trust architecture.
Sigstore Trusted Root
A trusted_root.json file is embedded into the WASM and client modules. It contains:
- Transparency Logs: Base URLs and public keys for Rekor instances.
- Certificate Authorities: Chain data for Fulcio.
- Timestamp Authorities: Public keys for verifying signed timestamps.
Sources: wasm/main.go:21-22, client/trusted_root.json:1-140
Embedded Hardware Collateral
Collateral is fetched from Intel/AMD and embedded into the binary for offline-capable verification.
Predicate Types and Format Definitions
Configurations for measurement formats are defined as PredicateType constants, which guide the verification logic.
| Constant | URI / Format |
|---|---|
SevGuestV2 | https://tinfoil.sh/predicate/sev-snp-guest/v2 |
TdxGuestV2 | https://tinfoil.sh/predicate/tdx-guest/v2 |
SnpTdxMultiPlatformV1 | https://tinfoil.sh/predicate/snp-tdx-multiplatform/v1 |
Sources: attestation/attestation.go:34-40
Conclusion
The configuration system in Tinfoil Verifier is designed for high-assurance remote attestation. It combines flexible software versioning via semver with immutable, hardcoded hardware policies and embedded trust roots. This ensures that the verification process remains self-contained and strictly adheres to predefined security boundaries for confidential computing environments.