Map SNP attestation to JSON/Rego types
Open
@achamayou is already working on this.
Since Jul 14, 2025.
Stage-0
- Dominant language
- C++
- Stars
- 16
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
The current rego policies are passed a couple of hardcoded fields (measurements, host_data), but should receive a fully parsed-out attestation that they can choose to interpret, and assert things like TCB versions for example.
I think the existing TypeScript mapping exposed by the CCF JS API is a good starting point for this, although I am not sure how Rego deals with ArrayBuffers: https://microsoft.github.io/CCF/main/js/ccf-app/interfaces/global.SnpAttestationResult.html
interface TcbVersion {
boot_loader: number;
microcode: number;
snp: number;
tee: number;
}
interface SnpAttestationResult {
attestation: {
author_key_digest: ArrayBuffer;
chip_id: ArrayBuffer;
committed_build: number;
committed_major: number;
committed_minor: number;
committed_tcb: TcbVersion;
cpuid_fam_id: number;
cpuid_mod_id: number;
cpuid_step: number;
current_build: number;
current_major: number;
current_minor: number;
family_id: ArrayBuffer;
flags: {
author_key_en: number;
mask_chip_key: number;
signing_key: number;
};
guest_svn: number;
host_data: ArrayBuffer;
id_key_digest: ArrayBuffer;
image_id: ArrayBuffer;
launch_tcb: TcbVersion;
measurement: ArrayBuffer;
platform_info: { smt_en: number; tsme_en: number };
platform_version: TcbVersion;
policy: {
abi_major: number;
abi_minor: number;
debug: number;
migrate_ma: number;
single_socket: number;
smt: number;
};
report_data: ArrayBuffer;
report_id: ArrayBuffer;
report_id_ma: ArrayBuffer;
reported_tcb: TcbVersion;
signature: { r: ArrayBuffer; s: ArrayBuffer };
signature_algo: number;
version: number;
vmpl: number;
};
uvm_endorsements?: { did: string; feed: string; svn: string };
}
Items to resolve:
- What's the best way to expose binary buffers to rego-cpp now, and eventually?
- Should we line up UVM endorsements on SCITT CWT Claims, with the expectation that they will move to ESRP+CTS?
- Is it worth exposing the signature field at all? That will always be verified beforehand, there does not seem to be a use-case for that.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.