@agent-custody/receipts 0.16.6 → 0.16.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -9
- package/dist/capture.d.ts +2 -0
- package/dist/capture.js +13 -2
- package/dist/check.d.ts +1 -1
- package/dist/check.js +34 -10
- package/dist/cli.js +4 -2
- package/dist/config.d.ts +27 -2
- package/dist/config.js +66 -2
- package/dist/door-app.d.ts +28 -0
- package/dist/door-app.js +244 -0
- package/dist/door-partner.d.ts +66 -0
- package/dist/door-partner.js +94 -0
- package/dist/door.d.ts +139 -10
- package/dist/door.js +297 -137
- package/dist/gateway-http.d.ts +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/perathos.js +3 -2
- package/dist/receipt.d.ts +4 -1
- package/dist/verify.js +44 -4
- package/dist/web-bot-auth.d.ts +105 -0
- package/dist/web-bot-auth.js +508 -0
- package/docs/door-languages.md +168 -0
- package/docs/door-middleware.md +216 -0
- package/docs/door-quickstart.md +1 -1
- package/docs/door-signals.md +42 -5
- package/docs/door.md +124 -15
- package/docs/github-action.md +2 -2
- package/docs/perathos.md +13 -10
- package/docs/tutorials.md +4 -0
- package/docs/verification.md +2 -0
- package/package.json +7 -1
- package/vectors/audit.json +27 -27
- package/vectors/canonical.json +5 -5
- package/vectors/receipts.json +1701 -1210
package/docs/door.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
The gateway stands between an agent and the tools it uses. The door stands between the world and your own HTTP surface: a website, an API, a form. Every arrival, a browser, an API client, a crawler, or an agent acting for someone, is classified by what it presented, decided by a Cedar policy for the route it hit, relayed to your origin or refused, and receipted either way. The receipt is the same signed, logged, independently verifiable receipt the gateway issues, with `issuer.kind: "door"`.
|
|
6
6
|
|
|
7
|
-
New to the door? [Put the door in front of a site](door-quickstart.md) walks through one form in about fifteen minutes.
|
|
7
|
+
New to the door? [Put the door in front of a site](door-quickstart.md) walks through one form in about fifteen minutes. A Node site can run the same decision loop in its own process instead, as Express middleware or around a Next.js route handler: [the door in your Node app](door-middleware.md). Already run nginx or Envoy? The door can answer their authz checks instead of relaying, and the site keeps its proxy: [behind nginx or Envoy](#behind-nginx-or-envoy-authz-mode). A site in Go, Rails, Django, or Spring can ask the same check from a middleware: [the door in Go, Rails, Django, and Spring](door-languages.md).
|
|
8
8
|
|
|
9
|
-
This is the first piece of the agent front door. It answers "what may this arrival do here" and "what did it do, provably". It does not yet answer "is this an agent" for web traffic: that is detection, and the door records only what it can check. Read [what the door knows](#what-the-door-knows-about-an-arrival) before writing a policy.
|
|
9
|
+
This is the first piece of the agent front door. It answers "what may this arrival do here" and "what did it do, provably". It does not yet answer "is this an agent" for web traffic: that is detection, and the door records only what it can check. An agent that wants to be known can say so in a way the door checks: a grant, or a [Web Bot Auth signature](#web-bot-auth-signatures). Read [what the door knows](#what-the-door-knows-about-an-arrival) before writing a policy.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
agent-custody keygen --dir keys --name door
|
|
@@ -37,7 +37,7 @@ agent-custody door --config door.json --port 8780
|
|
|
37
37
|
|
|
38
38
|
Every field of the config, with its type and default, is in [the door reference](../../../site/reference/door.md#config).
|
|
39
39
|
|
|
40
|
-
`agent-custody check --config door.json` reads a door config the way the door would: unknown keys, the key, the principal keys, the policy (including a permit that names an agent without requiring a verified arrival, see below), the routes, what is precommitted, the challenge provider or its absence, the origin's scheme, every credential variable the door reads at startup (origin headers, the log, Splunk, OTel, the capture key, the challenge secret), and the paths. It exits 1 on an error.
|
|
40
|
+
`agent-custody check --config door.json` reads a door config the way the door would: unknown keys, the key, the principal keys, the policy (including a permit that names an agent without requiring a verified arrival, see below), the routes, what is precommitted, the challenge provider or its absence, the partner engine and its key, the origin's scheme, every credential variable the door reads at startup (origin headers, the log, Splunk, OTel, the capture key, the challenge secret), and the paths. It exits 1 on an error.
|
|
41
41
|
|
|
42
42
|
## What the door knows about an arrival
|
|
43
43
|
|
|
@@ -45,13 +45,15 @@ The door records one fact for every arrival, `arrival`, observed by the door its
|
|
|
45
45
|
|
|
46
46
|
| field | values | meaning |
|
|
47
47
|
| --- | --- | --- |
|
|
48
|
-
| `class` | `verified`, `claimed`, `unknown` | `verified`: a grant signed by a trusted principal, inside its window, naming this route among its scopes. `claimed`: something was asserted that the door could not accept: a grant from a stranger, an expired one, one for other routes, a declared agent name, or
|
|
49
|
-
| `subject` | string | the agent named in a verified grant; else the declared name or the agent a rejected grant named; else `unknown`. Only a verified subject reaches the Cedar `principal` |
|
|
50
|
-
| `grant` | `verified`, `out-of-scope`, `invalid`, `absent` | what became of the grant header, with `grantError` when it was not accepted |
|
|
51
|
-
| `signature` |
|
|
48
|
+
| `class` | `verified`, `claimed`, `unknown` | `verified`: a grant signed by a trusted principal, inside its window, naming this route among its scopes; or, with no grant, a [Web Bot Auth signature](#web-bot-auth-signatures) that checked against the key its agent's directory publishes. `claimed`: something was asserted that the door could not accept: a grant from a stranger, an expired one, one for other routes, one presented under another agent's signature, a declared agent name, or a signature that did not check or was not checked. `unknown`: nothing was presented |
|
|
49
|
+
| `subject` | string | the agent named in a verified grant; else the signature agent of a verified signature (its https origin); else the declared name or the agent a rejected grant named; else `unknown`. Only a verified subject reaches the Cedar `principal` |
|
|
50
|
+
| `grant` | `verified`, `out-of-scope`, `invalid`, `wrong-sender`, `absent` | what became of the grant header, with `grantError` when it was not accepted. `wrong-sender`: the grant verified, and the request is signed by a signature agent the grant does not name |
|
|
51
|
+
| `signature` | `verified`, `invalid`, `unavailable`, `unchecked`, `absent` | what became of an RFC 9421 signature tagged `web-bot-auth`, with `signatureError` when it was not verified. `unchecked`: a `Signature-Input` arrived and the config has no `webBotAuth`, so it is a claim. See [Web Bot Auth signatures](#web-bot-auth-signatures) |
|
|
52
|
+
| `signatureAgent`, `signatureKeyid` | strings | the `Signature-Agent` origin and the keyid the signature named. Checked only when `signature` is `verified` |
|
|
52
53
|
| `declared` | string | the `x-agent-custody-agent` header, when sent. A claim |
|
|
53
54
|
| `remote` | string | the arrival's address |
|
|
54
55
|
| `challenge` | `{ provider, outcome, error? }` | only when `challenge` is configured. `passed`: the provider confirmed the token the arrival sent. `failed`: the provider refused the token (`invalid-input-response`, `timeout-or-duplicate`, `expired-input-response`, `already-seen-response`, `missing-input-response`, with the codes in `error`), it confirmed a token issued on another hostname or for another action, or the token was longer than 4096 characters, which is refused without calling the provider. `unavailable`: the provider did not answer in time, answered a non-200, a redirect, or something that is not JSON, answered a code that is its own or the operator's fault (`internal-error`, `bad-request`, `missing-input-secret`, `invalid-input-secret`, `sitekey-secret-mismatch`, `invalid-sitekey`, `missing-sitekey`, `invalid-remoteip`: a rotated secret gives every person one of these), or `maxInFlight` checks were already waiting. `absent`: no token. A passed challenge leaves `class` as it was: it says a provider's test was passed in front of this arrival, not who the arrival is |
|
|
56
|
+
| `partner` | `{ engine, outcome, error? }` | only when `partner` is configured and the route is in `partner.routes`. `verified`: the engine's verdict was signed for this arrival under `partner.keyFile`, and is the `partner` fact. `rejected`: the engine answered with anything else. `unavailable`: it did not answer in time or at all. See [a partner engine's verdict](#a-partner-engines-verdict) |
|
|
55
57
|
| `rate` | `{ by, burst, minute }` | arrivals from the same source in the last 10 and 60 seconds, this one included, whatever was decided about them, counted by this door process alone. `by` is `agent` for a verified arrival (counted by the agent's name across addresses) or `remote` (by address). A pace, not a verdict |
|
|
56
58
|
| `method`, `path`, `route` | strings | what arrived, and the route it fell under |
|
|
57
59
|
|
|
@@ -59,9 +61,9 @@ The door records one fact for every arrival, `arrival`, observed by the door its
|
|
|
59
61
|
|
|
60
62
|
There is no `human` class. The door cannot tell a person from a program that presents nothing, and it does not pretend to. With `challenge` configured, a policy can require a passed challenge on a route instead; without it, a policy that lets `unknown` through on a route is letting everything through on that route, and should say so.
|
|
61
63
|
|
|
62
|
-
**Presenting a passport.** An agent presents its grant exactly as it does to the HTTP gateway: the DSSE envelope as base64url in `Authorization: Bearer <value>` or in `X-Agent-Custody-Grant`. The scopes of the grant are route names. A grant that travelled in `Authorization` is stripped before the request is relayed, so the origin never sees it; one in the custom header is stripped too. The door's own headers are added to the relayed request: `X-Agent-Custody-Receipt` (the receipt id), `X-Agent-Custody-Class`, and `X-Forwarded-For`, `-Host`, `-Proto`, with `X-Real-IP` when `trustProxy` is off.
|
|
64
|
+
**Presenting a passport.** There are two passports, and an agent may present both. A Web Bot Auth signature proves which agent sent the request ([below](#web-bot-auth-signatures)). A grant says what a principal you trust lets that agent do. An agent presents its grant exactly as it does to the HTTP gateway: the DSSE envelope as base64url in `Authorization: Bearer <value>` or in `X-Agent-Custody-Grant`. The scopes of the grant are route names. A grant that travelled in `Authorization` is stripped before the request is relayed, so the origin never sees it; one in the custom header is stripped too. The door's own headers are added to the relayed request: `X-Agent-Custody-Receipt` (the receipt id), `X-Agent-Custody-Class`, and `X-Forwarded-For`, `-Host`, `-Proto`, with `X-Real-IP` when `trustProxy` is off.
|
|
63
65
|
|
|
64
|
-
**A
|
|
66
|
+
**A grant alone is bearer-grade; a grant under its agent's signature is bound to its sender.** The door checks the grant's signature, window, and scope. On its own, that does not show that the sender holds the agent's key. Anyone who holds the grant's bytes is that agent until the grant expires, and every verified receipt carries the grant in `delegation`, so a person who can read one receipt can replay its grant. When the request also carries a Web Bot Auth signature that the door verified, and the grant names that signature agent (`"agent": "https://crawler.example"`), the grant is bound to its sender: a thief has the grant's bytes but not the agent's signing key, and a captured signature serves one request (its nonce) for at most `maxAgeSeconds`. A grant presented under another agent's signature is `wrong-sender`, and the arrival is `claimed`. A grant with no signature, or with one that did not verify, is still verified, bearer-grade, as before, so a route that needs the binding says so in its policy: `context.facts.arrival.grant == "verified" && context.facts.arrival.signature == "verified"` holds only for a bound grant, since a mismatch makes `grant` `wrong-sender`. For bearer grants, issue door grants with short lifetimes (minutes, not days), scope them to the routes they need, bound what a route allows per call in the policy, and treat receipt files and logs as holding live credentials until those grants expire.
|
|
65
67
|
|
|
66
68
|
**Challenging a human.** The door builds no CAPTCHA. With `challenge` configured, a page in front of a protected route renders the provider's widget (Cloudflare Turnstile or hCaptcha) with `siteKey`, and sends the token the widget produced in the `challenge.header` header of its request. The door posts the token and the secret from `secretEnv` to the provider's `siteverify` endpoint, with a timeout, and records the answer as `challenge.outcome`. It adds the arrival's address as `remoteip` only with `trustProxy`, where that address is the client's; without it the socket's address may be a proxy's, and the provider would refuse a token the client solved. It never follows a redirect, which would resend the secret and the token elsewhere. To hCaptcha it also sends `siteKey` as `sitekey`: an hCaptcha secret belongs to the account, and without it a token solved on the account's easiest widget would pass on the hardest. A Turnstile secret belongs to one widget already. `success` alone does not pass: the token must have been issued on one of `hostnames`, and for `action` when one is set, or a token solved on another site that uses this site key, or for another widget, would count. At most `maxInFlight` checks wait on the provider at once; an arrival past that is `unavailable`. The token is stripped before the request is relayed, and neither the token nor the secret is recorded. A policy admits a person on a form route with
|
|
67
69
|
|
|
@@ -241,11 +243,88 @@ The pass run's receipt records `challenge.outcome: "passed"`, and the door relay
|
|
|
241
243
|
|
|
242
244
|
**What this run shows, and what it does not.** Test keys prove the wire path, not bot detection. The door reaches the real `siteverify`, sends the secret and the token, and records the answer. A test secret gives a fixed answer and no widget runs, so the run says nothing about how well Turnstile tells a person from a bot. The run did not exercise the `unavailable` outcome, a hostname mismatch, an action mismatch, the `timeout-or-duplicate` code, or `remoteip` (the config sets no `trustProxy`, so the door sent none). `test/door.test.ts` covers those against a stubbed `siteverify`. In the output above, the two `sha256` digests are shortened to eight characters and `…`. Nothing else is changed. The CLI was `agent-custody` 0.16.2, run from this repository at commit `64285ef`. That version had no note for door receipts, so its `ISSUER` lines end with `unknown issuer kind`; later versions say what a door receipt proves there: the arriving party could not forge it and is attested only when it presented a grant, and a request that reached the origin some other way leaves no receipt.
|
|
243
245
|
|
|
246
|
+
## Web Bot Auth signatures
|
|
247
|
+
|
|
248
|
+
Web Bot Auth is the IETF draft for bots and agents that identify themselves by signing their requests ([draft-meunier-web-bot-auth-architecture-05](https://datatracker.ietf.org/doc/html/draft-meunier-web-bot-auth-architecture-05), with the key directory of [draft-meunier-http-message-signatures-directory-05](https://datatracker.ietf.org/doc/html/draft-meunier-http-message-signatures-directory-05)). The agent signs each request with an RFC 9421 HTTP message signature and names, in the `Signature-Agent` header, the https origin that publishes its keys at `/.well-known/http-message-signatures-directory`. With `webBotAuth` configured, the door fetches that directory and checks the signature. A request that checks, with no grant, is `verified` as the signature agent: the subject and the Cedar principal are the origin, `Agent::"https://crawler.example"`.
|
|
249
|
+
|
|
250
|
+
```json
|
|
251
|
+
"webBotAuth": { "agents": ["https://crawler.example"], "authorities": ["shop.example"] }
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
`agents` lists the signature agents whose directories the door will fetch. `authorities` lists the hosts this door serves. The other fields and their defaults are in [the reference](../../../site/reference/door.md#config).
|
|
255
|
+
|
|
256
|
+
**What the door checks**, in order. The first that fails is the `signatureError`:
|
|
257
|
+
|
|
258
|
+
1. A `Signature-Input` member tagged `web-bot-auth` (the first one, when there are several), and a byte sequence under the same label in `Signature`. A signature with another tag is for some other purpose, and the arrival is `invalid` for this one.
|
|
259
|
+
2. `keyid`, `created`, and `expires` are present; `alg`, when present, is `ed25519`. The keyid is the RFC 7638 thumbprint of the agent's Ed25519 key, as the draft requires. The door checks Ed25519 only, the draft's algorithm; RSA-PSS and ECDSA signatures are `invalid` with that reason.
|
|
260
|
+
3. The signature covers `@authority` and the `Signature-Agent` member that names the directory (`"signature-agent";key="<member>"`, or the whole field in the draft's legacy string form). Without that coverage, anyone could move a signature under another agent's name.
|
|
261
|
+
4. The `Signature-Agent` URI is https, an origin or its directory URL, and one of `agents`. Anything else is refused without a fetch, so an arrival never chooses what the door fetches and cannot point it at an internal address. An `http:` directory and an inline `data:` directory are refused: an inline directory carries its own key and proves nothing.
|
|
262
|
+
5. The window: `created` at most `clockSkewSeconds` (60) in the future, `expires` after `created`, and now no later than `expires`, nor than `created` plus `maxAgeSeconds` (300), each with the skew. The draft allows a 24-hour signature; the door accepts one for five minutes after it was made, whatever `expires` says.
|
|
263
|
+
6. `@authority` is the request's `Host`, lowercase, without `:443` or `:80`, and it must be one of `authorities`. The client writes the `Host`, so without this list a signature made for another site could be sent here with that site's `Host` and verify. Behind a proxy, the proxy must pass the `Host` through.
|
|
264
|
+
7. The nonce. By default (`requireNonce`) a signature must carry one, and a nonce already used with this agent and key is a replay. The door remembers a nonce until the signature it came with could no longer be accepted, so a signature serves one request. A minimal Web Bot Auth signature covers only the authority and the `Signature-Agent`, so without this rule a captured signature would serve any method and path on this site until it aged out. `agent-custody check` warns when `requireNonce` is off.
|
|
265
|
+
8. The directory: `GET <origin>/.well-known/http-message-signatures-directory` over https, with `AbortSignal.timeout(timeoutMs)`, never following a redirect (a redirect is a directory on another origin, and `invalid`), served as `application/http-message-signatures-directory+json`, at most `maxDirectoryBytes`, a JWKS. It is kept `cacheSeconds` (300); a failed fetch is asked again after 30 seconds. One fetch at a time per agent.
|
|
266
|
+
9. The key whose thumbprint is the keyid, inside its `nbf` and `exp` when the directory gives them, and the Ed25519 signature over the RFC 9421 signature base. The base is built from `@method`, `@authority`, `@path`, `@query`, and header fields (whole, or one dictionary member with `;key`). A signature that covers another derived component (`@target-uri`, `@scheme`, `@request-target`, `@query-param`) or a component parameter other than `key` is `invalid`, and the reason names it.
|
|
267
|
+
|
|
268
|
+
| `signature` | when |
|
|
269
|
+
| --- | --- |
|
|
270
|
+
| `verified` | every check above passed |
|
|
271
|
+
| `invalid` | one of them failed: the reason is in `signatureError`. A signature agent not in `agents`, a redirect, the wrong media type, or a directory too large is the agent's fault or an attack, and `invalid` |
|
|
272
|
+
| `unavailable` | the directory did not answer in time, answered a non-200, or the door holds `maxNonces` nonces and cannot record another. The network's or the door's state, not the arrival's |
|
|
273
|
+
| `unchecked` | a `Signature-Input` arrived and the config has no `webBotAuth` |
|
|
274
|
+
| `absent` | no `Signature-Input` and no `Signature` |
|
|
275
|
+
|
|
276
|
+
**What a verified signature does not show.** It shows that a key published at the signature agent's origin signed this request, for this door's authority, in the last few minutes, once. It does not cover the body: the door does not check `Content-Digest`, and a signature over `@authority` alone does not cover the method, the path, or the query either; the receipt records them as they arrived, as `claimed` arguments. It does not show that the origin is a crawler you know or that it behaves well: `agents` is the list of origins you chose to check, and a policy decides what each may do. The door does not check the directory's own response signatures (directory draft, section 5.2, a SHOULD): it fetches the directory over https from the origin the signature names, and the signature covers that name, so a directory that lists another agent's key cannot claim that agent's requests. Nonces are remembered by one door process, so two doors, or one restart, accept a nonce once each; `maxAgeSeconds` bounds that. A key the agent adds to its directory is seen once the cached copy expires.
|
|
277
|
+
|
|
278
|
+
**In the receipt.** A signature-verified arrival without a grant has `agent: { id: "https://crawler.example", provenance: "observed" }` and `principal: { id: null, provenance: "claimed" }`. The agent is the door's own observation, as the egress witness's agent is: the check was against a directory the door fetched, which a reader of the receipt cannot repeat, so it is not `attested`. The arrival fact records `signature`, `signatureAgent`, and `signatureKeyid`. A bound grant's receipt is the verified grant's receipt as before, `attested`, with `signature: "verified"` in the arrival fact. No verifier check changed.
|
|
279
|
+
|
|
280
|
+
**The published vectors.** The tests check the door against the published Ed25519 vectors that use the RFC 9421 test key (appendix B.1.4): RFC 9421's B.2.6 request, whose signature base and signature the door reproduces, and the Web Bot Auth draft's A.2.1 (a signature over `@authority` alone) and A.2.3 (`Signature-Agent` in the legacy string form), whose published signatures verify. The draft's A.2.2, `Signature-Agent` as a dictionary member, prints a signature that does not verify against its own printed signature base, so the tests sign that layout themselves with the RFC's published private key. No test fetches a real directory or uses a real crawler's key: the directories are built in the test and served by a stubbed fetch.
|
|
281
|
+
|
|
282
|
+
A policy that admits one crawler on the API by its signature, and refunds only for a grant bound to its sender:
|
|
283
|
+
|
|
284
|
+
```cedar
|
|
285
|
+
permit(principal == Agent::"https://crawler.example", action == Action::"api", resource)
|
|
286
|
+
when { context.facts.arrival.class == "verified" };
|
|
287
|
+
|
|
288
|
+
permit(principal, action == Action::"refund", resource)
|
|
289
|
+
when {
|
|
290
|
+
context.facts.arrival.grant == "verified" &&
|
|
291
|
+
context.facts.arrival.signature == "verified" &&
|
|
292
|
+
context.args.body.amount > 0 &&
|
|
293
|
+
context.args.body.amount <= 5000
|
|
294
|
+
};
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Tutorial: [47-web-bot-auth.ts](../examples/47-web-bot-auth.ts).
|
|
298
|
+
|
|
299
|
+
## A partner engine's verdict
|
|
300
|
+
|
|
301
|
+
A site that already pays for bot detection (Cloudflare Bot Management, HUMAN, DataDome) can give the door that engine's verdict, signed. The door builds no detector of its own here: it asks the engine, checks the engine's signature, and lets the policy decide on the verdict. The engine sits behind an adapter that holds an Ed25519 key; `scripts/fake-partner.ts` is a stand-in.
|
|
302
|
+
|
|
303
|
+
```json
|
|
304
|
+
"partner": {
|
|
305
|
+
"engine": "datadome",
|
|
306
|
+
"url": "https://bot-adapter.internal/verdict",
|
|
307
|
+
"keyFile": "keys/engine.pub",
|
|
308
|
+
"routes": ["refund", "api"],
|
|
309
|
+
"timeoutMs": 1500,
|
|
310
|
+
"onFailure": "deny"
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
- **The question.** For an arrival on one of `routes` (`["*"]` for all), the door POSTs `url` a JSON body: `{ receiptId, route, method, path, remote, class, headers }`, with `receiptId` the id of the receipt it is writing and `headers` the four the receipt records (`user-agent`, `content-type`, `accept`, `host`). Never the query, the body, the grant, the challenge token, or a cookie. The question carries `AbortSignal.timeout(timeoutMs)`, follows no redirect, and the door reads at most `maxResponseBytes` (16 KiB) of the answer. At most `maxInFlight` (64) questions wait at once.
|
|
315
|
+
- **The answer.** `{ verdict: { engine, verdict, score? }, signature }`, where `signature` is a DSSE envelope in the upstream attestation format (`src/upstream.ts`): payload type `application/vnd.agent-custody.upstream+json`, payload `{ receiptId, tool, contentDigest }` with `tool` the route and `contentDigest` the digest of `verdict`. `signVerdict(verdict, key, receiptId, route)` in `src/door-partner.ts` makes one. `engine` must equal the config's, `verdict` is a short word, `score` an integer, and no other field is accepted.
|
|
316
|
+
- **What the door accepts.** A signature that verifies under `keyFile`, names this receipt and route, and is exactly that plain attestation (one signature, canonical payload, nothing added). Anything else is `rejected`, with the reason in `arrival.partner.error`. Since the receipt id is fresh for every arrival, a verdict signed for one arrival cannot be replayed onto another.
|
|
317
|
+
- **What the policy reads.** An accepted verdict is `context.facts.partner`, `{ engine, verdict, score? }`. Without one there is no `partner` fact, and `arrival.partner` says why. A rule reads it as `context.facts has partner && context.facts.partner.verdict == "human"`, so a missing verdict denies.
|
|
318
|
+
- **When there is no verified verdict** (the engine down, slow, busy, or a bad signature, a verdict for another arrival): `onFailure: "deny"`, the default, refuses the arrival with 503 and a `withheld` receipt, whatever the policy said, and relays nothing. `onFailure: "absent"` lets the policy decide without the fact, so a rule that requires it denies and a rule that does not mention it allows as it would anyway. Neither turns an outage into an allow on a route whose rule needs the verdict. A policy deny still answers 403 first. In observe mode the refusal is printed, not enforced, as a deny is.
|
|
319
|
+
- **What the receipt carries.** `facts.partner` is `{ tool: "door.partner", args: {}, value: <verdict>, resultDigest, provenance: "attested", attestation: <the engine's envelope> }`, and `facts.arrival.partner` records the outcome. Under the door's default capture rule, and any rule that leaves the facts in clear, the envelope stays in clear beside the verdict; under a private facts rule it is withheld with the verdict. The verifier runs `fact partner signature (upstream key)`: given the engine's public key with `--upstream-key` (or `upstreamKeys`), it checks the signature, the receipt id, the route, and the digest of the verdict as recorded. Without the key the check fails, because the receipt says the verdict is attested and the reader cannot confirm it. A verdict pasted from another receipt, or edited, fails it. The TypeScript, browser, and Python verifiers run the same check (vectors `door-partner-attested`, `door-partner-without-key`, `door-partner-wrong-key`, `resigned-door-partner-moved`).
|
|
320
|
+
|
|
321
|
+
What the verdict means, and what it does not, is in [door signals](door-signals.md#the-partner-verdict). Tutorial: [52-door-partner-verdict.ts](../examples/52-door-partner-verdict.ts).
|
|
322
|
+
|
|
244
323
|
## How an arrival becomes a Cedar request
|
|
245
324
|
|
|
246
325
|
| Cedar slot | value |
|
|
247
326
|
| --- | --- |
|
|
248
|
-
| `principal` | `Agent::"<agent>"` for the agent a verified grant names; `Agent::"unknown"` for every other arrival. A declared name and the agent a rejected grant names stay in the arrival fact: a permit on `principal == Agent::"shopping-agent"` cannot be satisfied by sending a header |
|
|
327
|
+
| `principal` | `Agent::"<agent>"` for the agent a verified grant names, or the signature agent of a verified signature (`Agent::"https://crawler.example"`); `Agent::"unknown"` for every other arrival. A declared name and the agent a rejected grant names stay in the arrival fact: a permit on `principal == Agent::"shopping-agent"` cannot be satisfied by sending a header |
|
|
249
328
|
| `action` | `Action::"<route>"` |
|
|
250
329
|
| `resource` | `Tool::"<route>"` |
|
|
251
330
|
| `context.args` | `{ method, path, query, headers, body?, bodyBytes, bodyDigest }`. `query` holds every parameter by name, as own properties, so `?constructor=x` is a parameter. `headers` carries `user-agent`, `content-type`, `accept`, and `host` only. `body` is present for a JSON body of at most 64 KiB; every body the door read is recorded by `bodyDigest` (sha256 of the raw bytes) and `bodyBytes`. A body above `maxBodyBytes` is dropped as it passes the limit and recorded as `bodyBytes` read so far and `bodyOversized: true`, with no digest and no `body`. The policy reads a copy that Cedar accepts: Cedar has no `null` and no non-integer number, and refuses the whole request on either, so in the copy a `null` member is dropped and a number that is not a safe integer becomes its string (`9.99` becomes `"9.99"`). A rule that compares such a value as a number then errors, and that rule's deny is the answer. The receipt keeps the body as it arrived. **Provenance: claimed** |
|
|
@@ -289,6 +368,7 @@ A request that can change something at the origin, any method but GET, HEAD, and
|
|
|
289
368
|
| the request left, and its answer did not arrive: a timeout, a reset, or a body that stopped after the headers | 504 | `{ error, detail, receipt }`, "the origin may have acted on the request ... Do not retry" | `error`, and `execution.error` says the origin may have acted. Find out from the origin before retrying a refund |
|
|
290
369
|
| policy allows, body above `maxBodyBytes` | 413 | `{ error, reason, receipt }` | `withheld`; nothing was relayed |
|
|
291
370
|
| policy allows, the log refused the authorization | 503 | `{ error, reason, receipt }` | `withheld`; nothing was relayed |
|
|
371
|
+
| policy allows, the partner engine gave no verified verdict and `partner.onFailure` is `deny` | 503 | `{ error, reason, receipt }` | `withheld`; nothing was relayed |
|
|
292
372
|
| policy allows, the path does not decode cleanly | 400 | `{ error, reason, receipt }` | `withheld`; nothing was relayed |
|
|
293
373
|
| policy allows, the origin's response above `maxResponseBytes` | 502 | `{ error, receipt }`, and "do not retry" | `executed` or `failed`: the origin acted; `result` carries the status and `bodyOversized: true`, no digest |
|
|
294
374
|
| the receipt could not be written | 500 | `{ error, outcome, receipt }` | none on disk; `outcome` says whether the origin acted, so that a refund is not retried on the strength of a 500 |
|
|
@@ -308,18 +388,47 @@ To record more in clear, give the route a rule of its own, as for the gateway ([
|
|
|
308
388
|
|
|
309
389
|
## The receipt
|
|
310
390
|
|
|
311
|
-
A door receipt is a v0.2 receipt with `issuer.kind: "door"` and `issuer.framework: "http"
|
|
391
|
+
A door receipt is a v0.2 receipt with `issuer.kind: "door"` and `issuer.framework: "http"` (`"authz"` when it answered a proxy's check, [below](#behind-nginx-or-envoy-authz-mode)). The route is the tool, observed. `request.args` is the arrival as the table above describes it, claimed. `facts.arrival` is the door's observation; `facts.partner`, when present, is a partner engine's signed verdict, attested ([above](#a-partner-engines-verdict)). When the arrival was verified by a grant, `principal` and `agent` are attested and `delegation` carries the grant. When it was verified by a signature alone, `principal` is `{ id: null, provenance: "claimed" }` and `agent` is the signature agent, observed. Otherwise `principal` is `{ id: null, provenance: "claimed" }` and `agent` is the subject, claimed. `execution.result` for a relayed call is `{ status, contentType?, bodyBytes, bodyDigest }`: the origin's body is never copied into the receipt, only committed to.
|
|
312
392
|
|
|
313
393
|
The verifier runs `door receipt carries a policy decision` in place of the gateway's two checks, and otherwise the same checks: a verified arrival's receipt passes `delegation binds principal and agent` and `executed tool within delegated scope`; an unknown arrival's passes `principal is claimed, not attested`; a receipt that carries an `authorization` passes the authorization checks, including `authorization logged before execution`. Both verifiers, the Python verifier, and `policy simulate` accept door receipts; the conformance vectors `door-unknown-executed`, `door-unknown-denied`, and `door-verified-executed` pin them.
|
|
314
394
|
|
|
395
|
+
## Behind nginx or Envoy: authz mode
|
|
396
|
+
|
|
397
|
+
A site that already runs nginx or Envoy need not send its traffic through the door. With `"authz": true` in the config the door relays nothing and has no origin: it answers the proxy's external-auth check for each request, and the proxy relays or refuses. `deploy/door/` has a stock [nginx.conf](../../../deploy/door/nginx.conf) (`auth_request`) and a stock [envoy.yaml](../../../deploy/door/envoy.yaml) (`ext_authz`, HTTP mode), with the door config and policy they run against, and `deploy/door/demo.sh` runs each in front of a stand-in site: an allowed read, a refused refund, a verified agent's refund, and every receipt verified.
|
|
398
|
+
|
|
399
|
+
```json
|
|
400
|
+
{ "identity": { "keyFile": "keys/door.key" }, "authz": true, "trustProxy": true, "routes": [...], "policyFile": "policy.cedar", "receiptsDir": "receipts", "logFile": "log.jsonl" }
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
- **What the door reads.** The proxy sets `X-Original-Method` (the original request's method) and `X-Original-URI` (its path and query), and `X-Forwarded-For` (the client's address; `trustProxy` is required, and the door takes the last address), and passes the client's headers the door reads: the grant, `X-Agent-Custody-Agent`, `Signature`, `Signature-Input`, `Signature-Agent`, the challenge header, `User-Agent`, `Accept`, `Content-Type`, and the client's `Host`. The check request's own method and path are the proxy's and are ignored; the door decides, and checks a [Web Bot Auth](#web-bot-auth-signatures) signature, on the original method, target, and `Host`; a check without the two `X-Original-*` headers is answered 400 with no receipt.
|
|
404
|
+
- **What it answers.** 200 with `X-Agent-Custody-Receipt` and `X-Agent-Custody-Class`, which the proxy passes to the origin in place of anything the client sent under those names; 403 on a refusal; 503 when the log refused the authorization of a request that can change something; 400 for a path that does not decode cleanly. nginx relays only on a 2xx, refuses on 401 and 403, and answers 500 for anything else; Envoy relays only on 200 and returns anything else to the client. Both stock configs fail closed when the door is down.
|
|
405
|
+
- **Commit before relay still holds.** Any method but GET, HEAD, and OPTIONS, and any route in `precommit`, is committed to the log before the door answers 200, so the evidence exists before the proxy can relay the request.
|
|
406
|
+
|
|
407
|
+
**What its receipts record: the decision, not the result.** In authz mode the door never sees the request body or the origin's answer. The proxy holds the body and relays it after the 200, and the answer goes from the origin to the client through the proxy. So:
|
|
408
|
+
|
|
409
|
+
- `issuer.framework` is `authz`.
|
|
410
|
+
- `request.args` has `method`, `path`, `query`, and `headers`, and no `body`, `bodyBytes`, or `bodyDigest`. A rule on `context.args.body` errors and denies; a rule on an amount belongs at the origin, or in a door that relays.
|
|
411
|
+
- An allow is `execution.status: "withheld"` with the reason "allowed; the door answered the proxy's authz check and relays nothing ...": the door relayed nothing. A deny is `denied`. No authz receipt is ever `executed`, `failed`, or `error`, and none carries a result: whether the proxy relayed the request, and what the origin answered, is in no receipt.
|
|
412
|
+
- The verifier runs `door authz decided, relayed nothing` on such a receipt, in TypeScript, in the browser, and in Python, and the report says the receipt records a decision. A receipt re-signed to claim a result fails it (vector `resigned-door-authz-executed`); vectors `door-authz-allowed`, `door-authz-denied`, and `door-authz-verified-precommitted` pin the honest ones.
|
|
413
|
+
|
|
414
|
+
**What to get right in the proxy.**
|
|
415
|
+
|
|
416
|
+
- The door believes the proxy's headers. Let only the proxy reach it: anyone who can reach the door can have it write receipts for requests that never happened, and an allow receipt does not prove that the proxy relayed anything. The stock configs keep the door off the published ports.
|
|
417
|
+
- The proxy sets `X-Original-Method`, `X-Original-URI`, and `X-Forwarded-For` itself, replacing any copy the client sent (nginx `proxy_set_header`, Envoy `headers_to_add` with `use_remote_address: true`). A config that passes the client's copies lets the client choose what the door decides on.
|
|
418
|
+
- The door decides on the path as it normalises it (percent-decoded once, empty segments merged) and refuses a segment that decodes to a slash or a dot segment; the proxy relays the path as the client sent it. Relay it unchanged (nginx `proxy_pass` with no URI part, no Envoy rewrite) and let the origin normalise as the door does, or a path the origin reads differently is a way around a route.
|
|
419
|
+
- The stock configs strip `X-Agent-Custody-Grant` and `X-Agent-Custody-Agent` before the origin. `Authorization` reaches the origin unchanged, since the origin may use it: behind a proxy an agent should send its grant in `X-Agent-Custody-Grant`.
|
|
420
|
+
- Envoy sends the door only the client headers in `allowed_headers`. A new header the policy reads, such as a challenge header under another name, goes into that list.
|
|
421
|
+
|
|
315
422
|
## What it does not do yet
|
|
316
423
|
|
|
317
|
-
- Detect agents in web or API traffic.
|
|
318
|
-
-
|
|
424
|
+
- Detect agents in web or API traffic itself. An agent that signs per Web Bot Auth is identified by its signature, and a partner engine's signed verdict can be had; beyond those the only signals are the ones in the arrival fact: `declared` is a claim and `rate` is a pace ([door signals](door-signals.md)).
|
|
425
|
+
- Authenticate to a partner engine. The question carries no credential: put the adapter that holds the engine's API key and the signing key where only the door reaches it.
|
|
426
|
+
- Check AP2 mandates.
|
|
427
|
+
- Check every Web Bot Auth signature: Ed25519 only (no RSA-PSS or ECDSA), the components listed above only, no `Content-Digest`, no response signatures on the directory, and nonces in one process's memory. A signature agent must be listed in `agents`; the door does not fetch the directory of an origin it was not told about.
|
|
319
428
|
- Challenge an arrival with a passkey. Turnstile and hCaptcha are the providers; see [challenging a human](#challenging-a-human).
|
|
320
429
|
- Revoke a grant by a revocation list; a grant stands until it expires.
|
|
321
|
-
- Bind a grant to its sender. A
|
|
430
|
+
- Bind a grant to its sender without a signature. A grant presented alone is bearer-grade; under its agent's Web Bot Auth signature it is bound: see [presenting a passport](#what-the-door-knows-about-an-arrival).
|
|
322
431
|
- Stream a request body: the body is read whole, up to `maxBodyBytes`, so that the policy can read it and the receipt can commit to it.
|
|
323
432
|
- Relay a response larger than `maxResponseBytes`, or stream one: the body is relayed whole so that its digest can be recorded. A larger one is not held: reading stops at the limit, the client gets 502, and the receipt records that the origin answered.
|
|
324
433
|
|
|
325
|
-
|
|
434
|
+
Tutorials: [40-door.ts](../examples/40-door.ts), the proxy; [48-door-app.ts](../examples/48-door-app.ts), in-process; [49-door-authz.ts](../examples/49-door-authz.ts), behind nginx or Envoy; [examples/languages/door](../examples/languages/door), middleware for Go, Rails, Django, and Spring; [52-door-partner-verdict.ts](../examples/52-door-partner-verdict.ts), a partner engine's signed verdict.
|
package/docs/github-action.md
CHANGED
|
@@ -20,7 +20,7 @@ jobs:
|
|
|
20
20
|
runs-on: ubuntu-latest
|
|
21
21
|
steps:
|
|
22
22
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
23
|
-
- uses: svayatta/agent-custody@<commit sha of the release> # 0.16.
|
|
23
|
+
- uses: svayatta/agent-custody@<commit sha of the release> # 0.16.7
|
|
24
24
|
with:
|
|
25
25
|
path: .custody/receipts
|
|
26
26
|
issuer-key: .custody/keys/agent.pub
|
|
@@ -37,7 +37,7 @@ Pin the action to the commit of a release, as you pin every other action. A movi
|
|
|
37
37
|
| `principal-key` | the public key files of the principals whose grants a gateway receipt carries, one path on each line; SDK and Claude Code hook receipts need none | |
|
|
38
38
|
| `log-url` | the URL of the log; the action fetches the log key from it (`verify --log-url`) | |
|
|
39
39
|
| `log-id` | the id that every tree head must name (`verify --log-id`) | |
|
|
40
|
-
| `version` | the `@agent-custody/receipts` version that `npx` runs | `0.16.
|
|
40
|
+
| `version` | the `@agent-custody/receipts` version that `npx` runs | `0.16.7` |
|
|
41
41
|
| `github-token` | a token that can write pull request comments; an empty value writes the job summary only | `github.token` |
|
|
42
42
|
| `comment-author` | the login of the account that `github-token` posts as; the action edits only a comment from this account | `github-actions[bot]` |
|
|
43
43
|
|
package/docs/perathos.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Reading a Perathos log
|
|
2
2
|
|
|
3
|
-
[Perathos](https://github.com/perathos-protocol/perathos) records an agent's tool calls from hooks inside the agent's host (Claude Code
|
|
3
|
+
[Perathos](https://github.com/perathos-protocol/perathos) records an agent's tool calls, from hooks inside the agent's host (Claude Code or Cursor) or from its MCP proxy, a separate process in front of an MCP server. It hash-chains them into a session log and seals them with Ed25519 checkpoints: the hooks at the end of each turn, the proxy every `--seal-every` calls and when the client disconnects or the server exits. `agent-custody verify-perathos` checks such a log against the verification rules of the Perathos receipt spec (`docs/specs/RECEIPT_V1.md` in their repository), so an auditor can check either project's records with one tool. The reader was written from that spec alone, not from Perathos code.
|
|
4
4
|
|
|
5
5
|
The two formats record different things, and the report says which one it read. This page lists what the reader checks, what a valid log proves, and how the fields of the two formats correspond.
|
|
6
6
|
|
|
@@ -33,13 +33,13 @@ signers be58168fa007
|
|
|
33
33
|
time 2026-11-04T08:19:00.000000Z to 2026-11-04T08:19:06.000000Z (host clock)
|
|
34
34
|
denied 1 call(s) stopped by the guard
|
|
35
35
|
|
|
36
|
-
PROVENANCE: perathos.receipt/v1, recorded
|
|
36
|
+
PROVENANCE: perathos.receipt/v1, recorded on the agent's host (claude-code) by hooks or an MCP proxy; the checkpoint key, or the credential for a remote signer, is on that host, so a valid log shows that the key holder sealed this sequence, not that an enforcement point outside the agent saw each call; times are the host's clock, and RFC 3161 anchors were not checked
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
| flag | effect |
|
|
40
40
|
| --- | --- |
|
|
41
41
|
| `--key <hex>` | pins the recorder's Ed25519 public key (repeatable); a checkpoint signed by any other key fails. Without it, a session sealed by more than one key fails, and the report warns that no key was pinned |
|
|
42
|
-
| `--head <file>` | the head witness, `{ "seq", "receipt_hash" }` of the latest checkpoint; a log cut back to an earlier checkpoint fails |
|
|
42
|
+
| `--head <file>` | the head witness, `{ "seq", "receipt_hash" }` of the latest checkpoint (the file also holds its `session_id`, its `ts`, and a copy of its `signature`); a log cut back to an earlier checkpoint fails |
|
|
43
43
|
| `--allow-unsigned` | accepts a log with no checkpoint, or an unsigned one, and reports each as a warning |
|
|
44
44
|
| `--json` | the report as JSON |
|
|
45
45
|
|
|
@@ -47,7 +47,7 @@ It exits 0 when the log is valid and 1 when it is not. Receipts after the last c
|
|
|
47
47
|
|
|
48
48
|
## What it checks
|
|
49
49
|
|
|
50
|
-
Rules 1 to 9 of the spec:
|
|
50
|
+
Rules 1 to 9 of the spec. Two checks go beyond the spec's verification rules and Perathos's own verifier: the fixed `ts` form in rule 5 (the spec's field table gives that form, but its rules and its verifier check only that `ts` never decreases), and, in rule 8, one key for the whole session when no key is pinned (Perathos's own verifier warns when more than one key signed, and does not fail the log).
|
|
51
51
|
|
|
52
52
|
1. Every line is a JSON object, `v` is `perathos.receipt/v1`, and `kind` is `pre`, `post`, or `checkpoint`.
|
|
53
53
|
2. `seq` runs 1, 2, 3, and so on in file order.
|
|
@@ -63,7 +63,7 @@ Rules 1 to 9 of the spec:
|
|
|
63
63
|
|
|
64
64
|
The holder of the checkpoint key sealed this exact sequence, and nothing up to the last checkpoint was edited, removed, inserted, or reordered since. Whoever holds a call's arguments or result can show that they match the recorded hash.
|
|
65
65
|
|
|
66
|
-
It does not prove that an enforcement point outside the agent saw each call. The recorder runs in the agent's host
|
|
66
|
+
It does not prove that an enforcement point outside the agent saw each call. The recorder runs in the agent's host. With the default local signer the checkpoint key is a file on that host; with a remote signer (Vault, Cloud KMS, or a signing command) the key stays in the service, but the credential to use it is usually reachable from the host. So the log is as trustworthy as that host. A log cut back to an earlier checkpoint cannot be shown if the head witness was also deleted and no copy of the anchors is kept elsewhere. Times are the host's clock. The `model` field is self-reported. The spec lists the rest, including a recorder that was not running for part of a session: a hook that failed to write a receipt shows up only in the local, unsigned `~/.perathos/errors.log`.
|
|
67
67
|
|
|
68
68
|
## How the two formats correspond
|
|
69
69
|
|
|
@@ -78,20 +78,23 @@ It does not prove that an enforcement point outside the agent saw each call. The
|
|
|
78
78
|
| `tool`, `args_hash`, `result_hash` | `tool.name`, `request.argsDigest`, `outcome.resultDigest` | agent-custody can also carry the arguments, or withhold a field behind a salted commitment or an encrypted value ([private evidence](usage.md#private-evidence)) |
|
|
79
79
|
| `status` | `outcome.status` | `ok` or `error` against `executed`, `failed`, `denied`, `error`, or `withheld` |
|
|
80
80
|
| `model` | `model.id` | self-reported in both; agent-custody marks it `claimed` |
|
|
81
|
-
| `guard.decision`, `guard.rule` | `policy.decision`, `policy.reasons`, `policy.policyDigest` | a guard rule against a Cedar or Rego policy pinned by its digest |
|
|
82
|
-
| `guard.precondition` (a
|
|
83
|
-
| `
|
|
81
|
+
| `guard.decision`, `guard.rule` | `policy.decision`, `policy.reasons`, `policy.policyDigest` | a guard rule against a Cedar or Rego policy pinned by its digest. A denied call is a `pre` with `decision: "deny"` and no `post`; the rule `guard.error` means the guard failed and denied the call; a rule prefixed `script:` or `write:` matched inside a script the command runs or writes |
|
|
82
|
+
| `guard.precondition` (the hash of a signed safety check) | `delegation` (a principal-signed grant) | signed by a listed approver key, or by the local recorder key when no approver is listed; scoped to a target and reusable until it expires, like a grant |
|
|
83
|
+
| `guard.approval` (the hash of a Perathos Gate receipt) | `approval` (a payload-bound approval) | names a Gate receipt recording a passkey approval; the Gate receipt's `request.args_hash` equals the `pre` receipt's `args_hash`. `perathos evidence verify` checks that binding; this reader does not yet |
|
|
84
|
+
| `perathos.anchor/v1` (RFC 3161) | the log's checkpoints, witness, and chain anchor ([anchoring](anchoring.md)) | a timestamp token is an upper bound on when a checkpoint existed; it shows a cut log only when a copy of the anchors is kept off the recording machine, where agent-custody shows one by consistency with an independently held RFC 9162 tree head |
|
|
85
|
+
|
|
86
|
+
Two Perathos fields have no counterpart above: `event` on a checkpoint names what sealed it (a hook event such as `Stop`, or `mcp-periodic` and `mcp-end` from the proxy), and `result_from: "payload"` on a Cursor `post` means the result hash was taken over the hook payload, because Cursor sent no output.
|
|
84
87
|
|
|
85
88
|
Both use Ed25519, SHA-256, and canonical JSON with sorted keys that matches RFC 8785 for these bodies. The structures differ, so a shared schema would lose detail on both sides. The common ground both can map to is IETF SCITT ([aligning with SCITT](scitt.md)).
|
|
86
89
|
|
|
87
90
|
## Not read yet
|
|
88
91
|
|
|
89
92
|
- RFC 3161 anchors (`perathos.anchor/v1`): verifying a timestamp token means parsing the authority's signed response and chaining it to a pinned root certificate.
|
|
90
|
-
- The rest of a Perathos evidence pack: its signed manifest, anchors, and preconditions. The session log inside a pack is read as above. The head witness file also carries a signature
|
|
93
|
+
- The rest of a Perathos evidence pack: its signed manifest, anchors, and preconditions. The session log inside a pack is read as above. The head witness file also carries `session_id`, `ts`, and `signature` (a copy of the checkpoint's own signature), which the spec does not define and which are not checked.
|
|
91
94
|
- Signed preconditions (`perathos.precondition/v1`) and Gate approvals.
|
|
92
95
|
|
|
93
96
|
## Tested against a log Perathos wrote
|
|
94
97
|
|
|
95
|
-
`vectors/interop/perathos/pocketos-replay/` holds the session log, head witness, and verifier report from the sample evidence pack in the Perathos repository, copied byte for byte with their licence ([the vector's README](../vectors/interop/perathos/README.md)). `verify-perathos` verifies that log with the recorder's key and the head witness, and agrees with Perathos's own verifier on the session, the receipt, call, and checkpoint counts, the sealed range, the signer, the times, and the two calls the guard blocked. The same log with one receipt edited, cut back to its first checkpoint against the head witness, or checked against another key, fails. So our canonical JSON matches their writer's, and their signatures are hex.
|
|
98
|
+
`vectors/interop/perathos/pocketos-replay/` holds the session log, head witness, and verifier report from the sample evidence pack in the Perathos repository, copied byte for byte with their licence ([the vector's README](../vectors/interop/perathos/README.md)). `verify-perathos` verifies that log with the recorder's key and the head witness, and agrees with Perathos's own verifier on the session, the receipt, call, and checkpoint counts, the sealed range, the signer, the times, and the two calls the guard blocked. The same log with one receipt edited, cut back to its first checkpoint against the head witness, or checked against another key, fails. So our canonical JSON matches their writer's, and their signatures are hex. Perathos also publishes [test vectors for the receipt spec](https://github.com/perathos-protocol/perathos/tree/main/docs/specs/vectors/receipt_v1): a valid log and three that must fail, each with the verdict and error its verifier gives.
|
|
96
99
|
|
|
97
100
|
The other tests in `test/perathos.test.ts` write logs from the spec, to reach each rule. Example 45 does the same and shows a cut log caught by its head witness and an edited guard decision caught by the chain.
|
package/docs/tutorials.md
CHANGED
|
@@ -56,6 +56,10 @@ Suggested reading order is the numbering. Output lands in `examples-out/`, which
|
|
|
56
56
|
| 44 | the egress witness deciding by Rego | [44-egress-rego.ts](../examples/44-egress-rego.ts) | `policyFile: "policy.rego"`: the witness compiles it with `opa build`; a Rego `deny` refuses CONNECT api.stripe.com:443 with its string as the reason, an `allow` relays the docs mirror for the agent the credential proved, a guessed secret naming that agent is the principal `"unknown"` and gets 407, and an edit that does not compile leaves the policy in force; the refusal verifies | `src/egress.ts`, `src/policy-rego.ts` |
|
|
57
57
|
| 45 | reading another project's records: a Perathos session log | [45-perathos-log.ts](../examples/45-perathos-log.ts) | a session written to the Perathos receipt spec (two calls, one denied by its guard, two signed checkpoints) verifies with the recorder's key pinned and its head witness; the report labels it as recorded inside the agent's host; a log cut back to the first checkpoint still chains but fails against the head witness; a denied delete edited to allow, hash recomputed, breaks the next `prev_hash` | `src/perathos.ts` |
|
|
58
58
|
| 46 | what the policy would have denied in past Claude Code sessions, read-only | [46-audit-sessions.ts](../examples/46-audit-sessions.ts) | three Claude Code transcripts written the way Claude Code writes them (two projects, a subagent, a repeated call); `audit-sessions` reads them against the starter policy and lists a force push and a `terraform destroy` with their rules and reasons; `--counts` shows numbers only; a stale transcript outside `--since 7d` is skipped; the output says a transcript is not a receipt | `src/session-audit.ts`, `src/deny-report.ts` |
|
|
59
|
+
| 47 | the door checks Web Bot Auth signatures | [47-web-bot-auth.ts](../examples/47-web-bot-auth.ts) | a crawler publishes its Ed25519 key in a directory at its own origin (served by a stub here) and signs each request (RFC 9421, tag `web-bot-auth`); unsigned it is unknown and refused, signed it is verified as `https://crawler.example` with no grant and the directory is fetched once; the same request again is a replay, a signature made for another site is refused; a grant naming the crawler under its signature is bound to its sender, another agent's grant under it is `wrong-sender`; the receipts verify | `src/web-bot-auth.ts`, `src/door.ts`, `src/config.ts` |
|
|
60
|
+
| 48 | the door in-process: Express middleware and a Next.js route-handler wrapper | [48-door-app.ts](../examples/48-door-app.ts) | `door.json` without an origin; an Express shop with `app.use(door)` before `express.json()`; an unknown arrival reads the catalogue and is refused a refund that the app never sees; an agent with a grant refunds £45, committed to the log before the app runs, its body reaching `express.json()` and its grant stripped; the same door wraps a fetch-style `POST` handler as a Next.js route; every receipt records the app's status and body digest and verifies | `src/door-app.ts`, `src/door.ts` |
|
|
61
|
+
| 49 | the door behind stock nginx or Envoy: authz checks instead of relaying | [49-door-authz.ts](../examples/49-door-authz.ts) | the door with `authz: true` answers checks as nginx `auth_request` sends them (`X-Original-Method`, `X-Original-URI`): a catalogue read 200 and an unknown refund 403; a verified agent's refund is committed to the log before the 200; a check that names no original request is refused 400 with no receipt; each receipt verifies and its report says it records the decision, not the origin's answer. `deploy/door/demo.sh` runs the real nginx and Envoy | `src/door.ts`, `src/config.ts` |
|
|
62
|
+
| 52 | the door asks a partner detection engine, and the engine signs its verdict | [52-door-partner-verdict.ts](../examples/52-door-partner-verdict.ts) | a stub engine (`scripts/fake-partner.ts`) signs a verdict for each arrival's receipt and route; a browser's `human` verdict is relayed and a bot's refused by a policy on `context.facts.partner`; the receipt carries the verdict as an attested fact and verifies with the engine's key as an upstream key, and not without it; a verdict replayed from another arrival is refused with 503, and so is an arrival when the engine times out (`onFailure: "deny"`), even on a route the policy alone would allow | `src/door-partner.ts`, `src/door.ts` |
|
|
59
63
|
|
|
60
64
|
## How policies are defined, in one paragraph
|
|
61
65
|
|
package/docs/verification.md
CHANGED
|
@@ -84,6 +84,7 @@ A refused call's `execution` row carries the reason the receipt records, for exa
|
|
|
84
84
|
| gateway receipt carries a delegation | gateway receipts always embed the signed grant they enforced | an SDK receipt relabelled as gateway |
|
|
85
85
|
| gateway receipt carries a policy decision | gateway receipts always record the Cedar decision | same |
|
|
86
86
|
| door receipt carries a policy decision | a door decides every arrival by policy; it carries a grant only when the arrival presented one, so there is no delegation check for it | a record-only receipt relabelled as door |
|
|
87
|
+
| door authz decided, relayed nothing | only on a door receipt with `issuer.framework: "authz"`: the door answered a proxy's authz check (nginx `auth_request`, Envoy `ext_authz`) and relayed nothing, so an allow is `withheld` and a deny `denied`; the receipt records the decision, never the body or the origin's answer ([the door](door.md#behind-nginx-or-envoy-authz-mode)) | an authz receipt re-signed to claim the request was executed with a result |
|
|
87
88
|
| egress receipt carries a policy decision | an egress witness decides every connection by policy | a record-only receipt relabelled as egress |
|
|
88
89
|
| egress destination observed | the receipt's tool, `host:port`, is the witness's observation and equals the destination fact the policy decided on; an observed bypass of the gateway, not a record of what was sent | a receipt re-signed to name another destination |
|
|
89
90
|
| egress open committed before relaying | a relayed connection carries the authorization the witness committed to the log before any byte moved | a bypass with no record until it closed, or a receipt re-signed to drop the commitment |
|
|
@@ -104,6 +105,7 @@ A refused call's `execution` row carries the reason the receipt records, for exa
|
|
|
104
105
|
| request args digest | the args in the predicate hash to the digest in the subject. Recomputed when the arguments are in clear, disclosed with `--disclose`, or decrypted with `--capture-key-env`; when fields are withheld and neither is given, it passes as committed, the detail saying "committed, not recomputed" and how many fields are withheld | edited arguments, or a disclosure that contradicts a commitment |
|
|
105
106
|
| execution result digest | executed and failed calls: the result in the predicate hashes to `execution.resultDigest`, under the same rules as the arguments; a provider delivery withheld with the result is restored first, since the digest covered it | an edited result, or a disclosure or key that does not match the commitment, or a capture note naming a field that is not a commitment |
|
|
106
107
|
| fact `<name>` value, fact `<name>` args | only for a captured fact: its commitments hold against the disclosed or decrypted value, or pass as committed when neither is given | a disclosure that lies about a fact the policy decided on |
|
|
108
|
+
| fact `<name>` signature (upstream key) | only for a fact marked `attested` (the door's partner verdict): its `attestation` envelope verifies under an upstream key given with `--upstream-key`, names this receipt and tool, and signs the digest of the fact's value as recorded. Without an upstream key it fails, since the receipt says the fact is attested and the reader cannot confirm it. A withheld envelope beside a value in clear fails it; `fact <name> signature not checked` passes with a note when the value itself is withheld | a verdict signed by another key, edited, or moved from another receipt |
|
|
107
109
|
| upstream signature not checked | only when the result is withheld and an upstream key or provider secret was given: the signature cannot be checked against a result the verifier cannot see, so the line passes with a note in place of the signature check; disclose the result or give the key to run it | nothing; it is a note |
|
|
108
110
|
| policy decision consistent with execution | allow went with executed or failed; an enforced deny went with denied; a deny carrying `enforced: false` (observe mode) went with anything but denied, and the detail says "observe mode, not enforced". Skipped when no policy was evaluated | an issuer that executed after a deny |
|
|
109
111
|
| no policy errors on an allow | an allow was not produced while Cedar reported errors | broken fail-closed behaviour |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-custody/receipts",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.7",
|
|
4
4
|
"mcpName": "io.github.svayatta/agent-custody",
|
|
5
5
|
"description": "Proof of what your AI agents did. Give your agents real power, without losing control of them: signed, verifiable receipts for tool calls, an MCP gateway with Cedar or Rego policy, and a Merkle transparency log.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
"types": "./dist/sdk/deepseek-harness.d.ts",
|
|
50
50
|
"default": "./dist/sdk/deepseek-harness.js"
|
|
51
51
|
},
|
|
52
|
+
"./door": {
|
|
53
|
+
"types": "./dist/door-app.d.ts",
|
|
54
|
+
"default": "./dist/door-app.js"
|
|
55
|
+
},
|
|
52
56
|
"./cli": {
|
|
53
57
|
"types": "./dist/cli.d.ts",
|
|
54
58
|
"default": "./dist/cli.js"
|
|
@@ -83,9 +87,11 @@
|
|
|
83
87
|
"@langchain/core": "1.2.9",
|
|
84
88
|
"@node-saml/node-saml": "5.1.0",
|
|
85
89
|
"@openai/agents": "0.18.0",
|
|
90
|
+
"@types/express": "5.0.6",
|
|
86
91
|
"@types/node": "26.4.1",
|
|
87
92
|
"@vitest/coverage-v8": "5.0.0",
|
|
88
93
|
"ai": "7.0.93",
|
|
94
|
+
"express": "5.2.1",
|
|
89
95
|
"langchain": "1.5.15",
|
|
90
96
|
"tsx": "4.23.13",
|
|
91
97
|
"typescript": "7.0.2",
|
package/vectors/audit.json
CHANGED
|
@@ -7,26 +7,26 @@
|
|
|
7
7
|
"description": "The tree head from the first remote receipt and the log's later head, with the proof the log served.",
|
|
8
8
|
"older": {
|
|
9
9
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
10
|
-
"payload": "
|
|
10
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMTljNGY5ZTk3ZTU3MzA0OTdkNzdiZGY3NzUxMDVjZjI0MmMzYTNiZTk0OTdhZmMxOGRlYzczNDFjY2RiNWE0ZCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMTlUMTg6MDE6MTcuNjk4WiIsInRyZWVTaXplIjoxfQ==",
|
|
11
11
|
"signatures": [
|
|
12
12
|
{
|
|
13
|
-
"keyid": "
|
|
14
|
-
"sig": "
|
|
13
|
+
"keyid": "0f3bcaecd05529b2c3110da1c99a673dc55ad22a7e5d60ebdb1c42b5ce151c01",
|
|
14
|
+
"sig": "Wm2BAgvg3OyAyJHxlD7qZnacX8XvMb6jtj0xjal8FRphH4ZXGOKmXmGsx8Ht9y1sC2KzsYOL5FrROcBuFC3EDQ=="
|
|
15
15
|
}
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
18
|
"newer": {
|
|
19
19
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
20
|
-
"payload": "
|
|
20
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiOTNiOWQ1YzVkZjA2MTY3NGZiYjQ4NTBjMTIzZTYyOGFkNWNlMDk2N2RiMjc1ZDJiMzcxYzEzZjVhNjAzZTRiNyIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMTlUMTg6MDE6MTcuNzAyWiIsInRyZWVTaXplIjoyfQ==",
|
|
21
21
|
"signatures": [
|
|
22
22
|
{
|
|
23
|
-
"keyid": "
|
|
24
|
-
"sig": "
|
|
23
|
+
"keyid": "0f3bcaecd05529b2c3110da1c99a673dc55ad22a7e5d60ebdb1c42b5ce151c01",
|
|
24
|
+
"sig": "zZuXUe8k/MSWqi4NFOekkE+/1fPv3HD1ChcwO6uQJwVsb4vY+sb5TakOhwuu55gghJkjLidLs3kiyZOuH9KQBA=="
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
28
|
"proof": [
|
|
29
|
-
"
|
|
29
|
+
"fc9d95a14c9864185b81ed3ec903210fd0e89fced42844373700ec3176cc1b5f"
|
|
30
30
|
],
|
|
31
31
|
"keys": [
|
|
32
32
|
"log"
|
|
@@ -41,26 +41,26 @@
|
|
|
41
41
|
"description": "The same heads the wrong way round.",
|
|
42
42
|
"older": {
|
|
43
43
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
44
|
-
"payload": "
|
|
44
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiOTNiOWQ1YzVkZjA2MTY3NGZiYjQ4NTBjMTIzZTYyOGFkNWNlMDk2N2RiMjc1ZDJiMzcxYzEzZjVhNjAzZTRiNyIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMTlUMTg6MDE6MTcuNzAyWiIsInRyZWVTaXplIjoyfQ==",
|
|
45
45
|
"signatures": [
|
|
46
46
|
{
|
|
47
|
-
"keyid": "
|
|
48
|
-
"sig": "
|
|
47
|
+
"keyid": "0f3bcaecd05529b2c3110da1c99a673dc55ad22a7e5d60ebdb1c42b5ce151c01",
|
|
48
|
+
"sig": "zZuXUe8k/MSWqi4NFOekkE+/1fPv3HD1ChcwO6uQJwVsb4vY+sb5TakOhwuu55gghJkjLidLs3kiyZOuH9KQBA=="
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
52
|
"newer": {
|
|
53
53
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
54
|
-
"payload": "
|
|
54
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMTljNGY5ZTk3ZTU3MzA0OTdkNzdiZGY3NzUxMDVjZjI0MmMzYTNiZTk0OTdhZmMxOGRlYzczNDFjY2RiNWE0ZCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMTlUMTg6MDE6MTcuNjk4WiIsInRyZWVTaXplIjoxfQ==",
|
|
55
55
|
"signatures": [
|
|
56
56
|
{
|
|
57
|
-
"keyid": "
|
|
58
|
-
"sig": "
|
|
57
|
+
"keyid": "0f3bcaecd05529b2c3110da1c99a673dc55ad22a7e5d60ebdb1c42b5ce151c01",
|
|
58
|
+
"sig": "Wm2BAgvg3OyAyJHxlD7qZnacX8XvMb6jtj0xjal8FRphH4ZXGOKmXmGsx8Ht9y1sC2KzsYOL5FrROcBuFC3EDQ=="
|
|
59
59
|
}
|
|
60
60
|
]
|
|
61
61
|
},
|
|
62
62
|
"proof": [
|
|
63
|
-
"
|
|
63
|
+
"fc9d95a14c9864185b81ed3ec903210fd0e89fced42844373700ec3176cc1b5f"
|
|
64
64
|
],
|
|
65
65
|
"keys": [
|
|
66
66
|
"log"
|
|
@@ -77,26 +77,26 @@
|
|
|
77
77
|
"description": "Tree heads checked against the app key, which did not sign them.",
|
|
78
78
|
"older": {
|
|
79
79
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
80
|
-
"payload": "
|
|
80
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMTljNGY5ZTk3ZTU3MzA0OTdkNzdiZGY3NzUxMDVjZjI0MmMzYTNiZTk0OTdhZmMxOGRlYzczNDFjY2RiNWE0ZCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMTlUMTg6MDE6MTcuNjk4WiIsInRyZWVTaXplIjoxfQ==",
|
|
81
81
|
"signatures": [
|
|
82
82
|
{
|
|
83
|
-
"keyid": "
|
|
84
|
-
"sig": "
|
|
83
|
+
"keyid": "0f3bcaecd05529b2c3110da1c99a673dc55ad22a7e5d60ebdb1c42b5ce151c01",
|
|
84
|
+
"sig": "Wm2BAgvg3OyAyJHxlD7qZnacX8XvMb6jtj0xjal8FRphH4ZXGOKmXmGsx8Ht9y1sC2KzsYOL5FrROcBuFC3EDQ=="
|
|
85
85
|
}
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
88
|
"newer": {
|
|
89
89
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
90
|
-
"payload": "
|
|
90
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiOTNiOWQ1YzVkZjA2MTY3NGZiYjQ4NTBjMTIzZTYyOGFkNWNlMDk2N2RiMjc1ZDJiMzcxYzEzZjVhNjAzZTRiNyIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMTlUMTg6MDE6MTcuNzAyWiIsInRyZWVTaXplIjoyfQ==",
|
|
91
91
|
"signatures": [
|
|
92
92
|
{
|
|
93
|
-
"keyid": "
|
|
94
|
-
"sig": "
|
|
93
|
+
"keyid": "0f3bcaecd05529b2c3110da1c99a673dc55ad22a7e5d60ebdb1c42b5ce151c01",
|
|
94
|
+
"sig": "zZuXUe8k/MSWqi4NFOekkE+/1fPv3HD1ChcwO6uQJwVsb4vY+sb5TakOhwuu55gghJkjLidLs3kiyZOuH9KQBA=="
|
|
95
95
|
}
|
|
96
96
|
]
|
|
97
97
|
},
|
|
98
98
|
"proof": [
|
|
99
|
-
"
|
|
99
|
+
"fc9d95a14c9864185b81ed3ec903210fd0e89fced42844373700ec3176cc1b5f"
|
|
100
100
|
],
|
|
101
101
|
"keys": [
|
|
102
102
|
"app"
|
|
@@ -114,21 +114,21 @@
|
|
|
114
114
|
"description": "A proof with a hash removed.",
|
|
115
115
|
"older": {
|
|
116
116
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
117
|
-
"payload": "
|
|
117
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMTljNGY5ZTk3ZTU3MzA0OTdkNzdiZGY3NzUxMDVjZjI0MmMzYTNiZTk0OTdhZmMxOGRlYzczNDFjY2RiNWE0ZCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMTlUMTg6MDE6MTcuNjk4WiIsInRyZWVTaXplIjoxfQ==",
|
|
118
118
|
"signatures": [
|
|
119
119
|
{
|
|
120
|
-
"keyid": "
|
|
121
|
-
"sig": "
|
|
120
|
+
"keyid": "0f3bcaecd05529b2c3110da1c99a673dc55ad22a7e5d60ebdb1c42b5ce151c01",
|
|
121
|
+
"sig": "Wm2BAgvg3OyAyJHxlD7qZnacX8XvMb6jtj0xjal8FRphH4ZXGOKmXmGsx8Ht9y1sC2KzsYOL5FrROcBuFC3EDQ=="
|
|
122
122
|
}
|
|
123
123
|
]
|
|
124
124
|
},
|
|
125
125
|
"newer": {
|
|
126
126
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
127
|
-
"payload": "
|
|
127
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiOTNiOWQ1YzVkZjA2MTY3NGZiYjQ4NTBjMTIzZTYyOGFkNWNlMDk2N2RiMjc1ZDJiMzcxYzEzZjVhNjAzZTRiNyIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMTlUMTg6MDE6MTcuNzAyWiIsInRyZWVTaXplIjoyfQ==",
|
|
128
128
|
"signatures": [
|
|
129
129
|
{
|
|
130
|
-
"keyid": "
|
|
131
|
-
"sig": "
|
|
130
|
+
"keyid": "0f3bcaecd05529b2c3110da1c99a673dc55ad22a7e5d60ebdb1c42b5ce151c01",
|
|
131
|
+
"sig": "zZuXUe8k/MSWqi4NFOekkE+/1fPv3HD1ChcwO6uQJwVsb4vY+sb5TakOhwuu55gghJkjLidLs3kiyZOuH9KQBA=="
|
|
132
132
|
}
|
|
133
133
|
]
|
|
134
134
|
},
|
package/vectors/canonical.json
CHANGED
|
@@ -53,18 +53,18 @@
|
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
55
|
"keyid": {
|
|
56
|
-
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\
|
|
57
|
-
"keyid": "
|
|
56
|
+
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA+GNfC94+QIXyufaVfrMAdVSo4VC/b+/gSHMvk1VeObE=\n-----END PUBLIC KEY-----\n",
|
|
57
|
+
"keyid": "6c6d6643bbe3cdb2a980cbefa5140855c13fcacf6de00d33d6e5c0f790d00e56"
|
|
58
58
|
},
|
|
59
59
|
"dsse": {
|
|
60
|
-
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\
|
|
60
|
+
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA+GNfC94+QIXyufaVfrMAdVSo4VC/b+/gSHMvk1VeObE=\n-----END PUBLIC KEY-----\n",
|
|
61
61
|
"envelope": {
|
|
62
62
|
"payloadType": "application/vnd.example+json",
|
|
63
63
|
"payload": "eyJoZWxsbyI6IndvcmxkIn0=",
|
|
64
64
|
"signatures": [
|
|
65
65
|
{
|
|
66
|
-
"keyid": "
|
|
67
|
-
"sig": "
|
|
66
|
+
"keyid": "6c6d6643bbe3cdb2a980cbefa5140855c13fcacf6de00d33d6e5c0f790d00e56",
|
|
67
|
+
"sig": "KlFH/YMB4oauSD7XDte5HB+j6XubTDcE6amF5rP8V1j7thBpdBLW/ckqC13crLHm2ndXLEgqGZZv557/GlKNDQ=="
|
|
68
68
|
}
|
|
69
69
|
]
|
|
70
70
|
},
|