# OAID-5 — Trust Lists, Vouching, Trust Programs

Version 0.2.3-draft · Part of the AllowedBy specification set

## 1. Principle

There is no root. A service decides which nodes it accepts by writing a trust list, a signed local file. Three sources feed it: direct pins, vouching chains between nodes, and published trust programs. Evaluation is local and offline. Trust lists pin a node's long-lived `node` key (OAID-1 §6), never its role keys, so role-key rotation never breaks a service.

## 2. Trust list document

JWS `typ: oaid-trust+jwt`, signed by a key the service controls, `iss` = the publisher (the service, or a program, §5). The signature is for the service's own integrity (configuration management), not for anyone else.

```json
{
  "v": 1,
  "iss": "api.example.com",
  "iat": 1761480000,
  "exp": 1769256000,
  "jti": "…",
  "anchors": [
    { "node": "node.example.org", "kid": "Rt0o…", "max_level": 3, "note": "our own node" },
    { "node": "cloud-node.example", "kid": "Aa9…", "max_level": 1 }
  ],
  "vouching": { "enabled": true, "max_depth": 2, "min_vouchers": 2, "inherit_max_level": false, "vouched_max_level": 1 },
  "programs": [
    { "name": "eu-payments-trust-program", "url": "https://program.example.eu/list", "kids": ["Pp4…"], "max_level": 2, "refresh": 86400 }
  ],
  "witnesses_min": 2,
  "requirements": {
    "default":          { "min_level": 1, "min_tier": 0, "attestation": ["orchestrator", "tpm2", "apple-se", "android-strongbox", "fido", "windows-hello", "aws-kms", "gcp-kms", "azure-kv", "hsm-pkcs11", "aws-nitro", "gcp-cc", "azure-cc"] },
    "invoices:approve": { "min_level": 2, "min_tier": 1 },
    "payments:release": { "min_level": 2, "min_tier": 1, "attestation": ["tpm2", "apple-se", "android-strongbox", "fido", "windows-hello", "aws-kms", "gcp-kms", "azure-kv", "hsm-pkcs11", "aws-nitro", "gcp-cc", "azure-cc"] }
  },
  "denied": []
}
```

| Member | Meaning |
|---|---|
| `anchors` | Nodes trusted directly, each with its `node` key id pinned in `kid`. `max_level` (0–3) caps the level this service will believe from this node, as countersigner or as home node, regardless of what the grant says. |
| `vouching` | Whether nodes vouched for by anchors are accepted, how deep, how many distinct vouchers are needed, and the level cap for vouched nodes. |
| `programs` | Published lists (§5) merged into anchors at `refresh` interval. `kids` pin the program's signing keys by thumbprint; the program list carries its public key as `jwk` in the JWS header, and is ignored unless that key's thumbprint is pinned. A program node's level is the lower of the program's `max_level` for it and this entry's `max_level`. |
| `witnesses_min` | Minimum distinct witness cosignatures a node's latest checkpoint must carry, counted only among nodes in this trust list (anchors, vouched, program). `0` disables the check. |
| `requirements` | Per capability (or capability prefix, longest match) minimum level, custody tier and allowed attestation types. `default` applies otherwise. |
| `denied` | Node names refused regardless of anchors, programs or vouches (§7). |

## 3. Evaluation algorithm

A node `N` is trusted when its statement is signed by a `node` key `K` and:

1. `N` is an anchor with `kid = K`: `max_level` = anchor's; or
2. a program lists `N` with `K`: `max_level` = program's; or
3. `vouching.enabled` and `N` has a depth `d ≤ max_depth`, where anchors and program nodes have depth 0 and `N` has depth `d` when at least `min_vouchers` distinct trusted, non-denied nodes of depth `< d` hold an unexpired vouch (§4) for `N`,`K`: `max_level = vouched_max_level` (or the minimum along the chain when `inherit_max_level`);
4. otherwise `untrusted_node`.
5. If `witnesses_min > 0`: the cached latest checkpoint of `N` MUST carry at least `witnesses_min` cosignatures from distinct trusted nodes, no older than 24 hours. Otherwise `insufficient_witnesses`.

A document is then accepted only if its `kid` is a role key delegated by `N`'s statement with the role for its `typ`, and not excluded by `revoked_keys` (OAID-1 §6).

For a grant, both nodes involved MUST be trusted: the countersigning node, and the **home node** that signed the embedded human registration `human.reg`. A countersigning node cannot invent a human it does not host. The effective level is `min(human.level, the level in human.reg, max_level of the countersigning node, max_level of the home node)`.

Caches: node statements, vouching statements, program lists, checkpoints and status lists are fetched by a background process, never on the request path. A service with an empty cache MUST reject rather than fetch synchronously.

## 4. Vouching statements

A node vouches for another by publishing JWS `typ: oaid-vouch+jwt`, signed with its `issue` role key and logged in its own log:

```json
{ "v": 1, "iss": "node.example.org", "iat": …, "exp": …, "jti": "…", "log": { "idx": 184021 },
  "for": { "node": "other.example.net", "kid": "Hh2k…" },
  "basis": "audited-2026-09", "max_level": 2 }
```

`for.kid` is the vouched node's `node` key. `exp` MUST be at most 1 year. A voucher MUST revoke the vouch (`aby-revoke+jwt` with target `vouch` = its `jti`, logged) when the basis no longer holds. Vouching is transitive only to `max_depth` as set by the verifier; a voucher cannot force depth.

Discovery: a verifier learns candidate vouches from `vouches` in trusted node statements (OAID-2 §3) and fetches them with `GET {log}/documents/{idx}` (OAID-4 §3). Verifiers MUST verify the vouch JWS against the voucher's statement keys.

## 5. Trust programs

A trust program is a party (regulator, industry body, foundation, company) that publishes a signed list of nodes meeting its criteria. Format: JWS `typ: oaid-trust+jwt` with `iss` = program name, containing only `anchors` (pinning `node` keys) and optionally `requirements`. A program's `anchors` MAY carry `max_level` and `audit` (`{ "standard": "…", "date": …, "report": "url" }`).

Programs are discovered out of band. A service subscribes by listing the program URL and signing keys. A program SHOULD publish a new list at least monthly and MUST publish within 24 hours of removing a node.

## 6. Status freshness and offline operation

Status lists are refreshed in the background at least every 300 s for `read` and `write`, and at least every 60 s for `write-hard` and `irreversible`. The status bit is never cached with the signature result.

| Class | Stale status list |
|---|---|
| `read`, `write` | Keep using the last list and keep retrying for up to 3600 s; older, fail closed with `status_stale` |
| `write-hard`, `irreversible` | List older than 60 s: fail closed with `status_stale`. No grace. |

Other cached material: node statements are valid until their `exp`; checkpoints older than 24 hours fail `witnesses_min` unless the service sets it to `0`. Services SHOULD alert operators when caches go stale.

## 7. Revoking trust

Removing a node from `anchors`, from a program list, or revoking a vouch is immediate for the party doing it and propagates to others as they refresh. No coordination is required. A service MAY keep a `denied` list of node names that override everything else.

## 8. Default trust list

SDKs ship a default trust list, published as a trust program (§5). Its governance:

- Before 1.0, the default list and this specification set move to a neutral body (target: an OpenID Foundation working group, or the IETF through Web Bot Auth or OAuth).
- Inclusion criteria are public; every inclusion and removal cites them.
- 1.0 requires at least 3 independent node operators on the list.
- AllowedBy cannot add itself, or any node it operates, unilaterally.

Services MAY replace or narrow the default list; nothing in verification depends on it.

## Change log

Every change to this document adds a row here and increments its version (README, Versioning).

| Version | Date | Change |
|---|---|---|
| 0.2.3-draft | 2026-10-28 | `max_level` ranges 0–3 (CHANGES §17). |
| 0.2.2-draft | 2026-10-27 | Vouch signer, vouching depth with `min_vouchers`, program key pinning and level cap (CHANGES §16). |
| 0.2.1-draft | 2026-10-27 | Status freshness table and fail-closed ceilings; default list governance (CHANGES §15). |
| 0.2.0-draft | 2026-10-27 | Trust lists pin node identity keys; home node must also be trusted; effective level rule (CHANGES §4, §10). |
