attenu-guard 0.7.1 → 0.8.0
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/CHANGELOG.md +19 -0
- package/README.md +40 -0
- package/dist/cjs/cli.d.ts +4 -1
- package/dist/cjs/cli.d.ts.map +1 -1
- package/dist/cjs/cli.js +37 -3
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/evidence.d.ts +161 -1
- package/dist/cjs/evidence.d.ts.map +1 -1
- package/dist/cjs/evidence.js +605 -5
- package/dist/cjs/evidence.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +15 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/cli.d.ts +4 -1
- package/dist/esm/cli.d.ts.map +1 -1
- package/dist/esm/cli.js +37 -3
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/evidence.d.ts +161 -1
- package/dist/esm/evidence.d.ts.map +1 -1
- package/dist/esm/evidence.js +601 -5
- package/dist/esm/evidence.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,25 @@ Versions follow semantic versioning.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.8.0] - 2026-09-03
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- Observer envelopes (envelope v1), matching Python 0.13.0 byte for byte — a witness's Ed25519 signature over the IDENTITY of one committed ledger entry (`chain_id`, `node`, `seq`, `entry_hash`, `event`, and `call_id` on an allow), carried beside the ledger in a bundle's top-level `envelopes` array. `signEnvelope()`, `verifyEnvelopes()`, `envelopeSubject()`, `envelopeSigningInput()`, and `exportBundle(..., { envelopes })`. The signature is over `JCS(envelope minus "sig")`, the same canonicalization every other signed surface uses
|
|
13
|
+
- `verifyBundle()` — `witnessKeys` (the trust set: `[{kid, alg, public_key_hex}]` or a `{kid: publicKey}` record) and `envelopeBytes` (the envelope bytes as received, which only `envelope_non_canonical` needs). Per-entry state `witness-signed` / `process-asserted` in `report.envelopes`, with the report line `witness-signed (matched|not_matched|indeterminate)`; a process-asserted entry gets no result. `checks.envelopes` is `"not present"` on a bundle carrying none, which is every bundle written before this release
|
|
14
|
+
- Seven named envelope failures, in `ENVELOPE_FAILURES` and in the same `failures`/`failure_details` list as every other bundle failure: `envelope_unknown_version`, `envelope_unknown_member`, `envelope_subject_mismatch`, `envelope_duplicate_subject`, `envelope_non_canonical`, `envelope_unknown_witness`, `envelope_bad_signature`
|
|
15
|
+
- Vendored observer-envelope interop vectors (`test/fixtures/vectors/envelopes/envelope_vectors_v1.json`), revision `envelope_vectors_v1.1`, eighteen cases, copied byte for byte from the Python repository where the generator is their single writer. `test/envelope-vectors.test.ts` scores all eighteen, pins the file's sha256, and proves cross-language byte parity two ways: the witness seeds derive to the public keys the file carries, and signing the same entry with the same seed reproduces the same signature (Ed25519 is deterministic)
|
|
16
|
+
- **One entry, at most one envelope.** A second envelope naming a `subject.seq` an earlier envelope in the same array already named is `envelope_duplicate_subject` at the covered entry, and that entry reports `process-asserted` rather than `witness-signed`. Without the rule the per-entry state was written once per envelope and the last one read won, so the same bundle in the other array order scored differently and anyone able to append an envelope could decide what an earlier witness said. The first envelope's result is still reported as what that witness said. Corpus row 17, `reject_duplicate_subject`, carries two valid envelopes over one entry from two trusted witnesses, `matched` then `not_matched`
|
|
17
|
+
- `attenu-guard verify --witness-keys FILE` — the trust set for a bundle's observer envelopes, as the vector file's `[{kid, alg, public_key_hex}]` array or a whole vector case. Without it every envelope in a bundle failed `envelope_unknown_witness` and the CLI could not verify a witness-signed bundle at all; the failure still stands when no file is given, and the output now names the flag. Output and exit code match the Python CLI's, as every other verify line does
|
|
18
|
+
- **`witness.alg` is checked against the contract**, not against the trust-set row: v1 defines `EdDSA` and no other algorithm, so anything else is `envelope_unknown_witness`. `"alg": "none"` on both sides verified as witness-signed; `"HS256"` reached the Ed25519 verifier and was reported as `envelope_bad_signature`, the right verdict for the wrong reason. `witnessKeys` rows declaring another alg are refused when the trust set is built. Corpus row 18, `reject_unknown_alg`
|
|
19
|
+
- **`verifyBundle()` reports on hostile bundle content and never throws.** Every envelope member is an untrusted JSON value of any type. A `seq` that is not an integer, an `event` or a `witness.kid` that is not a string, a `sig` that is not a hex string, and a value JCS cannot represent are each a named reason at a defined position rather than a mis-found Map lookup or an exception. `v: true` was already refused here and accepted by Python, which is the other half of the same class
|
|
20
|
+
- Malformed caller inputs are refused rather than coerced: an `envelopeBytes` entry that is not hex or bytes reports `envelope_non_canonical` for that envelope; a `witnessKeys` row whose key is not 64 hex characters or 32 bytes, or whose `kid` is not a string, throws naming the kid when the trust set is built
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- Two failure strings drop a language-specific type name so both implementations report the same bytes: `subject is not a JSON object` (was `subject is str`/`subject is string`) and `<level> member set is not an object` (was the type's name). Reachable only on hostile input; no committed vector exercised either
|
|
24
|
+
- `pyRepr` renders booleans and containers the way Python's `repr` does, so a hostile value interpolated into a failure string matches across the two implementations
|
|
25
|
+
- `exportBundle({ redactTask: true, envelopes: [...] })` throws: redaction rewrites every entry hash, so envelopes signed over the unredacted ledger shipped bound to entries that no longer existed and failed `envelope_subject_mismatch`. Export the redacted bundle first, sign over ITS entries, then export again with those envelopes
|
|
26
|
+
- `test/evidence.test.ts` compares `checks` against `expected_reports.json` as a superset rather than exactly: the fixture is written by the PINNED Python release, which predates `checks.envelopes`. Every check the fixture names must still match, and the only permitted extra key is named in the test
|
|
27
|
+
|
|
9
28
|
## [0.7.1] - 2026-09-03
|
|
10
29
|
|
|
11
30
|
### Added
|
package/README.md
CHANGED
|
@@ -189,6 +189,46 @@ fewer and never elsewhere. `verifyBundle` returns those positions as
|
|
|
189
189
|
`failure_details`, the structured twin of `failures`: one
|
|
190
190
|
`{reason, seq, node, call_id, detail}` entry per string, in the same order.
|
|
191
191
|
|
|
192
|
+
`test/fixtures/vectors/envelopes/envelope_vectors_v1.json` is the third suite:
|
|
193
|
+
observer envelopes. An envelope is a witness's Ed25519 signature over the
|
|
194
|
+
IDENTITY of one committed ledger entry — `chain_id`, `node`, `seq`,
|
|
195
|
+
`entry_hash`, `event`, and `call_id` on an allow — carried beside the ledger in
|
|
196
|
+
a bundle's top-level `envelopes` array. It answers the one question the other
|
|
197
|
+
two suites cannot: was this delegation event signed by something outside the
|
|
198
|
+
process that wrote it? An envelope is never required, and a bundle without them
|
|
199
|
+
verifies exactly as before with every entry reporting `process-asserted`. A
|
|
200
|
+
present one has to verify, and a broken one lands in the same failure list under
|
|
201
|
+
one of seven named reasons. Pass the trust set as
|
|
202
|
+
`verifyBundle(bundle, signer, { witnessKeys })`, or `attenu-guard verify
|
|
203
|
+
--witness-keys FILE` from the command line; whose signatures count is yours to
|
|
204
|
+
decide, so the keys come from you and never from the bundle. The report carries
|
|
205
|
+
the per-entry state, the result and the report line — `witness-signed
|
|
206
|
+
(matched)`, and so on — for every entry, so a reader sees which hops were
|
|
207
|
+
covered before reading which one failed.
|
|
208
|
+
|
|
209
|
+
One entry, at most one envelope. A second envelope naming a `subject.seq` an
|
|
210
|
+
earlier one in the same array already named is `envelope_duplicate_subject` at
|
|
211
|
+
the covered entry, and that entry reports `process-asserted`: two observations
|
|
212
|
+
of one event contradict each other by construction, and an entry whose coverage
|
|
213
|
+
is disputed must not read as clean.
|
|
214
|
+
|
|
215
|
+
`witness.alg` is checked against the contract, not against the trust-set row.
|
|
216
|
+
v1 defines `EdDSA` and no other algorithm, so an envelope naming anything else
|
|
217
|
+
is `envelope_unknown_witness` whatever the row it is compared with happens to
|
|
218
|
+
say, and a trust-set row declaring another algorithm is refused when the trust
|
|
219
|
+
set is built.
|
|
220
|
+
|
|
221
|
+
A bundle is attacker-supplied, so `verifyBundle` reports and never throws.
|
|
222
|
+
Every envelope member is an untrusted JSON value of any type: a `seq` that is
|
|
223
|
+
not an integer, an `event` or a `witness.kid` that is not a string, a `sig`
|
|
224
|
+
that is not a hex string, and a value JCS cannot represent are each a named
|
|
225
|
+
reason at a defined position. `witnessKeys` is the one envelope input that is
|
|
226
|
+
not attacker-supplied — the deployment chose those keys — so a malformed row
|
|
227
|
+
there throws, naming its `kid`, rather than being folded into a finding about
|
|
228
|
+
the bundle. Python and TypeScript are checked against each other on a matrix of
|
|
229
|
+
hostile values in every envelope member: same verdict, same reason, same
|
|
230
|
+
position, same failure string.
|
|
231
|
+
|
|
192
232
|
## What it does not do
|
|
193
233
|
|
|
194
234
|
- It does not decide what permissions a task needs. You state them; this library
|
package/dist/cjs/cli.d.ts
CHANGED
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
* attenu-guard — command-line tool.
|
|
3
3
|
*
|
|
4
4
|
* attenu-guard verify <log.jsonl | bundle.json> [--hs256-key HEX | --pubkey HEX] [--kid KID]
|
|
5
|
+
* [--witness-keys FILE]
|
|
5
6
|
*
|
|
6
7
|
* A `.jsonl` audit log is checked for hash-chain integrity. A bundle (the
|
|
7
8
|
* output of `exportBundle`, or of the Python library's `export_bundle`) is
|
|
8
9
|
* checked for integrity, monotonicity (child ⊆ parent) and containment from the
|
|
9
10
|
* bundle alone; the signed anchor is verified when a key is given and reported
|
|
10
|
-
* as "not checked" otherwise.
|
|
11
|
+
* as "not checked" otherwise. `--witness-keys FILE` supplies the trusted witness
|
|
12
|
+
* keys for a bundle carrying observer envelopes; without it every envelope fails
|
|
13
|
+
* `envelope_unknown_witness`, and the output says which flag to pass.
|
|
11
14
|
*
|
|
12
15
|
* Exit codes: 0 = ok, 2 = a check failed, 1 = usage. The output lines match the
|
|
13
16
|
* Python CLI's, so either implementation can stand in for the other in a script.
|
package/dist/cjs/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA4GH,wBAAgB,IAAI,CAAC,IAAI,GAAE,MAAM,EAA0B,GAAG,MAAM,CAanE"}
|
package/dist/cjs/cli.js
CHANGED
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
* attenu-guard — command-line tool.
|
|
4
4
|
*
|
|
5
5
|
* attenu-guard verify <log.jsonl | bundle.json> [--hs256-key HEX | --pubkey HEX] [--kid KID]
|
|
6
|
+
* [--witness-keys FILE]
|
|
6
7
|
*
|
|
7
8
|
* A `.jsonl` audit log is checked for hash-chain integrity. A bundle (the
|
|
8
9
|
* output of `exportBundle`, or of the Python library's `export_bundle`) is
|
|
9
10
|
* checked for integrity, monotonicity (child ⊆ parent) and containment from the
|
|
10
11
|
* bundle alone; the signed anchor is verified when a key is given and reported
|
|
11
|
-
* as "not checked" otherwise.
|
|
12
|
+
* as "not checked" otherwise. `--witness-keys FILE` supplies the trusted witness
|
|
13
|
+
* keys for a bundle carrying observer envelopes; without it every envelope fails
|
|
14
|
+
* `envelope_unknown_witness`, and the output says which flag to pass.
|
|
12
15
|
*
|
|
13
16
|
* Exit codes: 0 = ok, 2 = a check failed, 1 = usage. The output lines match the
|
|
14
17
|
* Python CLI's, so either implementation can stand in for the other in a script.
|
|
@@ -22,10 +25,31 @@ const wire_js_1 = require("./wire.js");
|
|
|
22
25
|
const USAGE = `attenu-guard — command-line tool.
|
|
23
26
|
|
|
24
27
|
attenu-guard verify <log.jsonl | bundle.json> [--hs256-key HEX | --pubkey HEX] [--kid KID]
|
|
28
|
+
[--witness-keys FILE]
|
|
25
29
|
verify a hash-chained audit log, or an evidence bundle
|
|
26
30
|
(integrity · child ⊆ parent · containment;
|
|
27
|
-
--hs256-key/--pubkey checks the anchor
|
|
31
|
+
--hs256-key/--pubkey checks the anchor;
|
|
32
|
+
--witness-keys FILE supplies the trusted observer-envelope keys)
|
|
28
33
|
`;
|
|
34
|
+
/**
|
|
35
|
+
* The trust set for a bundle's observer envelopes, read from `--witness-keys FILE`.
|
|
36
|
+
*
|
|
37
|
+
* The file is the `witness_keys` array the interop vectors carry — `[{kid, alg,
|
|
38
|
+
* public_key_hex}]` — or one whole vector case, in which case its `witness_keys` member is used.
|
|
39
|
+
* Without a trust set every envelope in a bundle fails `envelope_unknown_witness`, which is
|
|
40
|
+
* correct (an unknown key is not a trusted one) and useless as a default, so this is how a bundle
|
|
41
|
+
* carrying envelopes is verified from the command line.
|
|
42
|
+
*/
|
|
43
|
+
function readWitnessKeys(path) {
|
|
44
|
+
let parsed = JSON.parse((0, node_fs_1.readFileSync)(path, "utf8"));
|
|
45
|
+
if (parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) && "witness_keys" in parsed) {
|
|
46
|
+
parsed = parsed["witness_keys"];
|
|
47
|
+
}
|
|
48
|
+
if (!Array.isArray(parsed)) {
|
|
49
|
+
throw new Error(`${path}: expected a list of {kid, alg, public_key_hex}, got ${typeof parsed}`);
|
|
50
|
+
}
|
|
51
|
+
return parsed;
|
|
52
|
+
}
|
|
29
53
|
/** Render a boolean the way Python does, so the two CLIs print the same line. */
|
|
30
54
|
function py(value) {
|
|
31
55
|
return value ? "True" : "False";
|
|
@@ -35,6 +59,7 @@ function verify(args) {
|
|
|
35
59
|
let keyHex = null;
|
|
36
60
|
let pubHex = null;
|
|
37
61
|
let kid = null;
|
|
62
|
+
let witnessPath = null;
|
|
38
63
|
for (let i = 0; i < args.length; i++) {
|
|
39
64
|
const a = args[i];
|
|
40
65
|
if (a === "--hs256-key")
|
|
@@ -43,6 +68,8 @@ function verify(args) {
|
|
|
43
68
|
pubHex = args[++i] ?? null;
|
|
44
69
|
else if (a === "--kid")
|
|
45
70
|
kid = args[++i] ?? null;
|
|
71
|
+
else if (a === "--witness-keys")
|
|
72
|
+
witnessPath = args[++i] ?? null;
|
|
46
73
|
else if (path === null)
|
|
47
74
|
path = a;
|
|
48
75
|
}
|
|
@@ -71,13 +98,20 @@ function verify(args) {
|
|
|
71
98
|
else if (pubHex) {
|
|
72
99
|
signer = new wire_js_1.Ed25519Verifier(Buffer.from(pubHex, "hex"), kid ?? anchorKid ?? "k1");
|
|
73
100
|
}
|
|
74
|
-
const
|
|
101
|
+
const witnessKeys = witnessPath === null ? null : readWitnessKeys(witnessPath);
|
|
102
|
+
const rep = (0, evidence_js_1.verifyBundle)(bundle, signer, { witnessKeys });
|
|
75
103
|
const c = rep.checks;
|
|
76
104
|
process.stdout.write(`integrity=${py(c.integrity)} monotonicity=${py(c.monotonicity)} ` +
|
|
77
105
|
`containment=${py(c.containment)} anchor=${c.anchor} ` +
|
|
78
106
|
`nodes=${rep.nodes} actions_checked=${rep.actions_checked}\n`);
|
|
79
107
|
for (const f of rep.failures)
|
|
80
108
|
process.stdout.write(` - ${f}\n`);
|
|
109
|
+
// A bundle carrying envelopes and no trust set fails every one of them, correctly and
|
|
110
|
+
// unhelpfully: the keys are the caller's to supply and nothing in the bundle can stand in
|
|
111
|
+
// for them. The failure stands; the line says how to make the run meaningful.
|
|
112
|
+
if ((bundle.envelopes?.length ?? 0) > 0 && witnessKeys === null) {
|
|
113
|
+
process.stdout.write("hint: pass --witness-keys FILE to supply the trusted witness keys\n");
|
|
114
|
+
}
|
|
81
115
|
process.stdout.write(rep.ok ? "OK\n" : "FAILED\n");
|
|
82
116
|
return rep.ok ? 0 : 2;
|
|
83
117
|
}
|
package/dist/cjs/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AAAA;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AAC,CAAC;IAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,OAAO,CAAC,CAAC;AACX,CAAC"}
|
package/dist/cjs/evidence.d.ts
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
*/
|
|
33
33
|
import { type CJson, type Json } from "./canonical.js";
|
|
34
34
|
import { AuditLog, type Anchor, type LedgerEntry } from "./audit.js";
|
|
35
|
-
import type
|
|
35
|
+
import { type Signer } from "./wire.js";
|
|
36
36
|
/**
|
|
37
37
|
* The COMPLETE set of top-level ledger field names the library emits. Custody
|
|
38
38
|
* guarantee: an exported bundle may carry ONLY these — an unknown field is
|
|
@@ -76,6 +76,12 @@ export interface Bundle {
|
|
|
76
76
|
anchor: Anchor;
|
|
77
77
|
redaction: RedactionReport;
|
|
78
78
|
note: string;
|
|
79
|
+
/**
|
|
80
|
+
* Observer envelopes, when the bundle carries any: a witness's signature over the identity of
|
|
81
|
+
* a ledger entry. Omitted entirely when there are none, so a bundle without them is
|
|
82
|
+
* byte-for-byte what `exportBundle` has always produced.
|
|
83
|
+
*/
|
|
84
|
+
envelopes?: Envelope[];
|
|
79
85
|
}
|
|
80
86
|
/**
|
|
81
87
|
* Every top-level field must be in `LEDGER_FIELDS`; if `contextAllowlist` is
|
|
@@ -93,6 +99,12 @@ export interface ExportOptions {
|
|
|
93
99
|
redactTask?: boolean;
|
|
94
100
|
/** Throw `EvidenceLeakError` on any field outside the allow-list. */
|
|
95
101
|
strict?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Observer envelopes (`signEnvelope`) to carry beside the ledger. Omitted from the bundle
|
|
104
|
+
* entirely when absent or empty, so a bundle without them is unchanged. Cannot be combined
|
|
105
|
+
* with `redactTask` in one call: sign over the redacted ledger the export produces.
|
|
106
|
+
*/
|
|
107
|
+
envelopes?: readonly Envelope[] | null;
|
|
96
108
|
}
|
|
97
109
|
/**
|
|
98
110
|
* A self-contained evidence bundle: the full ledger plus a signed anchor over
|
|
@@ -104,6 +116,12 @@ export interface ExportOptions {
|
|
|
104
116
|
* only ever removes. With `strict`, the bundle is checked against
|
|
105
117
|
* `LEDGER_FIELDS` (and `contextAllowlist` if given) and an `EvidenceLeakError`
|
|
106
118
|
* is thrown on any field outside it.
|
|
119
|
+
*
|
|
120
|
+
* ORDER MATTERS with `redactTask`: redaction rewrites every entry hash, so envelopes signed
|
|
121
|
+
* over the unredacted ledger no longer bind to the entries that ship and would all fail
|
|
122
|
+
* `envelope_subject_mismatch`. Giving both throws `Error` rather than exporting a bundle that
|
|
123
|
+
* cannot verify. Export the redacted bundle first, then `signEnvelope` over ITS entries, then
|
|
124
|
+
* export again with those envelopes.
|
|
107
125
|
*/
|
|
108
126
|
export declare function exportBundle(auditLog: AuditLog | readonly LedgerEntry[], signer: Signer, options?: ExportOptions): Bundle;
|
|
109
127
|
/**
|
|
@@ -175,7 +193,132 @@ export interface VerifyChecks {
|
|
|
175
193
|
chain_id: boolean;
|
|
176
194
|
root: boolean;
|
|
177
195
|
expected_anchor: "not checked" | "verified" | "FAILED";
|
|
196
|
+
/**
|
|
197
|
+
* `"not present"` on a bundle with no `envelopes` array, which is every bundle written before
|
|
198
|
+
* observer envelopes existed. Like `anchor`, it is a status string rather than a pass/fail
|
|
199
|
+
* boolean, and a failed envelope already lands its own entry in `failures`.
|
|
200
|
+
*/
|
|
201
|
+
envelopes: "not present" | "verified" | "FAILED";
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* The only envelope version this build knows. The version commits the exact signed member set of
|
|
205
|
+
* the WHOLE envelope, the subject included, so a member added anywhere is a new version and the
|
|
206
|
+
* digest cannot widen silently.
|
|
207
|
+
*/
|
|
208
|
+
export declare const ENVELOPE_VERSION = 1;
|
|
209
|
+
/** The only `typ` at v1. A different one is a different contract, not a different envelope. */
|
|
210
|
+
export declare const ENVELOPE_TYP = "delegation-event-observation";
|
|
211
|
+
/** The envelope's own member set at v1. */
|
|
212
|
+
export declare const ENVELOPE_MEMBERS: ReadonlySet<string>;
|
|
213
|
+
/**
|
|
214
|
+
* The subject member set, keyed by `event`. v1 defines a subject for `spawn` and `allow` and for
|
|
215
|
+
* no other event. `entry_hash` is the BINDING member — the only evidence of WHICH entry the
|
|
216
|
+
* witness signed — and the rest are locators, whose job is to find the entry without hashing
|
|
217
|
+
* every entry.
|
|
218
|
+
*/
|
|
219
|
+
export declare const ENVELOPE_SUBJECT_MEMBERS: ReadonlyMap<string, ReadonlySet<string>>;
|
|
220
|
+
/**
|
|
221
|
+
* `observed.result`'s closed vocabulary. `not_matched` requires evidence that CONTRADICTS the
|
|
222
|
+
* event; `indeterminate` is the residual state, and covers thin or absent evidence. No verifier
|
|
223
|
+
* decision turns on the result: it is reported next to the state, never instead of it.
|
|
224
|
+
*/
|
|
225
|
+
export declare const ENVELOPE_RESULTS: readonly ["matched", "not_matched", "indeterminate"];
|
|
226
|
+
export type EnvelopeResult = (typeof ENVELOPE_RESULTS)[number];
|
|
227
|
+
/** The JOSE identifier for Ed25519, and the only `witness.alg` v1 defines. */
|
|
228
|
+
export declare const ENVELOPE_ALG = "EdDSA";
|
|
229
|
+
/**
|
|
230
|
+
* A verifying envelope's state. It says where the signature came from and NOTHING about
|
|
231
|
+
* authority — the witness is whoever holds the key `witness.kid` names, which nothing in the
|
|
232
|
+
* envelope makes the delegation parent.
|
|
233
|
+
*/
|
|
234
|
+
export declare const WITNESS_SIGNED = "witness-signed";
|
|
235
|
+
/**
|
|
236
|
+
* No envelope, or one that does not verify. It covers two facts a bundle does not separate — a
|
|
237
|
+
* hop nobody undertook to cover, and a hop a witness undertook to cover and never did — and v1
|
|
238
|
+
* takes the weaker reading of the two.
|
|
239
|
+
*/
|
|
240
|
+
export declare const PROCESS_ASSERTED = "process-asserted";
|
|
241
|
+
export type EnvelopeState = typeof WITNESS_SIGNED | typeof PROCESS_ASSERTED;
|
|
242
|
+
/** The seven named envelope failures, in the order this build checks them. */
|
|
243
|
+
export declare const ENVELOPE_FAILURES: readonly ["envelope_unknown_version", "envelope_unknown_member", "envelope_subject_mismatch", "envelope_duplicate_subject", "envelope_non_canonical", "envelope_unknown_witness", "envelope_bad_signature"];
|
|
244
|
+
/** One observer envelope, as it appears in `bundle.envelopes`. */
|
|
245
|
+
export interface Envelope {
|
|
246
|
+
v: number;
|
|
247
|
+
typ: string;
|
|
248
|
+
subject: Record<string, CJson>;
|
|
249
|
+
observed: Record<string, CJson>;
|
|
250
|
+
witness: Record<string, CJson>;
|
|
251
|
+
sig: string;
|
|
252
|
+
}
|
|
253
|
+
/** One trusted witness key, in the shape the vector file carries. */
|
|
254
|
+
export interface WitnessKey {
|
|
255
|
+
kid: string;
|
|
256
|
+
alg: string;
|
|
257
|
+
public_key_hex: string;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* The bytes a witness signs: `JCS(envelope minus its "sig" member)`.
|
|
261
|
+
*
|
|
262
|
+
* The same RFC 8785 canonicalization the ledger has signed with since 0.7.0 — one
|
|
263
|
+
* implementation, not a second one for envelopes.
|
|
264
|
+
*/
|
|
265
|
+
export declare function envelopeSigningInput(envelope: Record<string, CJson>): Buffer;
|
|
266
|
+
/**
|
|
267
|
+
* The v1 subject for the entry at `seq`, recomputed from the ledger.
|
|
268
|
+
*
|
|
269
|
+
* Throws when `seq` names no entry, or names one whose `event` v1 defines no subject for.
|
|
270
|
+
*/
|
|
271
|
+
export declare function envelopeSubject(entries: readonly LedgerEntry[], seq: number): Record<string, CJson>;
|
|
272
|
+
/** What a witness asserts about the event it signed. */
|
|
273
|
+
export interface Observation {
|
|
274
|
+
result?: EnvelopeResult;
|
|
275
|
+
at: string;
|
|
276
|
+
method: string;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* An observer envelope over the entry at `seq`, signed with the 32-byte Ed25519 `seed`.
|
|
280
|
+
*
|
|
281
|
+
* `entries` is the ledger the subject is recomputed from — a witness signs the identity of an
|
|
282
|
+
* entry that already exists, never a claim it composes itself. That makes the ledger it is
|
|
283
|
+
* signed over part of the signature: sign over the entries AS THEY WILL SHIP. With
|
|
284
|
+
* `exportBundle({redactTask: true})` those are the redacted entries, so export first and sign
|
|
285
|
+
* over the exported bundle's `entries` — `exportBundle` refuses to redact and carry envelopes in
|
|
286
|
+
* one call for exactly this reason.
|
|
287
|
+
*/
|
|
288
|
+
export declare function signEnvelope(entries: readonly LedgerEntry[], seq: number, seed: Buffer, kid: string, observed: Observation): Envelope;
|
|
289
|
+
/** What `verifyEnvelopes` and `verifyBundle`'s `envelopes` field report. */
|
|
290
|
+
export interface EnvelopeSummary {
|
|
291
|
+
status: "verified" | "FAILED" | "not present";
|
|
292
|
+
count: number;
|
|
293
|
+
/** The seqs a verifying envelope covers, ascending. */
|
|
294
|
+
witness_signed: number[];
|
|
295
|
+
/** Every entry's seq -> its state. Coverage is explicit, never assumed dense. */
|
|
296
|
+
states: Record<string, EnvelopeState>;
|
|
297
|
+
/** The `observed.result` of each witness-signed entry. */
|
|
298
|
+
results: Record<string, Json>;
|
|
299
|
+
/** The report line for each entry: `witness-signed (matched)`, or `process-asserted`. */
|
|
300
|
+
lines: Record<string, string>;
|
|
301
|
+
failures: string[];
|
|
302
|
+
}
|
|
303
|
+
export interface VerifyEnvelopesOptions {
|
|
304
|
+
/** The trust set: the vector file's `witness_keys`, or a `{kid: publicKey}` record. */
|
|
305
|
+
witnessKeys?: readonly WitnessKey[] | Record<string, Buffer | string> | null;
|
|
306
|
+
/**
|
|
307
|
+
* The envelope bytes AS RECEIVED, positionally aligned with `bundle.envelopes` (entries may be
|
|
308
|
+
* null). Only `envelope_non_canonical` needs them, and only where a deployment kept them.
|
|
309
|
+
*/
|
|
310
|
+
envelopeBytes?: readonly (Buffer | string | null)[] | null;
|
|
178
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* Score a bundle's observer envelopes on their own, without the ledger checks.
|
|
314
|
+
*
|
|
315
|
+
* Returns `{ok, ...summary, failure_details}`. `states` maps every entry's seq to
|
|
316
|
+
* `witness-signed` or `process-asserted`; `lines` is the report line for each.
|
|
317
|
+
*/
|
|
318
|
+
export declare function verifyEnvelopes(bundle: Partial<Bundle>, options?: VerifyEnvelopesOptions): EnvelopeSummary & {
|
|
319
|
+
ok: boolean;
|
|
320
|
+
failure_details: FailureDetail[];
|
|
321
|
+
};
|
|
179
322
|
export type ExecutionBinding = {
|
|
180
323
|
status: "not applicable";
|
|
181
324
|
failures?: string[];
|
|
@@ -200,6 +343,11 @@ export interface VerifyReport {
|
|
|
200
343
|
actions_checked: number;
|
|
201
344
|
chain_id: Json;
|
|
202
345
|
execution_binding: ExecutionBinding;
|
|
346
|
+
/**
|
|
347
|
+
* The observer-envelope layer: the per-entry state for EVERY entry, the result and report line
|
|
348
|
+
* for each, and the failures (which are also in `failures`/`failure_details`).
|
|
349
|
+
*/
|
|
350
|
+
envelopes: EnvelopeSummary;
|
|
203
351
|
/** Which anchor mode this verification ran against. */
|
|
204
352
|
verified_against: "expected_anchor" | "bundle_anchor";
|
|
205
353
|
}
|
|
@@ -230,6 +378,18 @@ export interface VerifyBundleOptions {
|
|
|
230
378
|
expectedAnchor?: Record<string, CJson> | Anchor | null;
|
|
231
379
|
/** An independently retained `[seq, hash]` to verify the bundle's actual head against. */
|
|
232
380
|
expectedHead?: readonly [number, string] | null;
|
|
381
|
+
/**
|
|
382
|
+
* The trust set for the bundle's observer envelopes, if it carries any: the vector file's
|
|
383
|
+
* `[{kid, alg, public_key_hex}]` shape, or a `{kid: publicKey}` record. Absent is an EMPTY
|
|
384
|
+
* trust set, not a skipped check — an envelope naming a key nobody trusts is
|
|
385
|
+
* `envelope_unknown_witness`.
|
|
386
|
+
*/
|
|
387
|
+
witnessKeys?: readonly WitnessKey[] | Record<string, Buffer | string> | null;
|
|
388
|
+
/**
|
|
389
|
+
* The envelope bytes AS RECEIVED, positionally aligned with `bundle.envelopes`. Only
|
|
390
|
+
* `envelope_non_canonical` needs them, and only where a deployment kept them.
|
|
391
|
+
*/
|
|
392
|
+
envelopeBytes?: readonly (Buffer | string | null)[] | null;
|
|
233
393
|
}
|
|
234
394
|
export declare function verifyBundle(bundle: Partial<Bundle>, signer?: Signer | null, options?: VerifyBundleOptions): VerifyReport;
|
|
235
395
|
/** Read a bundle from JSON text, keeping every number's original literal. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../src/evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../src/evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAQL,KAAK,KAAK,EACV,KAAK,IAAI,EACV,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,QAAQ,EAAiD,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAKpH,OAAO,EAAkC,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAExE;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CAuC5C,CAAC;AAEH;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,OAAO,CAAC;IACZ,UAAU,EAAE,kBAAkB,EAAE,CAAC;CAClC;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,CAAmB,CAAC;AAe9E,MAAM,WAAW,MAAM;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,IAAI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