# OAID-2 — Node: Statement, Discovery, Endpoints

Version 0.2.5-draft · Part of the AllowedBy specification set

## 1. Overview

A node is identified by a DNS name and a long-lived `node` key (OAID-1 §6). Everything a verifier needs to know about a node is in its **node statement**, a signed JSON document at a well-known URL. The statement is fetched out of band, cached, and its `node` key is pinned through trust lists (OAID-5). Services do not fetch it at request time.

## 2. Discovery

`GET https://<node-name>/.well-known/oaid` returns `application/jwt` containing a JWS with `typ: oaid-node+jwt`.

The statement MUST be signed by the key with role `node` listed in its own `keys`. The DNS name in `iss` MUST equal the host the statement was fetched from. Redirects MUST NOT be followed across hosts.

### 2.1 DNS binding (RECOMMENDED)

A node SHOULD publish a TXT record at `_oaid.<node-name>` containing `v=oaid1; kid=<thumbprint>` naming its `node` key. Verifiers that support DNSSEC SHOULD require the TXT record to match the statement when the zone is signed. This limits the damage of a compromised web server to the lifetime of the DNS cache.

## 3. Node statement payload

```json
{
  "v": 1,
  "iss": "node.example.org",
  "iat": 1761480000,
  "exp": 1764072000,
  "jti": "01JB3K7QX5Y2M0N8P4R6S9T1V3",
  "alg": ["EdDSA"],
  "keys": [
    { "kty": "OKP", "crv": "Ed25519", "kid": "Rt0o…", "x": "…", "use": "sig", "roles": ["node"] },
    { "kty": "OKP", "crv": "Ed25519", "kid": "Nf8w…", "x": "…", "use": "sig", "roles": ["issue", "countersign"] },
    { "kty": "OKP", "crv": "Ed25519", "kid": "Ck3p…", "x": "…", "use": "sig", "roles": ["checkpoint"] },
    { "kty": "OKP", "crv": "Ed25519", "kid": "Qz1a…", "x": "…", "use": "sig", "roles": ["witness"] }
  ],
  "revoked_keys": [ { "kid": "Old7…", "after": 183990 } ],
  "endpoints": {
    "passports": "https://node.example.org/oaid/v1/passports",
    "status": "https://node.example.org/oaid/v1/status",
    "log": "https://node.example.org/oaid/v1/log",
    "witness": "https://node.example.org/oaid/v1/witness",
    "approvals": "https://node.example.org/allowedby/v1/approvals",
    "approval_page": "https://askmyhuman.org/a/"
  },
  "page_hash": "sha384-…",
  "policy": {
    "passport_max_ttl": { "tier0": 3600, "tier1": 86400, "tier2": 86400 },
    "attestation": ["none", "orchestrator", "tpm2", "apple-se", "android-strongbox", "fido", "windows-hello", "aws-kms", "gcp-kms", "azure-kv", "hsm-pkcs11", "aws-nitro", "gcp-cc", "azure-cc"],
    "levels": [0, 1, 2, 3],
    "level_providers": { "2": ["wallet:eudi-pid", "mdl:aamva", "eid:signicat", "idv:example-idv"],
                         "3": ["wallet:eudi-pid", "eid:signicat", "mdl:aamva", "epassport:node"],
                         "qes": ["csc:example-qtsp"] }
  },
  "log": {
    "origin": "node.example.org/log/v1",
    "checkpoint_interval": 10,
    "witnesses_min": 2
  },
  "vouches": [
    { "node": "other.example.net", "kid": "Hh2k…", "until": 1767225600 }
  ],
  "contact": "security@node.example.org",
  "terms": "https://node.example.org/terms"
}
```

Field rules:

- `alg`: signature algorithms used by this node's keys. `ML-DSA-44` is reserved for a future suite (OAID-1 §3.1).
- `keys`: JWK set. Exactly one key has role `node`; it signs only the statement. Every other key carries one or more role from `issue`, `countersign`, `checkpoint`, `witness` and is valid only because the `node`-signed statement lists it. At least one key per role is REQUIRED (`witness` only if the node witnesses).
- `revoked_keys`: role keys withdrawn after compromise. A document signed by `kid` is invalid if its `log.idx` exceeds `after` (OAID-1 §6); unlogged documents it signed are invalid. Entries are never removed while documents signed by that key can still be valid.
- `exp` MUST be at most 90 days after `iat`. Statements are re-fetched by verifiers before expiry. Every new statement is logged.
- `endpoints.approval_page` is a URL prefix to which an approval id is appended (AMH-1 §6).
- `page_hash` is the SRI SHA-384 hash of the approval page bundle served under `approval_page`. A node MUST publish a new statement before serving a changed bundle; monitors alert on a served bundle that does not match.
- `policy.levels` lists the levels this node can attest. A node that lists level 2 or 3 MUST list at least one provider for it in `level_providers`. Provider ids are `<type>:<name>` with the source types of OAID-7 §5.1; a provider is listed for level 3 only if its type's ceiling is 3, and the node still applies the ceiling per verification (a broker listed for 3 yields 2 for a scheme not notified at high). `level_providers.qes` lists the signing services it uses to build qualified signatures (`csc:<name>`, OAID-7 §10).
- `vouches` lists nodes this node vouches for (OAID-5 §4), each with the vouched `node` key id and an expiry. Informational; the normative vouch is the separate `oaid-vouch+jwt` document.
- `log.origin` is the log's origin line used in checkpoints (OAID-4 §4).

## 4. Endpoints

All endpoints: JSON bodies, `application/json` or `application/jwt` as stated, errors as OAID-1 §5. Rate limits are a local matter and MUST be signalled with `429` and `Retry-After`.

### 4.1 Passports

| Method and path | Purpose | Spec |
|---|---|---|
| `GET {passports}/nonce` | Fresh nonce for an issuance proof, valid 120 s | OAID-3 §4 |
| `GET {passports}/attestation-roots` | Attestation roots the node accepts | OAID-6 §5 |
| `POST {passports}` | Issue a passport from a key proof and attestation | OAID-3 §4 |
| `POST {passports}/{pid}/renew` | Renew with the same key, new `exp` | OAID-3 §6 |
| `POST {passports}/{pid}/revoke` | Revoke by the runtime or the operator | OAID-3 §7 |
| `GET {passports}/{pid}` | Fetch a passport (public) | OAID-3 |
| `GET /.well-known/http-message-signatures-directory` | Web Bot Auth key directory of currently valid passport keys | ABY-2 §3.1 |

### 4.2 Status

| `GET {status}` | Current status list (IETF Token Status List), `application/jwt`, `typ: statuslist+jwt` | OAID-3 §7, ABY-1 §9 |

Regenerated every 30 s; `Cache-Control: max-age=30`.

### 4.3 Log

The log is served as static C2SP `tlog-tiles` resources under `{log}` (`checkpoint`, `tile/…`, `tile/entries/…`), cacheable by any CDN. There are no dynamic proof endpoints; clients compute inclusion and consistency proofs from tiles (OAID-4 §5). The one dynamic log endpoint is `GET {log}/documents/{idx}`, which returns a document and its salt to those entitled to it (OAID-4 §3).

### 4.4 Witness

| `POST {witness}/add-checkpoint` | Another node submits a checkpoint and asks for a cosignature, per C2SP `tlog-witness` | OAID-4 §6 |
| `GET {witness}/conflicts` | Conflicting checkpoints this witness has seen | OAID-4 §6 |

### 4.5 Approvals and grants

| Method and path | Purpose | Spec |
|---|---|---|
| `POST {approvals}` | A service or a runtime creates an approval request | AMH-1 §3 |
| `GET {approvals}/{aid}` | State of an approval request | AMH-1 §5 |
| `GET {approvals}/{aid}/grant` | The countersigned grant, once approved | AMH-1 §5 |
| `POST {approvals}/{aid}/grant` | Home node only: the creating node delivers the countersigned grant to the human's wallet | ABY-1 §3.2 |
| `POST {approvals}/revoke` | Revoke by grant, by key or by operator, body an `aby-revoke+jwt` | ABY-1 §9 |
| `POST {approvals}/grants/{gid}/attenuate` | Derive a narrower child grant for a sub-agent, carrying its `actor_passport` | ABY-1 §4 |
| `POST {approvals}/grants/{gid}/rebind` | Issue a new revision bound to a new passport; no human involved | ABY-2 §9 |
| `GET {approval_page}{aid}` | The human-facing page | AMH-1 §6 |

**Home-node forwarding.** A human approves only on their home node's page (OAID-1 §1). When an approval names a human whose home is another node (`human_home`), the creating node forwards the request with `POST {approvals}` on the home node and returns the home node's approval link. The home node builds the core (ABY-1 §3.2) and collects `human_sig`; the creating node countersigns, then MUST deliver the countersigned grant with `POST {approvals}/{aid}/grant` on the home node. A home node accepts forwarded approvals only from nodes in its own trust list, and at most 30 pending approvals per human (default).

**Fair use.** A public node MUST cap runtime-initiated approval *creation* at 1,000 per month per operator. Verification is never capped.

### 4.6 Humans

| `POST {approvals}/humans` | Register a human passkey at this home node; authenticated by the WebAuthn attestation, rate-limited per client | OAID-7 §4 |
| `POST {approvals}/humans/me/verify` | Start a level step-up with one source: returns a redirect, a presentation request or a chip challenge, and a `verification` id | OAID-7 §5 |
| `POST {approvals}/humans/me/verify/complete` | Finish it with the source's result; the node decides the level | OAID-7 §5 |

The human's id travels in the `X-Human-Id` header, never in a URL: URLs end up in request logs, and wallet reads need nothing else. Invitation tokens travel in a link's fragment and in request bodies for the same reason.

## 5. Authentication of callers

- Runtime calls (`passports`, `renew`, `rebind`, `attenuate`, approvals created by a runtime, polling) are authenticated by an `AllowedBy-Proof` (ABY-2 §3) with the passport in `Allowed-By`. On `issue` the key is not yet in a passport; the proof's `dth` then hashes the request body's `key` member in RFC 8785 form, and the node verifies the proof against that key (OAID-3 §4).
- Rebind is authenticated by a proof signed with the **new** passport's key, and additionally requires the new passport to chain to the old one through `prev` **or** an `operator_sig` (`typ: aby-operator+jwt`, ABY-2 §9).
- Service calls (approvals created by a service) are authenticated by a proof with a key from `keys` in the service's `/.well-known/allowedby` (ABY-3 §5), fetched from that origin. The approval's `audience` MUST be exactly that origin.
- Node calls (forwarded approvals, grant delivery) are authenticated by a proof with the calling node's `countersign` key; the receiving node accepts only nodes in its own trust list.
- Operator calls (`revoke`) are authenticated by a proof with an operator key (§6).
- `POST {approvals}/humans` is authenticated by the WebAuthn attestation itself.
- Calls without `Allowed-By` (service, node, operator) omit `dth`; the proof's `bdh` binds the body. There are no unauthenticated calls.

## 6. Operator verification

A node binds an operator id to a domain by fetching `https://<operator-domain>/.well-known/oaid-operator`, a JWK set plus the node name. This JWK set is the only source of operator keys (`operator_sig`, operator calls). The operator MAY also publish `_oaid.<operator-domain>` TXT `v=oaid1; kid=<thumbprint>`; it only pins a key of that set (`verified: "dns-txt"` instead of `"https-well-known"`). Listing a node in that file does not prove that a caller speaks for the operator: each passport request carries `operator_proof` signed by a key of the set (OAID-3 §4).

Verification is repeated at least every 30 days. A passport issued to a domain operator whose binding has lapsed MUST NOT be renewed.

## 7. Operational requirements

- A node MUST produce a checkpoint at least every 10 s while the log grows, and at least hourly otherwise.
- A node MUST obtain cosignatures from at least `witnesses_min` distinct witness nodes within 10 minutes of a checkpoint, or mark itself degraded in the statement (`"degraded": true`). Trust lists MAY refuse degraded nodes.
- A node MUST keep every log leaf for at least 7 years. Documents and salts MAY be deleted for erasure or retention; the commitment remains (OAID-4 §8).
- A node MUST NOT issue a passport, grant revision or `human.reg` it cannot revoke: when its status lists have no free index it opens a new list (new `uri`) or refuses with `503`.
- A node fetches URLs named by callers (service well-knowns, operator well-knowns, callbacks) only over HTTPS to public addresses, with a total time limit and a size limit, and never while holding state that other requests wait for. It rate-limits unauthenticated calls (nonces, passports, approval requests) per client.
- A node MUST keep the `node` key offline, publish an incident contact, list a compromised role key in `revoked_keys` immediately, and notify its vouching nodes within 24 hours of a key compromise.

## Change log

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

| Version | Date | Change |
|---|---|---|
| 0.2.5-draft | 2026-11-18 | Step-up in two calls (`verify`, `verify/complete`); `level_providers` ids are `<type>:<name>` with OAID-7 §5.1 types and ceilings; `qes` lists CSC v2 services (CHANGES §24). |
| 0.2.4-draft | 2026-11-08 | Operator binding needs a per-passport `operator_proof`; a node never issues what it cannot revoke; fetches of caller-named URLs are bounded; human ids and invitation tokens never in URLs (CHANGES §23). |
| 0.2.3-draft | 2026-10-28 | Levels 0–3 and QES providers in the node policy (CHANGES §17). |
| 0.2.1-draft | 2026-10-27 | Passport travels in `Allowed-By`; one revoke endpoint; rebind authentication; service keys in `/.well-known/allowedby`; caller authentication table (CHANGES §15). |
| 0.2.0-draft | 2026-10-27 | Node statement with role keys and `revoked_keys`, approval endpoints, home-node forwarding (CHANGES §4, §10). |
