1+ apiVersion : v1
2+ kind : ConfigMap
3+ metadata :
4+ name : attestation-policy
5+ namespace : trustee-operator-system
6+ annotations :
7+ argocd.argoproj.io/sync-wave : " 4"
8+ data :
9+ default_cpu.rego : |
10+ package policy
11+
12+ import rego.v1
13+ default executables := 33
14+ default hardware := 97
15+ default configuration := 36
16+
17+ ## miminimal but reliable attestation policy
18+ ## hardware and firmware changes. This is not in our control. It's up to the user to update acceptable measurements
19+ ## In conjuction with verification with the service provider.
20+ ## currently setup for azure vTPM
21+
22+
23+ ##### Azure vTPM SNP
24+ executables := 3 if {
25+ # input.azsnpvtpm.measurement in data.reference.measurement
26+ input.azsnpvtpm.tpm.pcr03 in data.reference.snp_pcr03
27+ input.azsnpvtpm.tpm.pcr08 in data.reference.snp_pcr08
28+ input.azsnpvtpm.tpm.pcr09 in data.reference.snp_pcr09
29+ input.azsnpvtpm.tpm.pcr11 in data.reference.snp_pcr11
30+ input.azsnpvtpm.tpm.pcr12 in data.reference.snp_pcr12
31+ }
32+
33+ hardware := 2 if {
34+ # Check the reported TCB to validate the ASP FW
35+ # input.azsnpvtpm.reported_tcb_bootloader in data.reference.tcb_bootloader
36+ # input.azsnpvtpm.reported_tcb_microcode in data.reference.tcb_microcode
37+ # input.azsnpvtpm.reported_tcb_snp in data.reference.tcb_snp
38+ # input.azsnpvtpm.reported_tcb_tee in data.reference.tcb_tee
39+ input.azsnpvtpm
40+ }
41+
42+ # For the 'configuration' trust claim 2 stands for
43+ # "The configuration is a known and approved config."
44+ #
45+ # For this, we compare all the configuration fields.
46+ configuration := 2 if {
47+ # input.azsnpvtpm.platform_smt_enabled in data.reference.smt_enabled
48+ # input.azsnpvtpm.platform_tsme_enabled in data.reference.tsme_enabled
49+ # input.azsnpvtpm.policy_abi_major in data.reference.abi_major
50+ # input.azsnpvtpm.policy_abi_minor in data.reference.abi_minor
51+ # input.azsnpvtpm.policy_single_socket in data.reference.single_socket
52+ # input.azsnpvtpm.policy_smt_allowed in data.reference.smt_allowed
53+ input.azsnpvtpm
54+ }
55+
56+ ##### Azure vTPM TDX
57+ executables := 3 if {
58+ input.aztdxvtpm.tpm.pcr03 in data.reference.tdx_pcr03
59+ input.aztdxvtpm.tpm.pcr08 in data.reference.tdx_pcr08
60+ input.aztdxvtpm.tpm.pcr09 in data.reference.tdx_pcr09
61+ input.aztdxvtpm.tpm.pcr11 in data.reference.tdx_pcr11
62+ input.aztdxvtpm.tpm.pcr12 in data.reference.tdx_pcr12
63+ }
64+
65+ hardware := 2 if {
66+ # Check the quote is a TDX quote signed by Intel SGX Quoting Enclave
67+ input.aztdxvtpm.quote.header.tee_type == "81000000"
68+ input.aztdxvtpm.quote.header.vendor_id == "939a7233f79c4ca9940a0db3957f0607"
69+
70+ # Check TDX Module version and its hash. Also check OVMF code hash.
71+ # input.aztdxvtpm.quote.body.mr_seam in data.reference.mr_seam
72+ # input.aztdxvtpm.quote.body.tcb_svn in data.reference.tcb_svn
73+ # input.aztdxvtpm.quote.body.mr_td in data.reference.mr_td
74+ }
75+
76+ configuration := 2 if {
77+ # input.aztdxvtpm.quote.body.xfam in data.reference.xfam
78+ input.aztdxvtpm
79+ }
0 commit comments