|
1 | | -# Parsed Claims |
| 1 | +# The Attestation Token |
2 | 2 |
|
3 | | -After CoCo-AS verifies every evidence, a token with _parsed claims_ will be returned. |
4 | | -_parsed claims_ is a key-value map inside the token, and it reflects the environment |
5 | | -information that the evidence contains. Different platforms will have different |
6 | | -key value members of the parsed claims. This document will show the whole key value |
7 | | -list of different platforms. |
| 3 | +The Attestation Service generates an EAR attestation token, which contains many claims. |
8 | 4 |
|
9 | | -All platforms will by default have two fixed claims: |
10 | | -- `report_data`: report data when generating the evidence. |
11 | | -- `init_data`: Hostdata when creating the TEE instance. |
| 5 | +For the general structure of the attestation token, refer to the [EAR specificication](https://datatracker.ietf.org/doc/draft-ietf-rats-ear/). |
| 6 | + |
| 7 | +Generally speaking, the attestation token will include an Appraisal for each device |
| 8 | +that is part of the TCB (including the CPU). |
| 9 | +These appraisals can be accessed through the `submods` field in the EAR Token. |
| 10 | +Each submod is given a generic key constructed from the CPU class and the device count. |
| 11 | +For instance, the CPU submod will be called `cpu0`. |
| 12 | +If a GPU has been attested as part of the guest, there will be a `gpu0` submod. |
| 13 | +If there is more than one GPU, there will be additional `gpuN` submods. |
| 14 | + |
| 15 | +`cpu0` is considered to be the primary attester and has some special |
| 16 | +information associated with it. |
| 17 | + |
| 18 | +# ReportData and InitData |
| 19 | + |
| 20 | +ReportData and InitData are two key Trustee concepts. |
| 21 | +ReportData refers to data provided by a guest at attestation time. |
| 22 | +This is sometimes called user data. The KBS protocol uses this |
| 23 | +field to measure the the nonce and Tee Public Key. |
| 24 | +During attestation Trustee will ensure that the corresponding |
| 25 | +field in the hardware evidence matches the report data values |
| 26 | +that are expected for a given connection. |
| 27 | + |
| 28 | +InitData is a more powerful and subtle concept. See the [InitData Specification]() |
| 29 | +for more information. |
| 30 | +The basic idea is that InitData is a generalization over boot-time configuration |
| 31 | +fields such as HostData (on SNP) or MRConfig (on TDX). |
| 32 | +InitData is used to provision dynamic, measured, but not secret |
| 33 | +configuration data to the guest. |
| 34 | +The InitData plaintext is a TOML or JSON file containing this configuration |
| 35 | +while the InitData hash is the hash of this file which is added to the measuremet. |
| 36 | +A client can optionally provide the InitData plaintext to Trustee. |
| 37 | +If so, Trustee will check the plaintext against the hardware evidence |
| 38 | +and expose the InitData plaintext to the policy engine and as part of the |
| 39 | +attestation token. |
| 40 | + |
| 41 | +Both the InitData and ReportData will usually be included the attestation token. |
| 42 | +These fields will be available under the `AnnotatedEvidence` extension of the |
| 43 | +`cpu0` Appraisal. |
| 44 | + |
| 45 | +If the plaintext InitData is provided, some transformations will be applied |
| 46 | +to the InitData to make it more easy to consume. |
| 47 | +Specifically, if the InitData plaintext is provided as toml, |
| 48 | +some of the data fields in the InitData will be parsed into JSON. |
| 49 | +If the `cdh.toml` or `aa.toml` are present in the InitData, |
| 50 | +they will be parsed as JSON (although the keys will still be called `x.toml`). |
| 51 | +If `policy.rego` is present in the InitData and contains a `policy_data` claim |
| 52 | +at the end of the file, the `policy.rego` field will be removed from the InitData |
| 53 | +and replaced with the `policy_data` parsed as JSON. This will inserted |
| 54 | +with the key `agent_policy_claims`. |
| 55 | + |
| 56 | +# Hardware Claims |
| 57 | + |
| 58 | +The annotated evidence extension will also include hardware-specific claims |
| 59 | +extracted by the verifiers. These usually referred to as TCB Claims. |
| 60 | +The TCB Claims available on each platform are listed below. |
12 | 61 |
|
13 | 62 | ## Sample |
14 | 63 |
|
|
0 commit comments