@agent-custody/receipts 0.16.10 → 0.16.12
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 +32 -12
- package/dist/approval-requests.d.ts +114 -0
- package/dist/approval-requests.js +198 -0
- package/dist/approval.d.ts +8 -0
- package/dist/approval.js +10 -3
- package/dist/check.js +14 -0
- package/dist/cli.js +184 -5
- package/dist/completeness.d.ts +11 -2
- package/dist/completeness.js +45 -9
- package/dist/config.d.ts +6 -0
- package/dist/config.js +19 -1
- package/dist/console-page.js +87 -2
- package/dist/console.js +72 -0
- package/dist/crypto.d.ts +2 -0
- package/dist/crypto.js +2 -1
- package/dist/delegation.d.ts +1 -1
- package/dist/delegation.js +19 -2
- package/dist/did-key.d.ts +2 -0
- package/dist/did-key.js +21 -1
- package/dist/door-app.js +1 -1
- package/dist/door-core.d.ts +385 -0
- package/dist/door-core.js +757 -0
- package/dist/door-error-rates.d.ts +102 -0
- package/dist/door-error-rates.js +178 -0
- package/dist/door-form.d.ts +7 -2
- package/dist/door-form.js +52 -4
- package/dist/door-measure.d.ts +153 -0
- package/dist/door-measure.js +325 -0
- package/dist/door-signals.d.ts +414 -0
- package/dist/door-signals.js +555 -0
- package/dist/door-test-set.d.ts +43 -0
- package/dist/door-test-set.js +117 -0
- package/dist/door-worker.d.ts +148 -0
- package/dist/door-worker.js +283 -0
- package/dist/door.d.ts +11 -293
- package/dist/door.js +45 -755
- package/dist/gateway-http.d.ts +1 -6
- package/dist/gateway-http.js +2 -19
- package/dist/gateway.js +24 -3
- package/dist/grant-header.d.ts +8 -0
- package/dist/grant-header.js +19 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.js +6 -1
- package/dist/issue.d.ts +2 -16
- package/dist/issue.js +2 -12
- package/dist/lock.d.ts +5 -0
- package/dist/lock.js +1 -1
- package/dist/log-http.d.ts +37 -0
- package/dist/log-http.js +74 -0
- package/dist/log-sink.d.ts +3 -37
- package/dist/log-sink.js +5 -71
- package/dist/log.d.ts +2 -27
- package/dist/log.js +2 -173
- package/dist/merkle.d.ts +27 -0
- package/dist/merkle.js +175 -0
- package/dist/object-issuer.d.ts +29 -0
- package/dist/object-issuer.js +172 -0
- package/dist/receipt-pending.d.ts +16 -0
- package/dist/receipt-pending.js +14 -0
- package/dist/web-bot-auth.d.ts +26 -6
- package/dist/web-bot-auth.js +116 -56
- package/docs/approvals.md +33 -0
- package/docs/completeness.md +44 -5
- package/docs/console.md +11 -4
- package/docs/door-error-rates.md +490 -0
- package/docs/door-languages.md +3 -1
- package/docs/door-middleware.md +6 -1
- package/docs/door-quickstart.md +53 -17
- package/docs/door-signals.md +117 -7
- package/docs/door-worker.md +94 -0
- package/docs/door.md +41 -12
- package/docs/github-action.md +2 -2
- package/docs/tutorials.md +6 -0
- package/docs/verification.md +1 -1
- package/package.json +4 -1
- package/vectors/audit.json +27 -27
- package/vectors/canonical.json +5 -5
- package/vectors/receipts.json +1645 -1549
package/docs/door.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
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. 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).
|
|
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). A site already on Cloudflare can run the door at the edge, as a Worker: [the door as a Cloudflare Worker](door-worker.md).
|
|
8
8
|
|
|
9
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
|
|
|
@@ -39,7 +39,7 @@ To run it as a service, the gateway image has a `door` mode (`docker run ... ghc
|
|
|
39
39
|
|
|
40
40
|
Every field of the config, with its type and default, is in [the door reference](../../../site/reference/door.md#config).
|
|
41
41
|
|
|
42
|
-
`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 revocation file, 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.
|
|
42
|
+
`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 `behaviour` signals (with a warning that the proxy must overwrite `behaviour.tlsHeader`), the revocation file, 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.
|
|
43
43
|
|
|
44
44
|
## What the door knows about an arrival
|
|
45
45
|
|
|
@@ -49,17 +49,19 @@ The door records one fact for every arrival, `arrival`, observed by the door its
|
|
|
49
49
|
| --- | --- | --- |
|
|
50
50
|
| `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, a revoked 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 |
|
|
51
51
|
| `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` |
|
|
52
|
-
| `grant` | `verified`, `out-of-scope`, `invalid`, `revoked`, `wrong-sender`, `absent` | what became of the grant header, with `grantError` when it was not accepted. `revoked`: the grant verified, and it or a grant above it in its chain is in `revokedGrants` (see [revoking a grant](#revoking-a-grant)). `wrong-sender`: the grant verified, and the request is signed by a signature agent the grant does not name |
|
|
52
|
+
| `grant` | `verified`, `out-of-scope`, `invalid`, `revoked`, `wrong-sender`, `absent` | what became of the grant header, with `grantError` when it was not accepted. `revoked`: the grant verified, and it or a grant above it in its chain is in `revokedGrants` (see [revoking a grant](#revoking-a-grant)). `wrong-sender`: the grant verified, and the request is signed by a signature agent, or by a did:key, that the grant does not name |
|
|
53
53
|
| `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) |
|
|
54
|
-
| `signatureAgent`, `signatureKeyid` | strings | the `Signature-Agent` origin and the keyid the signature named. Checked only when `signature` is `verified` |
|
|
54
|
+
| `signatureAgent`, `signatureKeyid` | strings | the `Signature-Agent` origin and the keyid the signature named. For a signature by a did:key's key, both are the did:key. Checked only when `signature` is `verified` |
|
|
55
55
|
| `declared` | string | the `x-agent-custody-agent` header, when sent. A claim |
|
|
56
56
|
| `remote` | string | the arrival's address |
|
|
57
57
|
| `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 |
|
|
58
58
|
| `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) |
|
|
59
59
|
| `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 |
|
|
60
|
+
| `fingerprint` | `{ headers, tls? }` | only when `behaviour` is configured. What the request and its connection look like: what the `User-Agent` states, a hash of the header order, and the TLS fingerprint when the door has one. See [behaviour and fingerprint signals](#behaviour-and-fingerprint-signals) |
|
|
61
|
+
| `behaviour` | `{ timing, navigation, form? }` | only when `behaviour` is configured. How the source acts over time: its pace, whether a page load came before a write, and the form report when the arrival sent one. Signals, not a verdict |
|
|
60
62
|
| `method`, `path`, `route` | strings | what arrived, and the route it fell under |
|
|
61
63
|
|
|
62
|
-
[Door signals](door-signals.md) says, for each field, what it establishes and what it does not, and how a policy should read it.
|
|
64
|
+
[Door signals](door-signals.md) says, for each field, what it establishes and what it does not, and how a policy should read it. [Door error rates](door-error-rates.md) measures how often `class` is wrong for each kind of arrival, with the method, and scores your own receipts against your labels with `agent-custody door error-rates`.
|
|
63
65
|
|
|
64
66
|
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.
|
|
65
67
|
|
|
@@ -67,7 +69,9 @@ There is no `human` class. The door cannot tell a person from a program that pre
|
|
|
67
69
|
|
|
68
70
|
**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.
|
|
69
71
|
|
|
70
|
-
**A did:key agent.** <a id="a-did-key-agent"></a>A grant may name its agent by a [did:key](https://w3c-ccg.github.io/did-key-spec/), the identifier of its Ed25519 key, `did:key:z6Mk...`: `agent-custody grant --agent-key agent.pub --did-key ...` issues one. The door checks the identifier after the principal's signature, on the grant and on every grant above it in its chain: it must decode to an Ed25519 key, and when that grant also carries `agentKey`, that must be the same key. A parent's `agentKey` is what verified the link below it, so a parent whose did:key and `agentKey` disagree makes the arrival `claimed` too, with `link <n>` in `grantError`. An identifier longer than 100 characters is refused before it is decoded. Either failure makes the arrival `claimed` with `grant: "invalid"` and the reason in `grantError`, because the grant says two things about who the agent is, or something that names no key. A grant that checks is `verified`, as any other, with the did:key as `subject`, the Cedar principal (`Agent::"did:key:z6Mk..."`), and the receipt's agent, attested. A did:key says which key; it does not prove that the sender holds it. Alone, a did:key grant is bearer-grade like any grant, and a Web Bot Auth signature names an https origin, not a did:key, so a did:key grant under a signature is `wrong-sender`.
|
|
72
|
+
**A did:key agent.** <a id="a-did-key-agent"></a>A grant may name its agent by a [did:key](https://w3c-ccg.github.io/did-key-spec/), the identifier of its Ed25519 key, `did:key:z6Mk...`: `agent-custody grant --agent-key agent.pub --did-key ...` issues one. The door checks the identifier after the principal's signature, on the grant and on every grant above it in its chain, with the check that the gateway and the verifiers use (`verifyDelegation`): it must decode to an Ed25519 key, and when that grant also carries `agentKey`, that must be the same key. A parent's `agentKey` is what verified the link below it, so a parent whose did:key and `agentKey` disagree makes the arrival `claimed` too, with `link <n>` in `grantError`. An identifier longer than 100 characters is refused before it is decoded. Either failure makes the arrival `claimed` with `grant: "invalid"` and the reason in `grantError`, because the grant says two things about who the agent is, or something that names no key. A grant that checks is `verified`, as any other, with the did:key as `subject`, the Cedar principal (`Agent::"did:key:z6Mk..."`), and the receipt's agent, attested. A did:key says which key; it does not prove that the sender holds it. Alone, a did:key grant is bearer-grade like any grant, and a Web Bot Auth signature names an https origin, not a did:key, so a did:key grant under a signature is `wrong-sender`.
|
|
73
|
+
|
|
74
|
+
**A did:key grant under a signature by its own key is bound to its sender.** <a id="a-did-key-signature"></a>With `webBotAuth` configured, the agent signs the request as for [Web Bot Auth](#web-bot-auth-signatures) (RFC 9421, Ed25519, `tag="web-bot-auth"`, `@authority` covered, `created`, `expires`, and a nonce), and sets `keyid` to its did:key. It sends no `Signature-Agent`, and the door fetches no directory, because the did:key carries the key. The door applies the same checks of the window, the authority, the covered components, and the nonce, and verifies the signature with the key that the did:key names. When the grant verifies and names that did:key, the arrival is `verified` with `signature: "verified"`, and `signatureAgent` and `signatureKeyid` are the did:key. The policy condition for a bound grant, `context.facts.arrival.grant == "verified" && context.facts.arrival.signature == "verified"`, holds for it. A did:key grant under a signature by another did:key's key, or under a Web Bot Auth signature from an https origin, is `wrong-sender`, and the arrival is `claimed`. Anyone can make a key and its did:key, so a did:key signature counts only with a verified grant that names it. With no grant, with a grant that is not verified, or with a grant for another agent, the door records `signature: "invalid"` and the reason in `signatureError`, and the arrival is never `verified` by that signature. `agents` does not list a did:key: the grant of a trusted principal is what admits it. The door keeps the nonce of a did:key signature only when a trusted principal signed the request's grant for that did:key, so signatures by keys that no principal granted cannot fill the nonce store. A door without `webBotAuth` records the signature as `unchecked`, and the grant stays bearer-grade.
|
|
71
75
|
|
|
72
76
|
**Revoking a grant.** <a id="revoking-a-grant"></a>With `revokedGrants` in the config, a grant can be withdrawn before it expires: the file is the gateway's, a JSON array of grant digests, and `agent-custody revoke --config door.json --grant grant.json` appends one. The door re-reads the file when it changes and checks every grant against it after the signature and before the window and the scope, so a running door classifies the next arrival that carries the grant as `claimed` with `grant: "revoked"`, and the Cedar principal is not the agent. Revoking a grant revokes every grant delegated from it (`grantError` says "a grant above it in its chain has been revoked"). A file that is there and cannot be read stops the door from starting; one that becomes unreadable while it runs makes every grant `revoked` until it can be read, so a broken list never lets a grant through. A missing file is an empty list. Without `revokedGrants`, a grant stands until it expires, and `check` warns when the door trusts principals.
|
|
73
77
|
|
|
@@ -285,7 +289,7 @@ Web Bot Auth is the IETF draft for bots and agents that identify themselves by s
|
|
|
285
289
|
|
|
286
290
|
`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).
|
|
287
291
|
|
|
288
|
-
**What the door checks**, in order. The first that fails is the `signatureError
|
|
292
|
+
**What the door checks**, in order. The first that fails is the `signatureError`. For a signature whose `keyid` is a did:key, steps 3 (the `Signature-Agent` part), 4, and 8 do not apply, and step 9 uses the key that the did:key names: see [a did:key signature](#a-did-key-signature).
|
|
289
293
|
|
|
290
294
|
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.
|
|
291
295
|
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.
|
|
@@ -352,6 +356,28 @@ A site that already pays for bot detection (Cloudflare Bot Management, HUMAN, Da
|
|
|
352
356
|
|
|
353
357
|
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).
|
|
354
358
|
|
|
359
|
+
## Behaviour and fingerprint signals
|
|
360
|
+
|
|
361
|
+
The door can add its own signals to the arrival fact: what the request looks like, and how its source acts over time. They are off until the config has a `behaviour` object:
|
|
362
|
+
|
|
363
|
+
```json
|
|
364
|
+
"trustProxy": true,
|
|
365
|
+
"behaviour": { "tlsHeader": "x-ja4" }
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
An empty object, `"behaviour": {}`, is sufficient. Without `behaviour`, the arrival fact is unchanged, and the door reads no TLS header and no form report.
|
|
369
|
+
|
|
370
|
+
- **What the door adds.** `arrival.fingerprint` has `headers` (what the `User-Agent` states, a hash of the header names in the order received, their count) and, when the door has a TLS fingerprint, `tls`. `arrival.behaviour` has `timing` (the pace of the source), `navigation` (whether the source loaded a page before it writes), and, when the arrival sent a form report, `form`. Each value is a string, an integer, or a boolean. The exact fields are in [the reference](../../../site/reference/door.md#the-arrival-fact).
|
|
371
|
+
- **The flags.** Nine booleans mark an arrival: `fingerprint.headers.mismatch`, `fingerprint.headers.hintsMismatch`, `fingerprint.headers.fetchInvalid`, `fingerprint.tls.mismatch`, `fingerprint.tls.knownTool`, `behaviour.timing.regular`, `behaviour.navigation.directWrite`, `behaviour.form.fast`, and `behaviour.form.noInput`. [Door signals](door-signals.md#the-behaviour-and-fingerprint-signals) says what each flag establishes and who gets flagged wrongly. [Door error rates](door-error-rates.md) gives the method and the measured rates.
|
|
372
|
+
- **The door refuses nothing because of a signal.** Only your policy reads the signals. A rule tests `context.facts.arrival.fingerprint has tls` and `context.facts.arrival.behaviour has form` before it reads those groups, because a rule that reads an absent group is an error and the door then denies the arrival. Treat a flag as a reason to ask for a challenge or a grant: [reading them in a policy](door-signals.md#reading-them-in-a-policy).
|
|
373
|
+
- **`tlsHeader`.** The door does not see the TLS handshake. Your proxy does. `tlsHeader` names the request header in which the proxy puts the JA4 fingerprint of the client. It needs `trustProxy: true`; without that the config does not load. The proxy must overwrite the header on every request. If the proxy passes the header through, a client can send its own fingerprint. If the proxy appends to the header, the door records the value as malformed. Without `tlsHeader` the arrival fact has no `fingerprint.tls`.
|
|
374
|
+
- **https.** A browser sends `sec-fetch-*` and `sec-ch-ua` to an https site only. The door serves plain HTTP, so it knows that the client used https only from `X-Forwarded-Proto: https` with `trustProxy`. Without that, `fingerprint.headers.mismatch` reads `accept-language` only.
|
|
375
|
+
- **A proxy in front of the door.** The door records the headers that it received. A proxy that reorders headers changes `fingerprint.headers.order`, and a proxy that drops `accept-language`, `sec-fetch-*`, or `sec-ch-ua` makes every browser a mismatch.
|
|
376
|
+
- **The history.** The timing and navigation signals read the history of the source: a verified agent by its name, else the address, as `rate` does. The history is one process's memory: at most 10,000 sources, 17 arrival times for each source, and 30 minutes. It starts empty when the door starts, and two door processes do not share it.
|
|
377
|
+
- **The form report.** With `challenge` and `behaviour` configured, the [form protector](#protecting-a-form-with-one-line) script also counts key presses, pointer presses, clicks, and pastes in each form, and sends the counts in `X-Agent-Custody-Form`. The script reads no field value and no key. The door removes the header before it relays the request. The report is a claim by the script in the client's browser: a program can send any report.
|
|
378
|
+
|
|
379
|
+
`agent-custody door labels` exports a labelled set from the receipts of your own door, and `agent-custody door measure` replays a labelled set through the same signal functions and prints how often each flag is wrong ([door error rates](door-error-rates.md)). Tutorial: [60-door-behaviour-signals.ts](../examples/60-door-behaviour-signals.ts).
|
|
380
|
+
|
|
355
381
|
## How an arrival becomes a Cedar request
|
|
356
382
|
|
|
357
383
|
| Cedar slot | value |
|
|
@@ -433,6 +459,7 @@ A site that already runs nginx or Envoy need not send its traffic through the do
|
|
|
433
459
|
```
|
|
434
460
|
|
|
435
461
|
- **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.
|
|
462
|
+
- **The behaviour signals.** With `behaviour` in the config, the door reads the signals from the check. The proxy selects the headers of a check, so the door records no header order and no header count, and `fingerprint.headers.mismatch` is always false. For the other signals the proxy must forward `Referer`, `Origin`, `Accept`, `Sec-Fetch-Site`, `Sec-Fetch-Mode`, `Sec-Fetch-Dest`, `Sec-Fetch-User`, `Sec-CH-UA`, `X-Agent-Custody-Form`, and the header that `behaviour.tlsHeader` names. The proxy must set the `tlsHeader` itself and replace any copy from the client. The door relays nothing in authz mode, so the proxy also passes `X-Agent-Custody-Form` to the origin unless you remove it there.
|
|
436
463
|
- **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.
|
|
437
464
|
- **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.
|
|
438
465
|
|
|
@@ -449,17 +476,19 @@ A site that already runs nginx or Envoy need not send its traffic through the do
|
|
|
449
476
|
- 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.
|
|
450
477
|
- 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.
|
|
451
478
|
- 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`.
|
|
452
|
-
- 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.
|
|
479
|
+
- 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. For `behaviour`, the stock config has `referer`, `sec-fetch-site`, `sec-fetch-mode`, `sec-fetch-dest`, and `x-agent-custody-form` in that list. It does not have the `behaviour.tlsHeader`: add the header that you named, and make Envoy set it.
|
|
453
480
|
|
|
454
481
|
## What it does not do yet
|
|
455
482
|
|
|
456
|
-
- 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
|
|
483
|
+
- 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, `rate` is a pace, and the [behaviour and fingerprint signals](#behaviour-and-fingerprint-signals) are flags that are wrong for some arrivals ([door signals](door-signals.md), [door error rates](door-error-rates.md)). No signal is a verdict.
|
|
484
|
+
- Share the history behind the timing and navigation signals between door processes, or keep it across a restart.
|
|
485
|
+
- Know the TLS fingerprint of every tool. The table behind `fingerprint.tls.knownTool` holds six fingerprints, recorded from one build each of curl, Python, Go, Node, and Bun on one machine. Another build or another tool is not in it, and the flag has no measured rate ([door error rates](door-error-rates.md)).
|
|
457
486
|
- 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.
|
|
458
487
|
- Check AP2 mandates.
|
|
459
|
-
- 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.
|
|
488
|
+
- 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 (the Worker keeps them in a Durable Object that every isolate reaches: [the door as a Cloudflare Worker](door-worker.md#web-bot-auth-nonces)). A signature agent must be listed in `agents`; the door does not fetch the directory of an origin it was not told about.
|
|
460
489
|
- Challenge an arrival with a passkey. Turnstile and hCaptcha are the providers; see [challenging a human](#challenging-a-human).
|
|
461
|
-
- 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).
|
|
490
|
+
- Bind a grant to its sender without a signature. A grant presented alone is bearer-grade; under its agent's Web Bot Auth signature, or under a signature by the key of its did:key agent, it is bound: see [presenting a passport](#what-the-door-knows-about-an-arrival).
|
|
462
491
|
- 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.
|
|
463
492
|
- 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.
|
|
464
493
|
|
|
465
|
-
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.
|
|
494
|
+
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; [56-door-worker.ts](../examples/56-door-worker.ts), the door as a Cloudflare Worker, in workerd; [58-door-error-rates.ts](../examples/58-door-error-rates.ts), the error rates; [60-door-behaviour-signals.ts](../examples/60-door-behaviour-signals.ts), the behaviour and fingerprint signals.
|
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.12
|
|
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.12` |
|
|
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/tutorials.md
CHANGED
|
@@ -64,6 +64,12 @@ Suggested reading order is the numbering. Output lands in `examples-out/`, which
|
|
|
64
64
|
| 53 | completeness from the provider's side, for GitHub | [53-completeness-github.ts](../examples/53-completeness-github.ts) | two pull requests merged through a wrapped tool and a push made with another token; the auditor lists the repository's activity with a read-only token, matches the two merges to verified receipts, and reports the push as an action with no receipt |
|
|
65
65
|
| 54 | the form protector: one script tag puts the door's challenge in front of a plain HTML form | [54-door-form.ts](../examples/54-door-form.ts) | a static site's contact form behind the door; the door serves the script built from its challenge config, without the secret; a direct post with no token is refused and never reaches the site; a post with a passing token reaches it with the receipt id; both receipts verify |
|
|
66
66
|
| 55 | a grant that names its agent by a did:key, checked at the door | [55-did-key-grant.ts](../examples/55-did-key-grant.ts) | an agent's Ed25519 key and its did:key; a principal's grant for the did:key is verified at the door; a garbled did:key, and a grant whose agentKey is another key, are claimed; nothing presented is unknown; every receipt verifies |
|
|
67
|
+
| 56 | the door as a Cloudflare Worker | [56-door-worker.ts](../examples/56-door-worker.ts) | the Worker built as `wrangler deploy` builds it and run in workerd (Miniflare): the key a secret binding, the policy and config variables, receipts to an R2 bucket and a local log over HTTP; an order with no grant refused before the origin, an order under a grant committed to the log first and relayed; both receipts verified with the Worker's public key and the log's |
|
|
68
|
+
| 57 | human in the loop: the gateway asks, a person signs from the command line, the agent retries | [57-approval-requests.ts](../examples/57-approval-requests.ts) | a refund that needs approval arrives with none and is refused, leaving a request; `agent-custody approvals list` and `show` give the approver the exact arguments, `approve` signs them with their key; the same call again is forwarded once and its receipt verifies with the approver's key; a third send, and the same refund for one penny more, are each refused and wait for a person again |
|
|
69
|
+
| 58 | published error rates for the door's signals | [58-door-error-rates.ts](../examples/58-door-error-rates.ts) | twelve kinds of arrival built to a known label (a browser, two scripts, two genuine agents, seven impostors) decided by the door core; every receipt verified and each kind scored on its own with a 95% interval: `verified` goes to the genuine agents only, and a script that presents nothing is `unknown` like the browser; an operator's label is its own row, and a receipt edited to say `verified` is skipped and moves nothing |
|
|
70
|
+
| 59 | Demo 1, the refund (API leg): the door and the gateway together | [59-refund-demo.ts](../examples/59-refund-demo.ts) | a shop with the door in front of its refund API and two payment lanes through the gateway; a shopping agent with a passport is paid £25 once, even on retry; £80, and a forged passport, are refused at the door and never reach the shop; an agent with no passport goes to a person, who approves the exact refund with `agent-custody approvals approve`, and is then paid once; an auditor with public keys and a read-only view of Stripe verifies all ten receipts and finds the £10 refund made in Stripe directly; `bun run demo:refund` |
|
|
71
|
+
| 60 | the door's behaviour and fingerprint signals, read by a policy as reasons to ask for a challenge | [60-door-behaviour-signals.ts](../examples/60-door-behaviour-signals.ts) | a door with `behaviour` and a challenge in front of a contact form; a browser's page load and form post carry no flag and pass; a tool's direct post is `directWrite`, and a script that states a browser has four flags, and each is refused with the rule's id and how to pass the challenge; a person whose address changed, and whose form page is on another host of the site, is flagged too, and passes with a challenge token; the site never receives the form report header; every receipt verified, with its flags |
|
|
72
|
+
| 61 | the false-positive rate of each door flag, measured on a labelled set | [61-door-measure.ts](../examples/61-door-measure.ts) | the labelled set recorded from real clients is replayed through the door's signal functions; each flag's false-positive rate and detection rate are printed per session and per arrival with the 95% interval; no real browser is flagged, and the interval is still wide because the set is small |
|
|
67
73
|
|
|
68
74
|
## How policies are defined, in one paragraph
|
|
69
75
|
|
package/docs/verification.md
CHANGED
|
@@ -92,7 +92,7 @@ A refused call's `execution` row carries the reason the receipt records, for exa
|
|
|
92
92
|
| egress relayed only for a checked agent | a connection that was relayed (executed, failed, or error) names an agent whose proxy credential the witness checked (`observed`) | an issuer that relayed for an unidentified agent, or a receipt re-signed to hide who it was |
|
|
93
93
|
| guardian receipt carries a policy decision | an ACS Guardian decides every step by policy | a record-only receipt relabelled as guardian |
|
|
94
94
|
| guardian decided, executed nothing | an allowed step is `withheld` (a Guardian forwards nothing) and a denied one is `denied`; the agent asked, reports the call itself, and is trusted to honor the answer ([the ACS Guardian](acs.md)) | a guardian receipt re-signed to claim the call was executed |
|
|
95
|
-
| delegation signature (principal key) | the embedded grant was signed by a key you trust as a principal | a grant the principal never issued |
|
|
95
|
+
| delegation signature (principal key) | the embedded grant was signed by a key you trust as a principal; on every link of its chain, an agent named by a did:key decodes to an Ed25519 key, and that key is the one in `agentKey` when there is one | a grant the principal never issued, a did:key that names no key, a grant whose did:key agent and `agentKey` are different keys |
|
|
96
96
|
| delegation chain to the principal | only when the grant embeds a parent: every link is signed by the key its parent names, holds no scope its parent lacks, sits inside its parent's window, and names the same principal, up to three delegations deep | a sub-agent given more than its delegator had, a link signed by the wrong key, a chain that never reaches a trusted principal |
|
|
97
97
|
| delegation binds principal and agent | the grant names the same principal and agent the receipt names, and the principal keyid matches | a valid grant for someone else, spliced in |
|
|
98
98
|
| delegation valid at receipt time | the receipt's timestamp is inside the grant's window; a call the gateway refused after the grant ran out passes with a note, since only an executed call must sit inside the window | expired or not-yet-valid authority behind an executed call |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-custody/receipts",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.12",
|
|
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",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"test": "vitest run",
|
|
71
71
|
"coverage": "vitest run --coverage.enabled",
|
|
72
72
|
"demo": "tsx scripts/demo.ts",
|
|
73
|
+
"demo:refund": "node examples/59-refund-demo.ts",
|
|
73
74
|
"vectors": "tsx scripts/vectors.ts",
|
|
74
75
|
"bench": "node scripts/hot-path-bench.ts"
|
|
75
76
|
},
|
|
@@ -91,8 +92,10 @@
|
|
|
91
92
|
"@types/node": "26.4.1",
|
|
92
93
|
"@vitest/coverage-v8": "5.0.0",
|
|
93
94
|
"ai": "7.0.93",
|
|
95
|
+
"esbuild": "0.28.2",
|
|
94
96
|
"express": "5.2.1",
|
|
95
97
|
"langchain": "1.5.15",
|
|
98
|
+
"miniflare": "4.20260730.0",
|
|
96
99
|
"tsx": "4.23.13",
|
|
97
100
|
"typescript": "7.0.2",
|
|
98
101
|
"viem": "2.57.4",
|
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": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiY2ZlZGM5OTlhYTk1NzlkNjJiNDRmODExNTE4OGIxNmEzY2FkMzgyMWFlMTA3YzhkMmQyNTUzZjliMGQzZmQ0MyIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMjJUMTQ6MTk6NDAuNTM2WiIsInRyZWVTaXplIjoxfQ==",
|
|
11
11
|
"signatures": [
|
|
12
12
|
{
|
|
13
|
-
"keyid": "
|
|
14
|
-
"sig": "
|
|
13
|
+
"keyid": "cba83036ce0162002ef1e26410ae44bdce9933cc492bfb1390ff19e403bd41a5",
|
|
14
|
+
"sig": "lJWfuvcJIewx9/qfwITtAAinAgdq6GdbE5cVEXsMdHosynIf+3XhPm2gYQlc9w4VlmnNPHzbuakT1ex0rpp3BA=="
|
|
15
15
|
}
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
18
|
"newer": {
|
|
19
19
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
20
|
-
"payload": "
|
|
20
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNTk3Y2M3OWY4OGFkM2ViMjMzZGI5NDhhNWZiOGI4NmVhZDJiYjk5NTUzMWRlMDg2NmZjZmEyNWNjM2Q0NDdiNSIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMjJUMTQ6MTk6NDAuNTQ3WiIsInRyZWVTaXplIjoyfQ==",
|
|
21
21
|
"signatures": [
|
|
22
22
|
{
|
|
23
|
-
"keyid": "
|
|
24
|
-
"sig": "
|
|
23
|
+
"keyid": "cba83036ce0162002ef1e26410ae44bdce9933cc492bfb1390ff19e403bd41a5",
|
|
24
|
+
"sig": "tCGcfIvQ6r/OIDyq8kO4peeOqu+6g/6w+zNI2GGUy8Pxt1FmEqa0n0HhHvpE6gH6lrHXUXUaCXJyCbO68jBLAA=="
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
28
|
"proof": [
|
|
29
|
-
"
|
|
29
|
+
"650d44301155700309bb186e461e1f290a474d77bfa7a20e8d222da014fff789"
|
|
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": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNTk3Y2M3OWY4OGFkM2ViMjMzZGI5NDhhNWZiOGI4NmVhZDJiYjk5NTUzMWRlMDg2NmZjZmEyNWNjM2Q0NDdiNSIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMjJUMTQ6MTk6NDAuNTQ3WiIsInRyZWVTaXplIjoyfQ==",
|
|
45
45
|
"signatures": [
|
|
46
46
|
{
|
|
47
|
-
"keyid": "
|
|
48
|
-
"sig": "
|
|
47
|
+
"keyid": "cba83036ce0162002ef1e26410ae44bdce9933cc492bfb1390ff19e403bd41a5",
|
|
48
|
+
"sig": "tCGcfIvQ6r/OIDyq8kO4peeOqu+6g/6w+zNI2GGUy8Pxt1FmEqa0n0HhHvpE6gH6lrHXUXUaCXJyCbO68jBLAA=="
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
52
|
"newer": {
|
|
53
53
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
54
|
-
"payload": "
|
|
54
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiY2ZlZGM5OTlhYTk1NzlkNjJiNDRmODExNTE4OGIxNmEzY2FkMzgyMWFlMTA3YzhkMmQyNTUzZjliMGQzZmQ0MyIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMjJUMTQ6MTk6NDAuNTM2WiIsInRyZWVTaXplIjoxfQ==",
|
|
55
55
|
"signatures": [
|
|
56
56
|
{
|
|
57
|
-
"keyid": "
|
|
58
|
-
"sig": "
|
|
57
|
+
"keyid": "cba83036ce0162002ef1e26410ae44bdce9933cc492bfb1390ff19e403bd41a5",
|
|
58
|
+
"sig": "lJWfuvcJIewx9/qfwITtAAinAgdq6GdbE5cVEXsMdHosynIf+3XhPm2gYQlc9w4VlmnNPHzbuakT1ex0rpp3BA=="
|
|
59
59
|
}
|
|
60
60
|
]
|
|
61
61
|
},
|
|
62
62
|
"proof": [
|
|
63
|
-
"
|
|
63
|
+
"650d44301155700309bb186e461e1f290a474d77bfa7a20e8d222da014fff789"
|
|
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": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiY2ZlZGM5OTlhYTk1NzlkNjJiNDRmODExNTE4OGIxNmEzY2FkMzgyMWFlMTA3YzhkMmQyNTUzZjliMGQzZmQ0MyIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMjJUMTQ6MTk6NDAuNTM2WiIsInRyZWVTaXplIjoxfQ==",
|
|
81
81
|
"signatures": [
|
|
82
82
|
{
|
|
83
|
-
"keyid": "
|
|
84
|
-
"sig": "
|
|
83
|
+
"keyid": "cba83036ce0162002ef1e26410ae44bdce9933cc492bfb1390ff19e403bd41a5",
|
|
84
|
+
"sig": "lJWfuvcJIewx9/qfwITtAAinAgdq6GdbE5cVEXsMdHosynIf+3XhPm2gYQlc9w4VlmnNPHzbuakT1ex0rpp3BA=="
|
|
85
85
|
}
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
88
|
"newer": {
|
|
89
89
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
90
|
-
"payload": "
|
|
90
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNTk3Y2M3OWY4OGFkM2ViMjMzZGI5NDhhNWZiOGI4NmVhZDJiYjk5NTUzMWRlMDg2NmZjZmEyNWNjM2Q0NDdiNSIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMjJUMTQ6MTk6NDAuNTQ3WiIsInRyZWVTaXplIjoyfQ==",
|
|
91
91
|
"signatures": [
|
|
92
92
|
{
|
|
93
|
-
"keyid": "
|
|
94
|
-
"sig": "
|
|
93
|
+
"keyid": "cba83036ce0162002ef1e26410ae44bdce9933cc492bfb1390ff19e403bd41a5",
|
|
94
|
+
"sig": "tCGcfIvQ6r/OIDyq8kO4peeOqu+6g/6w+zNI2GGUy8Pxt1FmEqa0n0HhHvpE6gH6lrHXUXUaCXJyCbO68jBLAA=="
|
|
95
95
|
}
|
|
96
96
|
]
|
|
97
97
|
},
|
|
98
98
|
"proof": [
|
|
99
|
-
"
|
|
99
|
+
"650d44301155700309bb186e461e1f290a474d77bfa7a20e8d222da014fff789"
|
|
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": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiY2ZlZGM5OTlhYTk1NzlkNjJiNDRmODExNTE4OGIxNmEzY2FkMzgyMWFlMTA3YzhkMmQyNTUzZjliMGQzZmQ0MyIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMjJUMTQ6MTk6NDAuNTM2WiIsInRyZWVTaXplIjoxfQ==",
|
|
118
118
|
"signatures": [
|
|
119
119
|
{
|
|
120
|
-
"keyid": "
|
|
121
|
-
"sig": "
|
|
120
|
+
"keyid": "cba83036ce0162002ef1e26410ae44bdce9933cc492bfb1390ff19e403bd41a5",
|
|
121
|
+
"sig": "lJWfuvcJIewx9/qfwITtAAinAgdq6GdbE5cVEXsMdHosynIf+3XhPm2gYQlc9w4VlmnNPHzbuakT1ex0rpp3BA=="
|
|
122
122
|
}
|
|
123
123
|
]
|
|
124
124
|
},
|
|
125
125
|
"newer": {
|
|
126
126
|
"payloadType": "application/vnd.agent-custody.treehead+json",
|
|
127
|
-
"payload": "
|
|
127
|
+
"payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNTk3Y2M3OWY4OGFkM2ViMjMzZGI5NDhhNWZiOGI4NmVhZDJiYjk5NTUzMWRlMDg2NmZjZmEyNWNjM2Q0NDdiNSIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMjJUMTQ6MTk6NDAuNTQ3WiIsInRyZWVTaXplIjoyfQ==",
|
|
128
128
|
"signatures": [
|
|
129
129
|
{
|
|
130
|
-
"keyid": "
|
|
131
|
-
"sig": "
|
|
130
|
+
"keyid": "cba83036ce0162002ef1e26410ae44bdce9933cc492bfb1390ff19e403bd41a5",
|
|
131
|
+
"sig": "tCGcfIvQ6r/OIDyq8kO4peeOqu+6g/6w+zNI2GGUy8Pxt1FmEqa0n0HhHvpE6gH6lrHXUXUaCXJyCbO68jBLAA=="
|
|
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-----\nMCowBQYDK2VwAyEAoqpfonMo/L9FarpoRbITeOOYYDrmr0F8A2AgtwUKy30=\n-----END PUBLIC KEY-----\n",
|
|
57
|
+
"keyid": "8121a7048fe3ebd2d69e56e2d1bf9e34954449730d398b6da8716381e3cec255"
|
|
58
58
|
},
|
|
59
59
|
"dsse": {
|
|
60
|
-
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\
|
|
60
|
+
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAoqpfonMo/L9FarpoRbITeOOYYDrmr0F8A2AgtwUKy30=\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": "8121a7048fe3ebd2d69e56e2d1bf9e34954449730d398b6da8716381e3cec255",
|
|
67
|
+
"sig": "fEGrC/jNg2VdxVnZrg8v3XJFeHtrSxQ6YxavbzOt/NStgO1OQKu3DlbnW6qJOW/y5G42zZgKuEcMU/n2sDi1CQ=="
|
|
68
68
|
}
|
|
69
69
|
]
|
|
70
70
|
},
|