@agledger/cli 1.5.0 → 2.1.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/README.md +102 -9
- package/SKILL.md +10 -8
- package/dist/api-client.js +1 -1
- package/dist/base.d.ts +40 -4
- package/dist/base.js +149 -27
- package/dist/commands/api.js +4 -3
- package/dist/commands/login.d.ts +1 -0
- package/dist/commands/login.js +7 -1
- package/dist/commands/logout.d.ts +2 -1
- package/dist/commands/logout.js +35 -11
- package/dist/commands/verify.d.ts +51 -1
- package/dist/commands/verify.js +335 -25
- package/dist/oidc.js +1 -1
- package/oclif.manifest.json +58 -11
- package/package.json +4 -4
package/dist/commands/verify.js
CHANGED
|
@@ -1,6 +1,53 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
1
2
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import { verifyAuditExport, } from '@agledger/verify-core';
|
|
3
|
+
import { assertNotPinnedAndDistrusted, parseDistrustedKeys, parseTrustAnchors, verifyAuditExport, normalizeFederationKey, } from '@agledger/verify-core';
|
|
3
4
|
import { BaseCommand, ErrorCode, ExitCode } from '../base.js';
|
|
5
|
+
/**
|
|
6
|
+
* verify-core words a finding, note or failure for a library caller, so its
|
|
7
|
+
* advice names options (`give distrustedKeys sha256:<hex>@<instant>`, `pin
|
|
8
|
+
* sha256:<hex> in trustAnchors`). Here they are flags, so the report names the flag, in the
|
|
9
|
+
* words `@agledger/verify` prints; verify-core's own result is left as it is.
|
|
10
|
+
*/
|
|
11
|
+
const OPTION_FLAGS = [
|
|
12
|
+
[/\badd (sha256:[0-9a-f]{64}) to distrustedKeys\b/g, 'add --distrusted-key $1'],
|
|
13
|
+
[/\bis in distrustedKeys\b/g, 'is given as a --distrusted-key'],
|
|
14
|
+
[/\bin trustAnchors\b/g, 'with --trust-anchor'],
|
|
15
|
+
[/\bNo trustAnchors were given\b/g, 'No --trust-anchor was given'],
|
|
16
|
+
[/\bdistrustedKeys\b/g, '--distrusted-key'],
|
|
17
|
+
[/\btrustAnchors\b/g, '--trust-anchor'],
|
|
18
|
+
[/\brequireSuppliedKeys\b/g, '--require-supplied-keys'],
|
|
19
|
+
[/\brequireKeyId\b/g, '--require-key-id'],
|
|
20
|
+
[/\bagentKeys\b/g, '--agent-keys'],
|
|
21
|
+
[/\bfederationKeys\[\d+\]\.history\b/g, '--federation-key-history'],
|
|
22
|
+
[/\bfederationKeys\[\d+\]/g, '--federation-key'],
|
|
23
|
+
[/\bfederationKeys\b/g, '--federation-key'],
|
|
24
|
+
];
|
|
25
|
+
/** One prose string from a result, its option names given as this command's flags. */
|
|
26
|
+
export function flagWording(text) {
|
|
27
|
+
return OPTION_FLAGS.reduce((s, [pattern, flag]) => s.replace(pattern, flag), text);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A result with its prose worded by {@link flagWording}: `brokenAt.detail`,
|
|
31
|
+
* each entry's detail, and the key-trust detail and each finding, note and
|
|
32
|
+
* accounted-for detail. Ids, digests and instants are data and pass through.
|
|
33
|
+
*/
|
|
34
|
+
export function resultWithFlags(result) {
|
|
35
|
+
const detail = (item) => item.detail === undefined ? item : { ...item, detail: flagWording(item.detail) };
|
|
36
|
+
const prose = (item) => ({ ...item, detail: flagWording(item.detail) });
|
|
37
|
+
const trust = result.keyTrust;
|
|
38
|
+
return {
|
|
39
|
+
...result,
|
|
40
|
+
...(result.brokenAt ? { brokenAt: detail(result.brokenAt) } : {}),
|
|
41
|
+
entries: result.entries.map(detail),
|
|
42
|
+
keyTrust: {
|
|
43
|
+
...trust,
|
|
44
|
+
detail: flagWording(trust.detail),
|
|
45
|
+
findings: trust.findings.map(prose),
|
|
46
|
+
notes: trust.notes.map(prose),
|
|
47
|
+
accounted: trust.accounted.map(prose),
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
}
|
|
4
51
|
/**
|
|
5
52
|
* Offline verification of a record audit export (format 2.0, COSE_Sign1).
|
|
6
53
|
* Runs entirely offline: no network calls, no API key required. The
|
|
@@ -11,27 +58,55 @@ import { BaseCommand, ErrorCode, ExitCode } from '../base.js';
|
|
|
11
58
|
export default class Verify extends BaseCommand {
|
|
12
59
|
static description = 'Verify a record audit export offline (COSE_Sign1 envelope, RFC 9052; Ed25519 or ES256).';
|
|
13
60
|
static examples = [
|
|
61
|
+
'<%= config.bin %> verify audit-export.json --trust-anchor sha256:<64 hex>',
|
|
14
62
|
'<%= config.bin %> verify audit-export.json',
|
|
15
63
|
'<%= config.bin %> verify audit-export.json --keys vault-keys.json',
|
|
16
64
|
'<%= config.bin %> verify audit-export.json --agent-keys agent-jwks.json',
|
|
65
|
+
'<%= config.bin %> verify audit-export.json --federation-key hub-b=MCowBQYDK2VwAyEA...',
|
|
17
66
|
'<%= config.bin %> verify audit-export.json --json',
|
|
18
67
|
'cat audit-export.json | <%= config.bin %> verify -',
|
|
19
68
|
];
|
|
69
|
+
// FILE is required, but checked in run() rather than by oclif: oclif's own
|
|
70
|
+
// missing-arg error tells the caller to put arguments before every
|
|
71
|
+
// repeatable flag, which is not true of non-greedy ones, and lists hidden
|
|
72
|
+
// flags with them.
|
|
73
|
+
static usage = 'verify FILE [--trust-anchor <value>...] [--distrusted-key <value>...] [--keys <value>] [--agent-keys <value>] [--federation-key <value>...] [--require-key-id <value>] [--require-supplied-keys] [--json] [--quiet]';
|
|
20
74
|
static args = {
|
|
21
75
|
file: Args.string({
|
|
22
76
|
description: 'Path to the audit export JSON file (or "-" for stdin).',
|
|
23
|
-
required: true,
|
|
24
77
|
}),
|
|
25
78
|
};
|
|
26
79
|
static flags = {
|
|
27
80
|
json: BaseCommand.baseFlags.json,
|
|
28
81
|
quiet: BaseCommand.baseFlags.quiet,
|
|
29
82
|
keys: Flags.string({
|
|
30
|
-
description: 'Path to a JSON file holding
|
|
83
|
+
description: 'Path to a JSON file holding public keys you supply. Accepts a ' +
|
|
31
84
|
'{keyId: SPKI-DER-base64} map, a [{keyId, publicKey, ...}] list, or the ' +
|
|
32
85
|
'raw GET /v1/verification-keys response envelope ({data:[...], ...}, the ' +
|
|
33
|
-
'.data array is unwrapped automatically
|
|
34
|
-
'in the export.'
|
|
86
|
+
'.data array is unwrapped automatically, and each key\'s signed statements ' +
|
|
87
|
+
'are walked with --trust-anchor). Merged over any keys embedded in the export. ' +
|
|
88
|
+
'Where a key came from is not whether it is trusted: that is --trust-anchor.',
|
|
89
|
+
}),
|
|
90
|
+
'trust-anchor': Flags.string({
|
|
91
|
+
multiple: true,
|
|
92
|
+
multipleNonGreedy: true,
|
|
93
|
+
description: 'sha256:<64 hex> SPKI digest of a vault key you took out of band (the installer prints the ' +
|
|
94
|
+
'first vault key\'s; the Server\'s signing-key-digest.js derives one from any key you hold). ' +
|
|
95
|
+
'The signed key statements the export carries are walked from it: an entry signed by a key ' +
|
|
96
|
+
'the walk does not reach fails CHAIN_SIGNING_KEY_UNANCHORED, and a statement that does not ' +
|
|
97
|
+
'hold fails KEY_STATEMENT_INVALID, KEY_CLOSURE_INVALID or CHAIN_KEY_WINDOW_DRIFT. Without ' +
|
|
98
|
+
'one, a pass rests on keys nobody pinned. Repeatable.',
|
|
99
|
+
}),
|
|
100
|
+
'distrusted-key': Flags.string({
|
|
101
|
+
multiple: true,
|
|
102
|
+
multipleNonGreedy: true,
|
|
103
|
+
description: 'sha256:<64 hex>, optionally @<RFC 3339 instant>: a key the operator distrusts, as in the ' +
|
|
104
|
+
'Server\'s VAULT_DISTRUSTED_KEYS. What it signed from that instant (with none, from its ' +
|
|
105
|
+
'retirement) counts for nothing in the walk. Requires --trust-anchor. A dated entry may name a ' +
|
|
106
|
+
'key also given to --trust-anchor, which then vouches for what it signed before the instant. Where an ' +
|
|
107
|
+
'export lists a key retired at the instant the Server distrusts it from (distrustedFrom), earlier than ' +
|
|
108
|
+
'its signed retirement, a run without the same entry fails on that window, and the finding names the ' +
|
|
109
|
+
'--distrusted-key to confirm with the Server\'s operator. Repeatable.',
|
|
35
110
|
}),
|
|
36
111
|
'agent-keys': Flags.string({
|
|
37
112
|
description: 'Path to a JSON file holding Ed25519 public keys of agent certs: a JWK, a list of JWKs, ' +
|
|
@@ -40,18 +115,95 @@ export default class Verify extends BaseCommand {
|
|
|
40
115
|
'of them by thumbprint has that signature re-verified offline, and fails ' +
|
|
41
116
|
'CHAIN_AGENT_SIGNATURE_INVALID if it does not verify.',
|
|
42
117
|
}),
|
|
118
|
+
'federation-key': Flags.string({
|
|
119
|
+
multiple: true,
|
|
120
|
+
multipleNonGreedy: true,
|
|
121
|
+
description: '<hubId>=<key>: a peer Server\'s Ed25519 federation key as its operator gives it (base64 SPKI DER, ' +
|
|
122
|
+
'or base64 of the raw 32 bytes the handshake registered). A receiving Server seals each peer message ' +
|
|
123
|
+
'it accepts on the chain entry it writes (payload.wire), as the peer signed it. Every sealed message is ' +
|
|
124
|
+
'held to its body hash and to its entry; one from a hub given here also has its signature re-verified ' +
|
|
125
|
+
'under that key, which proves what the peer asserted from this export alone. A failure is ' +
|
|
126
|
+
'CHAIN_FEDERATION_WIRE_INVALID. Repeatable, once per peer; name a hub twice to pin a second key ' +
|
|
127
|
+
'no succession links to the first: one its history lists linked: false, or one it does not list at all.',
|
|
128
|
+
}),
|
|
129
|
+
'federation-key-history': Flags.string({
|
|
130
|
+
multiple: true,
|
|
131
|
+
multipleNonGreedy: true,
|
|
132
|
+
description: 'Path to a peer\'s federation key history, the JSON its GET /.well-known/agledger-federation-keys.json serves ' +
|
|
133
|
+
'(no auth). Needs a --federation-key for the same hub: every key the history links to that key through ' +
|
|
134
|
+
'successions both keys signed is trusted inside its window, so entries sealed before the peer changed its ' +
|
|
135
|
+
'federation key verify. Each message is placed by its signed wire.timestamp, never by the unsigned ' +
|
|
136
|
+
'createdAt: one signed under a key before the key\'s activation fails; one signed after its retirement is ' +
|
|
137
|
+
'reported as after retirement. Repeatable.',
|
|
138
|
+
}),
|
|
43
139
|
'require-key-id': Flags.string({
|
|
44
140
|
description: 'Require every entry to reference this keyId. Rejects otherwise-valid exports ' +
|
|
45
141
|
'signed by a retired or unexpected key.',
|
|
46
142
|
}),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
143
|
+
// Refused by name, as @agledger/verify and the Python agledger-verify
|
|
144
|
+
// refuse them, rather than as an unknown flag.
|
|
145
|
+
'distrusted-keys': Flags.string({ hidden: true }),
|
|
146
|
+
'require-out-of-band-keys': Flags.boolean({ hidden: true, default: false }),
|
|
147
|
+
'require-supplied-keys': Flags.boolean({
|
|
148
|
+
description: 'Refuse keys embedded in the export: an entry whose only key is export-embedded fails ' +
|
|
149
|
+
'CHAIN_KEY_POLICY_VIOLATION, so every signature is checked against a key from --keys.',
|
|
50
150
|
default: false,
|
|
51
151
|
}),
|
|
52
152
|
};
|
|
53
153
|
async run() {
|
|
54
154
|
const { args, flags } = await this.parse(Verify);
|
|
155
|
+
if (flags['distrusted-keys'] !== undefined) {
|
|
156
|
+
this.failWith(ErrorCode.INVALID_FIELD, '--distrusted-keys is now --distrusted-key, given once per key: --distrusted-key sha256:<hex>[@<RFC 3339 instant>].', ExitCode.USAGE_ERROR);
|
|
157
|
+
}
|
|
158
|
+
if (flags['require-out-of-band-keys']) {
|
|
159
|
+
this.failWith(ErrorCode.INVALID_FIELD, '--require-out-of-band-keys is now --require-supplied-keys: a key fetched from the Server is supplied, not independent of it. Pin --trust-anchor for that.', ExitCode.USAGE_ERROR);
|
|
160
|
+
}
|
|
161
|
+
// Checked in the order @agledger/verify and the Python agledger-verify
|
|
162
|
+
// check them, with the same messages and exit code, and before the export
|
|
163
|
+
// is read: a mistyped pin is a usage error, never a verdict.
|
|
164
|
+
const trustAnchors = flags['trust-anchor'] ?? [];
|
|
165
|
+
const distrustedKeys = flags['distrusted-key'] ?? [];
|
|
166
|
+
try {
|
|
167
|
+
parseTrustAnchors(trustAnchors);
|
|
168
|
+
parseDistrustedKeys(distrustedKeys);
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
if (err instanceof TypeError) {
|
|
172
|
+
this.failWith(ErrorCode.INVALID_FIELD, err.message
|
|
173
|
+
.replace(/^trustAnchors entry /, '--trust-anchor ')
|
|
174
|
+
.replace(/^distrustedKeys entry /, '--distrusted-key ')
|
|
175
|
+
.replace(/^distrustedKeys names /, '--distrusted-key names '), ExitCode.USAGE_ERROR, 'Pass --trust-anchor sha256:<64 hex> and --distrusted-key sha256:<64 hex>[@<RFC 3339 instant>], once per key.');
|
|
176
|
+
}
|
|
177
|
+
throw err;
|
|
178
|
+
}
|
|
179
|
+
// verify-core reads distrusted keys only during the walk, so without an
|
|
180
|
+
// anchor they would be dropped without a word.
|
|
181
|
+
if (distrustedKeys.length > 0 && trustAnchors.length === 0) {
|
|
182
|
+
this.failWith(ErrorCode.MISSING_INPUT, '--distrusted-key acts only inside the key-statement walk, which runs from --trust-anchor; pass the pin as well.', ExitCode.USAGE_ERROR, 'Pass --trust-anchor sha256:<64 hex> with the digest of a vault key you took out of band.');
|
|
183
|
+
}
|
|
184
|
+
// The Server refuses to start with a key in VAULT_TRUST_ANCHORS that
|
|
185
|
+
// VAULT_DISTRUSTED_KEYS names with no instant, so that pair is a usage
|
|
186
|
+
// error. A dated entry beside a pin is taken.
|
|
187
|
+
try {
|
|
188
|
+
assertNotPinnedAndDistrusted(trustAnchors, distrustedKeys);
|
|
189
|
+
}
|
|
190
|
+
catch (err) {
|
|
191
|
+
if (err instanceof TypeError) {
|
|
192
|
+
this.failWith(ErrorCode.INVALID_FIELD, err.message.replace(/^(sha256:[0-9a-f]{64}) is a trust anchor and a distrusted key with no instant,/, '$1 is a --trust-anchor and a --distrusted-key with no instant,'), ExitCode.USAGE_ERROR, 'Keep the pin and give the leaked key its instant: --distrusted-key sha256:<64 hex>@<RFC 3339 instant>. Or, if you vouch for nothing it signed, drop its --trust-anchor.');
|
|
193
|
+
}
|
|
194
|
+
throw err;
|
|
195
|
+
}
|
|
196
|
+
if (args.file === undefined) {
|
|
197
|
+
this.failWith(ErrorCode.MISSING_INPUT, 'Missing the audit export to verify.', ExitCode.USAGE_ERROR, 'Pass the path to an audit-export JSON file, or `-` to read it from stdin, before or after the flags.');
|
|
198
|
+
}
|
|
199
|
+
if (args.file !== '-' && !existsSync(args.file)) {
|
|
200
|
+
this.failWith(ErrorCode.FILE_READ_ERROR, `Cannot read ${args.file}: no such file or directory.`, ExitCode.USAGE_ERROR, 'Pass the path to an audit-export JSON file, or `-` to read it from stdin. ' +
|
|
201
|
+
'Obtain one with `agledger api GET /v1/records/{id}/audit-export`.');
|
|
202
|
+
}
|
|
203
|
+
const agentKeys = flags['agent-keys']
|
|
204
|
+
? this.unwrapAgentKeys(this.readJsonSource(flags['agent-keys'], 'agent keys', 'The --agent-keys file must be an Ed25519 JWK, a list of them, or a {keys:[...]} JWK Set.'))
|
|
205
|
+
: undefined;
|
|
206
|
+
const federationKeys = this.attachFederationKeyHistories(this.parseFederationKeys(flags['federation-key'] ?? []), flags['federation-key-history'] ?? []);
|
|
55
207
|
const exportData = this.readJsonSource(args.file, 'audit export', 'Pass the path to an audit-export JSON file, or `-` to read it from stdin. ' +
|
|
56
208
|
'Obtain one with `agledger api GET /v1/records/{id}/audit-export`.');
|
|
57
209
|
if (!exportData || typeof exportData !== 'object' || !('entries' in exportData)) {
|
|
@@ -61,36 +213,42 @@ export default class Verify extends BaseCommand {
|
|
|
61
213
|
? this.unwrapKeys(this.readJsonSource(flags.keys, 'public keys', 'The --keys file must be a {keyId: SPKI-DER-base64} map or the .data list from ' +
|
|
62
214
|
'`agledger api GET /v1/verification-keys`.'))
|
|
63
215
|
: undefined;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
//
|
|
70
|
-
// trace; agents parsing stderr need {code, message, suggestion}, not a
|
|
71
|
-
// stack frame. See verify-core/audit-export.ts normalizeOutOfBandKeys.
|
|
216
|
+
// verify-core throws TypeError at the supplied-key boundary when the
|
|
217
|
+
// file's shape is wrong (e.g. {keyId: 42}, [null], "...") or a key window
|
|
218
|
+
// in it is not RFC 3339: valid JSON, a value refused. Catch it so the
|
|
219
|
+
// CLI emits its structured-error envelope rather than oclif's raw
|
|
220
|
+
// exception trace; agents parsing stderr need {code, message, suggestion},
|
|
221
|
+
// not a stack frame.
|
|
72
222
|
let result;
|
|
73
223
|
try {
|
|
74
224
|
result = verifyAuditExport(exportData, {
|
|
75
225
|
publicKeys,
|
|
76
226
|
requireKeyId: flags['require-key-id'],
|
|
77
|
-
|
|
227
|
+
requireSuppliedKeys: flags['require-supplied-keys'],
|
|
228
|
+
...(trustAnchors.length > 0 ? { trustAnchors, distrustedKeys } : {}),
|
|
78
229
|
agentKeys,
|
|
230
|
+
federationKeys,
|
|
79
231
|
});
|
|
80
232
|
}
|
|
81
233
|
catch (err) {
|
|
82
234
|
if (err instanceof TypeError) {
|
|
83
|
-
this.failWith(ErrorCode.
|
|
84
|
-
'{keyId, publicKey,
|
|
85
|
-
'the --agent-keys file must hold Ed25519 JWKs ({"kty":"OKP","crv":"Ed25519","x":"..."})
|
|
235
|
+
this.failWith(ErrorCode.INVALID_FIELD, flagWording(err.message), ExitCode.USAGE_ERROR, 'The --keys file must be a {keyId: SPKI-DER-base64} map or a list of ' +
|
|
236
|
+
'{keyId, publicKey, activatedAt?, retiredAt?} entries with RFC 3339 windows (the /v1/verification-keys body works as is); ' +
|
|
237
|
+
'the --agent-keys file must hold Ed25519 JWKs ({"kty":"OKP","crv":"Ed25519","x":"..."}); ' +
|
|
238
|
+
'a --federation-key-history file must be the peer\'s served document, unaltered, and reach the --federation-key given for its hub.');
|
|
86
239
|
}
|
|
87
240
|
throw err;
|
|
88
241
|
}
|
|
242
|
+
// Findings, notes and suggestions name the flags, in JSON and text alike.
|
|
243
|
+
result = resultWithFlags(result);
|
|
89
244
|
if (this.isJson) {
|
|
90
|
-
|
|
245
|
+
// verify-core's result, plus the verdict @agledger/verify reports:
|
|
246
|
+
// `valid` alone is true on a run that anchored nothing.
|
|
247
|
+
const { verdict, ...rest } = result;
|
|
248
|
+
this.output({ verdict, ...rest });
|
|
91
249
|
}
|
|
92
250
|
else {
|
|
93
|
-
this.renderHuman(result, agentKeys !== undefined);
|
|
251
|
+
this.renderHuman(result, agentKeys !== undefined, federationKeys !== undefined);
|
|
94
252
|
}
|
|
95
253
|
if (!result.valid)
|
|
96
254
|
this.exit(ExitCode.GENERAL_ERROR);
|
|
@@ -117,6 +275,60 @@ export default class Verify extends BaseCommand {
|
|
|
117
275
|
* entry that wraps its key as `{ publicKeyJwk: {...} }` (how an agent records
|
|
118
276
|
* the key it sent at cert exchange) is unwrapped. verify-core validates each.
|
|
119
277
|
*/
|
|
278
|
+
/**
|
|
279
|
+
* `--federation-key` values into the `[{ hubId, publicKey }]` list
|
|
280
|
+
* verify-core takes, each checked here so a bad key is a usage error, not a
|
|
281
|
+
* verdict. A hub named twice pins two keys.
|
|
282
|
+
*/
|
|
283
|
+
parseFederationKeys(values) {
|
|
284
|
+
const out = [];
|
|
285
|
+
const shape = 'Each --federation-key is <hubId>=<key>: the peer\'s hub id, then its Ed25519 federation key as base64 SPKI DER or base64 of the raw 32 bytes, as its operator gives it.';
|
|
286
|
+
for (const value of values) {
|
|
287
|
+
const at = value.indexOf('=');
|
|
288
|
+
const hubId = at === -1 ? '' : value.slice(0, at).trim();
|
|
289
|
+
const key = at === -1 ? '' : value.slice(at + 1).trim();
|
|
290
|
+
if (hubId === '' || key === '') {
|
|
291
|
+
this.failWith(ErrorCode.INVALID_FIELD, `Invalid --federation-key ${JSON.stringify(value)}.`, ExitCode.USAGE_ERROR, shape);
|
|
292
|
+
}
|
|
293
|
+
if (normalizeFederationKey(key) === null) {
|
|
294
|
+
this.failWith(ErrorCode.INVALID_FIELD, `Invalid --federation-key for hub ${hubId}: the key is not an Ed25519 public key.`, ExitCode.USAGE_ERROR, shape);
|
|
295
|
+
}
|
|
296
|
+
out.push({ hubId, publicKey: key });
|
|
297
|
+
}
|
|
298
|
+
return out;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Each `--federation-key-history` file attached to the `--federation-key`
|
|
302
|
+
* entry for the hub it names, or undefined when neither flag was given. A
|
|
303
|
+
* history needs a key for its hub: alone it is the peer's word.
|
|
304
|
+
*/
|
|
305
|
+
attachFederationKeyHistories(keys, paths) {
|
|
306
|
+
if (keys.length === 0 && paths.length === 0)
|
|
307
|
+
return undefined;
|
|
308
|
+
const out = keys.map((k) => ({ ...k }));
|
|
309
|
+
for (const path of paths) {
|
|
310
|
+
let doc;
|
|
311
|
+
try {
|
|
312
|
+
doc = JSON.parse(readFileSync(path, 'utf8'));
|
|
313
|
+
}
|
|
314
|
+
catch (err) {
|
|
315
|
+
this.failWith(ErrorCode.INVALID_FIELD, `Cannot read --federation-key-history ${path}: ${err.message}`, ExitCode.USAGE_ERROR, 'Pass the JSON the peer serves at GET /.well-known/agledger-federation-keys.json.');
|
|
316
|
+
}
|
|
317
|
+
const hubId = doc !== null && typeof doc === 'object' ? doc.hubId : undefined;
|
|
318
|
+
if (typeof hubId !== 'string' || hubId === '') {
|
|
319
|
+
this.failWith(ErrorCode.INVALID_FIELD, `--federation-key-history ${path} is not a key-history document naming its hub.`, ExitCode.USAGE_ERROR, 'Pass the JSON the peer serves at GET /.well-known/agledger-federation-keys.json, with federation configured on the peer.');
|
|
320
|
+
}
|
|
321
|
+
const entry = out.find((k) => k.hubId === hubId && k.history === undefined) ?? out.find((k) => k.hubId === hubId);
|
|
322
|
+
if (entry === undefined) {
|
|
323
|
+
this.failWith(ErrorCode.INVALID_FIELD, `--federation-key-history ${path} is hub ${hubId}'s, and no --federation-key names that hub.`, ExitCode.USAGE_ERROR, 'Give the key you hold for it with --federation-key <hubId>=<key> (the signingPublicKey your peer row holds, or one its operator confirmed): the history is trusted only from a key you pinned.');
|
|
324
|
+
}
|
|
325
|
+
if (entry.history !== undefined)
|
|
326
|
+
out.push({ hubId, publicKey: entry.publicKey, history: doc });
|
|
327
|
+
else
|
|
328
|
+
entry.history = doc;
|
|
329
|
+
}
|
|
330
|
+
return out;
|
|
331
|
+
}
|
|
120
332
|
unwrapAgentKeys(raw) {
|
|
121
333
|
const list = Array.isArray(raw)
|
|
122
334
|
? raw
|
|
@@ -127,16 +339,62 @@ export default class Verify extends BaseCommand {
|
|
|
127
339
|
? entry.publicKeyJwk
|
|
128
340
|
: entry);
|
|
129
341
|
}
|
|
130
|
-
renderHuman(result, agentKeysGiven) {
|
|
342
|
+
renderHuman(result, agentKeysGiven, federationKeysGiven) {
|
|
131
343
|
if (this.isQuiet)
|
|
132
344
|
return;
|
|
133
345
|
const out = process.stdout;
|
|
134
|
-
const
|
|
346
|
+
const trust = result.keyTrust;
|
|
347
|
+
// PASS only when the walk from a pinned anchor verified at least one
|
|
348
|
+
// signature. A chain that verifies against keys nobody pinned, or whose
|
|
349
|
+
// anchors verified no signature at all, is not a clean result whatever
|
|
350
|
+
// `valid` says, so it gets its own verdict word.
|
|
351
|
+
const verdict = result.verdict;
|
|
352
|
+
const anchored = trust.status === 'walked';
|
|
353
|
+
// The same headline words as @agledger/verify and the Python agledger-verify.
|
|
354
|
+
const icon = verdict === 'failed' ? 'FAIL' : verdict === 'trusted' ? 'PASS' : 'VERIFIED, NOT ANCHORED';
|
|
135
355
|
out.write(`${icon} Record: ${result.recordId}\n`);
|
|
136
356
|
out.write(` Entries: ${result.verifiedEntries}/${result.totalEntries} verified\n`);
|
|
357
|
+
if (verdict === 'unanchored') {
|
|
358
|
+
out.write(trust.status === 'no_anchored_signature'
|
|
359
|
+
? ' Nothing failed, but this is NOT a trusted verdict: the --trust-anchor was walked, but no ' +
|
|
360
|
+
'signature here verified under a key it anchors. An entry written before the install began ' +
|
|
361
|
+
'signing carries no signature, and proves nothing about who wrote it.\n'
|
|
362
|
+
: ' Nothing failed, but this is NOT a trusted verdict: no --trust-anchor was given, so every ' +
|
|
363
|
+
"signing key was taken on the word of the export itself, and a key written into the Server's " +
|
|
364
|
+
'database alone would verify. Ask the operator for the SPKI digest of a vault key (the ' +
|
|
365
|
+
'installer prints it; signing-key-digest.js derives it from any key) and re-run with ' +
|
|
366
|
+
'--trust-anchor sha256:<hex>.\n');
|
|
367
|
+
}
|
|
368
|
+
if (anchored) {
|
|
369
|
+
out.write(` Keys: ${trust.anchoredKeyIds.length} anchored to --trust-anchor ${trust.anchors.join(', ')}` +
|
|
370
|
+
(trust.unanchoredKeyIds.length > 0 ? `; not anchored: ${trust.unanchoredKeyIds.join(', ')}` : '') +
|
|
371
|
+
(trust.undecidedKeyIds.length > 0 ? `; undecided on this host: ${trust.undecidedKeyIds.join(', ')}` : '') +
|
|
372
|
+
'.\n');
|
|
373
|
+
}
|
|
374
|
+
else if (trust.status === 'no_anchored_signature') {
|
|
375
|
+
out.write(` Keys: walked from --trust-anchor ${trust.anchors.join(', ')}; no signature verified under an anchored key.\n`);
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
out.write(' Keys: not anchored (no --trust-anchor given), checked against keys nobody pinned.\n');
|
|
379
|
+
if (trust.anchoredFrom) {
|
|
380
|
+
out.write(` The export names its Server's key as ${trust.anchoredFrom}: its own claim, not an anchor.\n`);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
for (const f of trust.findings) {
|
|
384
|
+
out.write(` Key finding: ${f.code}${f.keyId ? ` (${f.keyId})` : ''}: ${f.detail}\n`);
|
|
385
|
+
}
|
|
386
|
+
for (const n of trust.notes) {
|
|
387
|
+
out.write(` Key note: ${n.keyId ? `(${n.keyId}) ` : ''}${n.detail}\n`);
|
|
388
|
+
}
|
|
137
389
|
// Agent signatures are checked only against keys the caller supplies, so
|
|
138
390
|
// the lines below say exactly how many were, and the PASS line speaks for
|
|
139
391
|
// the Server's signatures alone.
|
|
392
|
+
const peerLine = peerMessagesLine(result.federationWire, federationKeysGiven);
|
|
393
|
+
if (peerLine)
|
|
394
|
+
out.write(` ${peerLine}\n`);
|
|
395
|
+
const evidenceLine = evidenceBodiesLine(result.evidenceBinding);
|
|
396
|
+
if (evidenceLine)
|
|
397
|
+
out.write(` ${evidenceLine}\n`);
|
|
140
398
|
const { present, verified } = result.agentSignatures;
|
|
141
399
|
const unchecked = present - verified;
|
|
142
400
|
if (present > 0 && unchecked === 0) {
|
|
@@ -148,8 +406,16 @@ export default class Verify extends BaseCommand {
|
|
|
148
406
|
else if (present > 0) {
|
|
149
407
|
out.write(` Agent signatures: ${present} sealed on the chain, not checked. Pass --agent-keys with the agents' public keys to re-verify them.\n`);
|
|
150
408
|
}
|
|
409
|
+
const { skipped } = result.signatureCoverage;
|
|
410
|
+
if (result.valid && skipped > 0) {
|
|
411
|
+
out.write(` Unsigned: ${skipped} of ${result.totalEntries} entries carry no signature (written before the install registered its first key), so they are covered by the hash chain only.\n`);
|
|
412
|
+
}
|
|
151
413
|
if (result.valid) {
|
|
152
|
-
out.write(
|
|
414
|
+
out.write(verdict === 'trusted'
|
|
415
|
+
? ' Hash chain contiguous, every Server signature verified under a key linked to your trust anchor.\n'
|
|
416
|
+
: trust.status === 'no_anchored_signature'
|
|
417
|
+
? ' Hash chain contiguous, but no Server signature verified under a key your trust anchor reaches.\n'
|
|
418
|
+
: ' Hash chain contiguous and every Server signature verifies, against keys nobody pinned.\n');
|
|
153
419
|
return;
|
|
154
420
|
}
|
|
155
421
|
if (result.brokenAt) {
|
|
@@ -164,3 +430,47 @@ export default class Verify extends BaseCommand {
|
|
|
164
430
|
}
|
|
165
431
|
}
|
|
166
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* The human line on the evidence bodies an `?evidence=true` export inlines,
|
|
435
|
+
* or null when it carries none. Each is hashed against the evidenceHash or
|
|
436
|
+
* payloadHash its entry signs; an encrypted-mode completion cannot be.
|
|
437
|
+
*/
|
|
438
|
+
export function evidenceBodiesLine(counts) {
|
|
439
|
+
if (counts.present === 0)
|
|
440
|
+
return null;
|
|
441
|
+
const parts = [`${counts.verified}/${counts.present} inlined evidence bodies hash (RFC 8785, SHA-256) to the hash their entry signs`];
|
|
442
|
+
if (counts.failed > 0)
|
|
443
|
+
parts.push(`${counts.failed} failed CHAIN_EVIDENCE_BINDING_MISMATCH`);
|
|
444
|
+
if (counts.clientHashed > 0) {
|
|
445
|
+
parts.push(`${counts.clientHashed} on an encrypted-mode completion, whose signed hash covers a cleartext the export does not carry, so not re-bound`);
|
|
446
|
+
}
|
|
447
|
+
return `Evidence: ${parts.join('; ')}.`;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* The human line on the sealed federation messages, or null when the chain
|
|
451
|
+
* carries none. `failed` messages failed a check and are reported as
|
|
452
|
+
* failures; the rest of the unverified ones came from a hub with no key.
|
|
453
|
+
*/
|
|
454
|
+
export function peerMessagesLine(wire, federationKeysGiven) {
|
|
455
|
+
if (wire.present === 0)
|
|
456
|
+
return null;
|
|
457
|
+
const retired = wire.afterRetirement > 0
|
|
458
|
+
? ` ${wire.afterRetirement} of them signed by the peer under a key it had already retired: in order when the receiver's federation.peer_revoked row for the peer comes after them.`
|
|
459
|
+
: '';
|
|
460
|
+
if (wire.present === wire.verified) {
|
|
461
|
+
return `Peer messages: ${wire.verified}/${wire.present} sealed federation messages re-verified under --federation-key.${retired}`;
|
|
462
|
+
}
|
|
463
|
+
if (!federationKeysGiven && wire.failed === 0) {
|
|
464
|
+
return `Peer messages: ${wire.present} sealed on the chain, hashed and matched to their entry; the peer signatures were not checked. Pass --federation-key <hubId>=<key> for each peer to re-verify them.`;
|
|
465
|
+
}
|
|
466
|
+
const noKey = wire.present - wire.verified - wire.failed;
|
|
467
|
+
const parts = [`${wire.verified}/${wire.present} re-verified`];
|
|
468
|
+
if (wire.failed > 0)
|
|
469
|
+
parts.push(`${wire.failed} failed CHAIN_FEDERATION_WIRE_INVALID`);
|
|
470
|
+
if (noKey > 0) {
|
|
471
|
+
parts.push(federationKeysGiven
|
|
472
|
+
? `${noKey} come from a hub with no --federation-key and were hashed and matched to their entry only`
|
|
473
|
+
: `${noKey} were hashed and matched to their entry only; pass --federation-key <hubId>=<key> for each peer to re-verify them`);
|
|
474
|
+
}
|
|
475
|
+
return `Peer messages: ${parts.join('; ')}.${retired}`;
|
|
476
|
+
}
|
package/dist/oidc.js
CHANGED
|
@@ -313,7 +313,7 @@ export class OidcCertCredential {
|
|
|
313
313
|
}
|
|
314
314
|
if (!res.ok) {
|
|
315
315
|
const clean = scrub(parsed, token);
|
|
316
|
-
const detail = typeof clean.detail === 'string' ? clean.detail :
|
|
316
|
+
const detail = typeof clean.detail === 'string' ? clean.detail : '';
|
|
317
317
|
// The Server exchanges a token id once. A token file returns the same
|
|
318
318
|
// token until whatever writes it rotates it, so every CLI run after the
|
|
319
319
|
// first lands here until then.
|
package/oclif.manifest.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"agledger api GET /v1/records -F status=ACTIVE -F limit=50",
|
|
21
21
|
"agledger api POST /v1/records --data '{\"type\":\"notarize-generic-v1\",\"criteria\":{\"summary\":\"...\"}}'",
|
|
22
22
|
"agledger api POST /v1/records -F type=notarize-generic-v1 -F criteria.summary=\"summarize Q3 filings\"",
|
|
23
|
-
"agledger api POST /v1/records -F type=notarize-generic-v1 -f externalTaskId=4821 # -f keeps a digit-only id a string",
|
|
23
|
+
"agledger api POST /v1/records -F type=notarize-generic-v1 -F criteria.summary=\"file Q3 report\" -f externalTaskId=4821 # -f keeps a digit-only id a string",
|
|
24
24
|
"agledger api POST /v1/records --input payload.json",
|
|
25
25
|
"cat payload.json | agledger api POST /v1/records --input -",
|
|
26
26
|
"agledger api GET /v1/records --paginate # streams all pages as NDJSON"
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"type": "boolean"
|
|
112
112
|
},
|
|
113
113
|
"idempotency-key": {
|
|
114
|
-
"description": "Dedup key for POST, max 256 chars. One is generated per call,
|
|
114
|
+
"description": "Dedup key for POST, max 256 chars. One is generated per call and shown by --verbose, and a TIMEOUT or dropped-connection error carries it as `idempotencyKey`. Pass this only when retrying a call that may already have reached the Server: reuse the first attempt's key and it replays the original result instead of creating a second record, where a rerun without it can create a duplicate. Bound to method, route and body, so a retry with a changed body is rejected.",
|
|
115
115
|
"name": "idempotency-key",
|
|
116
116
|
"hasDynamicHelp": false,
|
|
117
117
|
"multiple": false,
|
|
@@ -626,7 +626,7 @@
|
|
|
626
626
|
"type": "option"
|
|
627
627
|
},
|
|
628
628
|
"oidc-agent-id": {
|
|
629
|
-
"description": "With --oidc: the agent the
|
|
629
|
+
"description": "With --oidc: an optional assertion of the agent id the token binds to. The token decides the agent, never this value: when it names a different agent, or the token binds none, the exchange fails 403 CERT_AGENT_BINDING_MISMATCH instead of issuing a cert. To bind an agent, an administrator sets oidcIss/oidcSub on it (PATCH /v1/agents/{id}) or maps an agent_id claim on the trusted issuer (claimMapping.agent_id).",
|
|
630
630
|
"env": "AGLEDGER_OIDC_AGENT_ID",
|
|
631
631
|
"name": "oidc-agent-id",
|
|
632
632
|
"hasDynamicHelp": false,
|
|
@@ -652,7 +652,12 @@
|
|
|
652
652
|
"logout": {
|
|
653
653
|
"aliases": [],
|
|
654
654
|
"args": {},
|
|
655
|
-
"description": "Remove a stored profile from ~/.agledger/config.json",
|
|
655
|
+
"description": "Remove a stored profile from ~/.agledger/config.json: the active profile, the one named by --profile, or every profile with --all. Exits 2 when there is no such profile to remove. Removing the active profile leaves none active: pick another with `config use`.",
|
|
656
|
+
"examples": [
|
|
657
|
+
"<%= config.bin %> logout",
|
|
658
|
+
"<%= config.bin %> logout --profile prod",
|
|
659
|
+
"<%= config.bin %> logout --all"
|
|
660
|
+
],
|
|
656
661
|
"flags": {
|
|
657
662
|
"json": {
|
|
658
663
|
"description": "Force JSON output (default when stdout is piped)",
|
|
@@ -683,9 +688,8 @@
|
|
|
683
688
|
"type": "option"
|
|
684
689
|
},
|
|
685
690
|
"profile": {
|
|
686
|
-
"description": "Profile name to remove",
|
|
691
|
+
"description": "Profile name to remove (default: the active profile)",
|
|
687
692
|
"name": "profile",
|
|
688
|
-
"default": "default",
|
|
689
693
|
"hasDynamicHelp": false,
|
|
690
694
|
"multiple": false,
|
|
691
695
|
"type": "option"
|
|
@@ -723,15 +727,16 @@
|
|
|
723
727
|
"args": {
|
|
724
728
|
"file": {
|
|
725
729
|
"description": "Path to the audit export JSON file (or \"-\" for stdin).",
|
|
726
|
-
"name": "file"
|
|
727
|
-
"required": true
|
|
730
|
+
"name": "file"
|
|
728
731
|
}
|
|
729
732
|
},
|
|
730
733
|
"description": "Verify a record audit export offline (COSE_Sign1 envelope, RFC 9052; Ed25519 or ES256).",
|
|
731
734
|
"examples": [
|
|
735
|
+
"<%= config.bin %> verify audit-export.json --trust-anchor sha256:<64 hex>",
|
|
732
736
|
"<%= config.bin %> verify audit-export.json",
|
|
733
737
|
"<%= config.bin %> verify audit-export.json --keys vault-keys.json",
|
|
734
738
|
"<%= config.bin %> verify audit-export.json --agent-keys agent-jwks.json",
|
|
739
|
+
"<%= config.bin %> verify audit-export.json --federation-key hub-b=MCowBQYDK2VwAyEA...",
|
|
735
740
|
"<%= config.bin %> verify audit-export.json --json",
|
|
736
741
|
"cat audit-export.json | <%= config.bin %> verify -"
|
|
737
742
|
],
|
|
@@ -778,12 +783,26 @@
|
|
|
778
783
|
"type": "boolean"
|
|
779
784
|
},
|
|
780
785
|
"keys": {
|
|
781
|
-
"description": "Path to a JSON file holding
|
|
786
|
+
"description": "Path to a JSON file holding public keys you supply. Accepts a {keyId: SPKI-DER-base64} map, a [{keyId, publicKey, ...}] list, or the raw GET /v1/verification-keys response envelope ({data:[...], ...}, the .data array is unwrapped automatically, and each key's signed statements are walked with --trust-anchor). Merged over any keys embedded in the export. Where a key came from is not whether it is trusted: that is --trust-anchor.",
|
|
782
787
|
"name": "keys",
|
|
783
788
|
"hasDynamicHelp": false,
|
|
784
789
|
"multiple": false,
|
|
785
790
|
"type": "option"
|
|
786
791
|
},
|
|
792
|
+
"trust-anchor": {
|
|
793
|
+
"description": "sha256:<64 hex> SPKI digest of a vault key you took out of band (the installer prints the first vault key's; the Server's signing-key-digest.js derives one from any key you hold). The signed key statements the export carries are walked from it: an entry signed by a key the walk does not reach fails CHAIN_SIGNING_KEY_UNANCHORED, and a statement that does not hold fails KEY_STATEMENT_INVALID, KEY_CLOSURE_INVALID or CHAIN_KEY_WINDOW_DRIFT. Without one, a pass rests on keys nobody pinned. Repeatable.",
|
|
794
|
+
"name": "trust-anchor",
|
|
795
|
+
"hasDynamicHelp": false,
|
|
796
|
+
"multiple": true,
|
|
797
|
+
"type": "option"
|
|
798
|
+
},
|
|
799
|
+
"distrusted-key": {
|
|
800
|
+
"description": "sha256:<64 hex>, optionally @<RFC 3339 instant>: a key the operator distrusts, as in the Server's VAULT_DISTRUSTED_KEYS. What it signed from that instant (with none, from its retirement) counts for nothing in the walk. Requires --trust-anchor. A dated entry may name a key also given to --trust-anchor, which then vouches for what it signed before the instant. Where an export lists a key retired at the instant the Server distrusts it from (distrustedFrom), earlier than its signed retirement, a run without the same entry fails on that window, and the finding names the --distrusted-key to confirm with the Server's operator. Repeatable.",
|
|
801
|
+
"name": "distrusted-key",
|
|
802
|
+
"hasDynamicHelp": false,
|
|
803
|
+
"multiple": true,
|
|
804
|
+
"type": "option"
|
|
805
|
+
},
|
|
787
806
|
"agent-keys": {
|
|
788
807
|
"description": "Path to a JSON file holding Ed25519 public keys of agent certs: a JWK, a list of JWKs, or a {keys:[...]} JWK Set (an entry may wrap its key as {publicKeyJwk:{...}}). Each is the publicKeyJwk an agent sent at cert exchange (also the cnf.jwk claim in its certJws). An entry whose sealed agent signature names one of them by thumbprint has that signature re-verified offline, and fails CHAIN_AGENT_SIGNATURE_INVALID if it does not verify.",
|
|
789
808
|
"name": "agent-keys",
|
|
@@ -791,6 +810,20 @@
|
|
|
791
810
|
"multiple": false,
|
|
792
811
|
"type": "option"
|
|
793
812
|
},
|
|
813
|
+
"federation-key": {
|
|
814
|
+
"description": "<hubId>=<key>: a peer Server's Ed25519 federation key as its operator gives it (base64 SPKI DER, or base64 of the raw 32 bytes the handshake registered). A receiving Server seals each peer message it accepts on the chain entry it writes (payload.wire), as the peer signed it. Every sealed message is held to its body hash and to its entry; one from a hub given here also has its signature re-verified under that key, which proves what the peer asserted from this export alone. A failure is CHAIN_FEDERATION_WIRE_INVALID. Repeatable, once per peer; name a hub twice to pin a second key no succession links to the first: one its history lists linked: false, or one it does not list at all.",
|
|
815
|
+
"name": "federation-key",
|
|
816
|
+
"hasDynamicHelp": false,
|
|
817
|
+
"multiple": true,
|
|
818
|
+
"type": "option"
|
|
819
|
+
},
|
|
820
|
+
"federation-key-history": {
|
|
821
|
+
"description": "Path to a peer's federation key history, the JSON its GET /.well-known/agledger-federation-keys.json serves (no auth). Needs a --federation-key for the same hub: every key the history links to that key through successions both keys signed is trusted inside its window, so entries sealed before the peer changed its federation key verify. Each message is placed by its signed wire.timestamp, never by the unsigned createdAt: one signed under a key before the key's activation fails; one signed after its retirement is reported as after retirement. Repeatable.",
|
|
822
|
+
"name": "federation-key-history",
|
|
823
|
+
"hasDynamicHelp": false,
|
|
824
|
+
"multiple": true,
|
|
825
|
+
"type": "option"
|
|
826
|
+
},
|
|
794
827
|
"require-key-id": {
|
|
795
828
|
"description": "Require every entry to reference this keyId. Rejects otherwise-valid exports signed by a retired or unexpected key.",
|
|
796
829
|
"name": "require-key-id",
|
|
@@ -798,11 +831,24 @@
|
|
|
798
831
|
"multiple": false,
|
|
799
832
|
"type": "option"
|
|
800
833
|
},
|
|
834
|
+
"distrusted-keys": {
|
|
835
|
+
"hidden": true,
|
|
836
|
+
"name": "distrusted-keys",
|
|
837
|
+
"hasDynamicHelp": false,
|
|
838
|
+
"multiple": false,
|
|
839
|
+
"type": "option"
|
|
840
|
+
},
|
|
801
841
|
"require-out-of-band-keys": {
|
|
802
|
-
"
|
|
842
|
+
"hidden": true,
|
|
803
843
|
"name": "require-out-of-band-keys",
|
|
804
844
|
"allowNo": false,
|
|
805
845
|
"type": "boolean"
|
|
846
|
+
},
|
|
847
|
+
"require-supplied-keys": {
|
|
848
|
+
"description": "Refuse keys embedded in the export: an entry whose only key is export-embedded fails CHAIN_KEY_POLICY_VIOLATION, so every signature is checked against a key from --keys.",
|
|
849
|
+
"name": "require-supplied-keys",
|
|
850
|
+
"allowNo": false,
|
|
851
|
+
"type": "boolean"
|
|
806
852
|
}
|
|
807
853
|
},
|
|
808
854
|
"hasDynamicHelp": false,
|
|
@@ -812,6 +858,7 @@
|
|
|
812
858
|
"pluginName": "@agledger/cli",
|
|
813
859
|
"pluginType": "core",
|
|
814
860
|
"strict": true,
|
|
861
|
+
"usage": "verify FILE [--trust-anchor <value>...] [--distrusted-key <value>...] [--keys <value>] [--agent-keys <value>] [--federation-key <value>...] [--require-key-id <value>] [--require-supplied-keys] [--json] [--quiet]",
|
|
815
862
|
"enableJsonFlag": false,
|
|
816
863
|
"isESM": true,
|
|
817
864
|
"relativePath": [
|
|
@@ -821,5 +868,5 @@
|
|
|
821
868
|
]
|
|
822
869
|
}
|
|
823
870
|
},
|
|
824
|
-
"version": "1.
|
|
871
|
+
"version": "2.1.0"
|
|
825
872
|
}
|