Skip to content

Commit 722bf3c

Browse files
Xynnn007cursoragent
andcommitted
kbs: document attestation policy selection
Describe the "id" field of the RCAR Request in the protocol document, including that its accepted values are deployment specific and that an unmapped id is rejected, both of which a KBC implementation has to know. State that selecting an id is not an authorization decision so that readers do not mistake it for one. Document policy_id_map for each attestation service type, and note that for Intel TA a selected id replaces the configured policy_ids. Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 03d1e5c commit 722bf3c

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

kbs/docs/config.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,15 @@ Concrete attestation service can be set via `type` field. Supported attestation
154154

155155
Due to different `type` field, properties are different.
156156

157+
`timeout` and `policy_id_map` apply to every type. The latter is a table mapping
158+
each ID a client may select to one or more policy IDs:
159+
160+
```toml
161+
[attestation_service.policy_id_map]
162+
alice = ["alice-strict"]
163+
bob = ["bob-cpu", "bob-gpu"]
164+
```
165+
157166
#### Built-In CoCo AS
158167

159168
When `type` is set to `coco_as_builtin`, the following properties can be set.
@@ -164,6 +173,7 @@ When `type` is set to `coco_as_builtin`, the following properties can be set.
164173
| Property | Type | Description | Default |
165174
|----------------------------|-----------------------------|----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
166175
| `timeout` | Integer | The maximum time (in minutes) of the attestation session | 5 |
176+
| `policy_id_map` | Map of String array | AS policies selectable by a client, keyed by ID. See [RCAR `Request`][ps]| `{}` |
167177
| `rvps_config` | [RVPSConfiguration][2] | RVPS configuration | See [RVPSConfiguration][2] |
168178
| `attestation_token_broker` | [AttestationTokenBroker][1] | Attestation result token configuration. | See [AttestationTokenBroker][1] |
169179
| `verifier_config` | Object | Optional verifier specific configuration (for example TPM)| See [Verifier Configuration][vcfg] |
@@ -173,6 +183,7 @@ When `type` is set to `coco_as_builtin`, the following properties can be set.
173183
[3]: #keyvaluestorage
174184
[4]: #tokensignerconfig
175185
[vcfg]: ../../attestation-service/docs/config.md#verifier-configuration
186+
[ps]: ./kbs_attestation_protocol.md#request
176187

177188
##### AttestationTokenBroker
178189

@@ -234,6 +245,7 @@ The following properties can be set.
234245
| Property | Type | Description | Default |
235246
|-------------|---------|-------------------------------------------------------------------------------------------------------------------------------|--------------------------|
236247
| `timeout` | Integer | The maximum time (in minutes) between RCAR handshake's `auth` and `attest` requests | 5 |
248+
| `policy_id_map` | Map of String array | AS policies selectable by a client, keyed by ID. See [RCAR `Request`][ps] | `{}` |
237249
| `as_addr` | String | The URL of the remote CoCoAS | `http://127.0.0.1:50004` |
238250
| `pool_size` | Integer | The connections between KBS and CoCoAS are maintained in a conenction pool. This property determines the max size of the pool | `100` |
239251

@@ -251,6 +263,7 @@ The following properties can be set.
251263
| `api_key` | String | Intel Trust Authority API key. | Yes | - |
252264
| `certs_file` | String | URL to an Intel Trust Authority portal or path to JWKS file used for token verification. | Yes | - |
253265
| `policy_ids` | String array | Quoted and comma-separated list of policy IDs defined in ITA portal. | No | `[]` |
266+
| `policy_id_map` | Map of String array | Policies selectable by a client, keyed by ID. A selected ID replaces `policy_ids`. See [RCAR `Request`][ps] | No | `{}` |
254267
| `allow_unmatched_policy` | Boolean | Whether policy matching is required. If no `policy_ids` are specified, policy matching is not checked. | No | false |
255268

256269
Detailed [documentation](https://docs.trustauthority.intel.com).

kbs/docs/kbs_attestation_protocol.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,21 @@ transfer some specific information. For example, some attestations follow the
117117
Diffie–Hellman key exchange protocol to first build a secure channel and
118118
transfer secret messages (Such as AMD SEV(-ES) pre-attestation).
119119

120+
`extra-params` may also carry an `id`, which selects the Attestation Service
121+
policies that evaluate this session's evidence:
122+
123+
```json
124+
"extra-params": { "id": "alice" }
125+
```
126+
127+
KBS maps each `id` to one or more attestation policies, so the accepted values
128+
are specific to a deployment and must be known to the KBC in advance. An
129+
unmapped `id` is rejected, and omitting the field selects a default policy.
130+
131+
The KBC picks the `id` itself, so doing so is not an authorization decision. The
132+
policies that were applied are reported in the
133+
[Attestation Results Token](#attestation-results-token).
134+
120135
## `Challenge`
121136

122137
If the KBC does not own any KBS generated HTTP Cookie, or if the Cookie validity

0 commit comments

Comments
 (0)