@peac/protocol 0.10.6 → 0.10.8
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/dist/crypto-utils.d.ts +9 -0
- package/dist/crypto-utils.d.ts.map +1 -0
- package/dist/crypto-utils.js +21 -0
- package/dist/crypto-utils.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/pointer-fetch.d.ts +86 -0
- package/dist/pointer-fetch.d.ts.map +1 -0
- package/dist/pointer-fetch.js +305 -0
- package/dist/pointer-fetch.js.map +1 -0
- package/dist/ssrf-safe-fetch.d.ts +205 -0
- package/dist/ssrf-safe-fetch.d.ts.map +1 -0
- package/dist/ssrf-safe-fetch.js +671 -0
- package/dist/ssrf-safe-fetch.js.map +1 -0
- package/dist/transport-profiles.d.ts +115 -0
- package/dist/transport-profiles.d.ts.map +1 -0
- package/dist/transport-profiles.js +424 -0
- package/dist/transport-profiles.js.map +1 -0
- package/dist/verification-report.d.ts +135 -0
- package/dist/verification-report.d.ts.map +1 -0
- package/dist/verification-report.js +322 -0
- package/dist/verification-report.js.map +1 -0
- package/dist/verifier-core.d.ts +62 -0
- package/dist/verifier-core.d.ts.map +1 -0
- package/dist/verifier-core.js +578 -0
- package/dist/verifier-core.js.map +1 -0
- package/dist/verifier-types.d.ts +328 -0
- package/dist/verifier-types.d.ts.map +1 -0
- package/dist/verifier-types.js +161 -0
- package/dist/verifier-types.js.map +1 -0
- package/package.json +17 -5
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PEAC Verifier Types
|
|
3
|
+
*
|
|
4
|
+
* Types for verification policy, trust pinning, and verification reports
|
|
5
|
+
* per VERIFIER-SECURITY-MODEL.md, TRUST-PINNING-POLICY.md, and
|
|
6
|
+
* VERIFICATION-REPORT-FORMAT.md
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
import { VERIFIER_POLICY_VERSION, VERIFICATION_REPORT_VERSION } from '@peac/kernel';
|
|
11
|
+
/**
|
|
12
|
+
* Verification mode per VERIFIER-SECURITY-MODEL.md
|
|
13
|
+
*/
|
|
14
|
+
export type VerificationMode = 'offline_only' | 'offline_preferred' | 'network_allowed';
|
|
15
|
+
/**
|
|
16
|
+
* Pinned key entry per TRUST-PINNING-POLICY.md
|
|
17
|
+
*
|
|
18
|
+
* Uses RFC 7638 JWK Thumbprint with base64url encoding (NOT hex).
|
|
19
|
+
* SHA-256 thumbprints are 43 characters in base64url.
|
|
20
|
+
*
|
|
21
|
+
* For offline verification, include either `public_key` (base64url 32 bytes)
|
|
22
|
+
* or the full `jwk` object. If only thumbprint is provided, the key can only
|
|
23
|
+
* be pin-checked after fetching JWKS (requires network mode).
|
|
24
|
+
*/
|
|
25
|
+
export interface PinnedKey {
|
|
26
|
+
/** Issuer origin (https://host[:port]) */
|
|
27
|
+
issuer: string;
|
|
28
|
+
/** Key identifier (kid from JWKS) */
|
|
29
|
+
kid: string;
|
|
30
|
+
/** RFC 7638 JWK Thumbprint, SHA-256, base64url-encoded (43 chars) */
|
|
31
|
+
jwk_thumbprint_sha256: string;
|
|
32
|
+
/**
|
|
33
|
+
* Ed25519 public key bytes, base64url-encoded (43 chars for 32 bytes).
|
|
34
|
+
* If provided, enables offline verification without JWKS fetch.
|
|
35
|
+
*/
|
|
36
|
+
public_key?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Full JWK for offline verification.
|
|
39
|
+
* If provided, enables offline verification without JWKS fetch.
|
|
40
|
+
* Takes precedence over public_key.
|
|
41
|
+
*/
|
|
42
|
+
jwk?: {
|
|
43
|
+
kty: 'OKP';
|
|
44
|
+
crv: 'Ed25519';
|
|
45
|
+
x: string;
|
|
46
|
+
kid?: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Issuer allowlist entry
|
|
51
|
+
*
|
|
52
|
+
* Full origin format: https://host[:port]
|
|
53
|
+
* The port is only included if non-standard (not 443 for HTTPS).
|
|
54
|
+
*/
|
|
55
|
+
export type IssuerOrigin = string;
|
|
56
|
+
/**
|
|
57
|
+
* Verifier security limits
|
|
58
|
+
*/
|
|
59
|
+
export interface VerifierLimits {
|
|
60
|
+
/** Maximum receipt size in bytes */
|
|
61
|
+
max_receipt_bytes: number;
|
|
62
|
+
/** Maximum JWKS document size in bytes */
|
|
63
|
+
max_jwks_bytes: number;
|
|
64
|
+
/** Maximum number of keys in a JWKS */
|
|
65
|
+
max_jwks_keys: number;
|
|
66
|
+
/** Maximum redirects to follow */
|
|
67
|
+
max_redirects: number;
|
|
68
|
+
/** Network fetch timeout in milliseconds */
|
|
69
|
+
fetch_timeout_ms: number;
|
|
70
|
+
/** Maximum extension size in bytes */
|
|
71
|
+
max_extension_bytes: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Default verifier limits from VERIFIER-SECURITY-MODEL.md
|
|
75
|
+
*/
|
|
76
|
+
export declare const DEFAULT_VERIFIER_LIMITS: VerifierLimits;
|
|
77
|
+
/**
|
|
78
|
+
* Network security settings
|
|
79
|
+
*/
|
|
80
|
+
export interface NetworkSecurity {
|
|
81
|
+
/** Only allow HTTPS URLs */
|
|
82
|
+
https_only: boolean;
|
|
83
|
+
/** Block requests to private IP ranges */
|
|
84
|
+
block_private_ips: boolean;
|
|
85
|
+
/** Allow redirects */
|
|
86
|
+
allow_redirects: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Allow cross-origin redirects (default: true for CDN compatibility).
|
|
89
|
+
* When true, redirects to different origins are allowed if they pass SSRF checks.
|
|
90
|
+
* When false, only same-origin redirects are allowed.
|
|
91
|
+
*/
|
|
92
|
+
allow_cross_origin_redirects?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Behavior on DNS resolution failure (default: 'block' for security).
|
|
95
|
+
* - 'block': Treat DNS failure as blocked (fail-closed, more secure)
|
|
96
|
+
* - 'fail': Return fetch error (allows retry, less restrictive)
|
|
97
|
+
*/
|
|
98
|
+
dns_failure_behavior?: 'block' | 'fail';
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Default network security settings from VERIFIER-SECURITY-MODEL.md
|
|
102
|
+
*/
|
|
103
|
+
export declare const DEFAULT_NETWORK_SECURITY: NetworkSecurity;
|
|
104
|
+
/**
|
|
105
|
+
* Verifier policy configuration
|
|
106
|
+
*
|
|
107
|
+
* This structure echoes the policy used for verification, making trust
|
|
108
|
+
* decisions auditable per VERIFICATION-REPORT-FORMAT.md.
|
|
109
|
+
*/
|
|
110
|
+
export interface VerifierPolicy {
|
|
111
|
+
/** Policy schema version */
|
|
112
|
+
policy_version: typeof VERIFIER_POLICY_VERSION;
|
|
113
|
+
/** Verification mode */
|
|
114
|
+
mode: VerificationMode;
|
|
115
|
+
/** Allowed issuer origins (optional, if empty all issuers allowed) */
|
|
116
|
+
issuer_allowlist?: IssuerOrigin[];
|
|
117
|
+
/** Pinned keys for offline verification */
|
|
118
|
+
pinned_keys?: PinnedKey[];
|
|
119
|
+
/** Effective security limits */
|
|
120
|
+
limits: VerifierLimits;
|
|
121
|
+
/** Network security settings */
|
|
122
|
+
network: NetworkSecurity;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Create a default verifier policy
|
|
126
|
+
*/
|
|
127
|
+
export declare function createDefaultPolicy(mode: VerificationMode): VerifierPolicy;
|
|
128
|
+
/**
|
|
129
|
+
* Check status
|
|
130
|
+
*/
|
|
131
|
+
export type CheckStatus = 'pass' | 'fail' | 'skip';
|
|
132
|
+
/**
|
|
133
|
+
* Standard check IDs per VERIFIER-SECURITY-MODEL.md (in order)
|
|
134
|
+
*/
|
|
135
|
+
export declare const CHECK_IDS: readonly ["jws.parse", "limits.receipt_bytes", "jws.protected_header", "claims.schema_unverified", "issuer.trust_policy", "issuer.discovery", "key.resolve", "jws.signature", "claims.time_window", "extensions.limits", "transport.profile_binding"];
|
|
136
|
+
export type CheckId = (typeof CHECK_IDS)[number];
|
|
137
|
+
/**
|
|
138
|
+
* Single verification check result
|
|
139
|
+
*/
|
|
140
|
+
export interface CheckResult {
|
|
141
|
+
/** Stable check identifier */
|
|
142
|
+
id: CheckId;
|
|
143
|
+
/** Check status */
|
|
144
|
+
status: CheckStatus;
|
|
145
|
+
/** Machine-readable details (optional) */
|
|
146
|
+
detail?: Record<string, unknown>;
|
|
147
|
+
/** Stable error code (if failed) */
|
|
148
|
+
error_code?: string;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Input type for verification
|
|
152
|
+
*/
|
|
153
|
+
export type InputType = 'receipt_jws' | 'bundle_entry';
|
|
154
|
+
/**
|
|
155
|
+
* Digest object (algorithm + value)
|
|
156
|
+
*/
|
|
157
|
+
export interface DigestObject {
|
|
158
|
+
/** Hash algorithm */
|
|
159
|
+
alg: 'sha-256';
|
|
160
|
+
/** Hash value in lowercase hex */
|
|
161
|
+
value: string;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Bundle context for bundle_entry input type
|
|
165
|
+
*/
|
|
166
|
+
export interface BundleContext {
|
|
167
|
+
/** Digest of bundle bytes */
|
|
168
|
+
bundle_digest: DigestObject;
|
|
169
|
+
/** 0-based entry index */
|
|
170
|
+
entry_index: number;
|
|
171
|
+
/** Stable entry ID (optional) */
|
|
172
|
+
entry_id?: string;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Verification input descriptor
|
|
176
|
+
*/
|
|
177
|
+
export interface VerificationInput {
|
|
178
|
+
/** Input type */
|
|
179
|
+
type: InputType;
|
|
180
|
+
/** Digest of receipt bytes */
|
|
181
|
+
receipt_digest: DigestObject;
|
|
182
|
+
/** Bundle context (if type = bundle_entry) */
|
|
183
|
+
bundle?: BundleContext;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Result severity
|
|
187
|
+
*/
|
|
188
|
+
export type ResultSeverity = 'info' | 'warning' | 'error';
|
|
189
|
+
/**
|
|
190
|
+
* Reason codes per VERIFIER-SECURITY-MODEL.md
|
|
191
|
+
*/
|
|
192
|
+
export type ReasonCode = 'ok' | 'receipt_too_large' | 'malformed_receipt' | 'signature_invalid' | 'issuer_not_allowed' | 'key_not_found' | 'key_fetch_blocked' | 'key_fetch_failed' | 'key_fetch_timeout' | 'pointer_fetch_blocked' | 'pointer_fetch_failed' | 'pointer_fetch_timeout' | 'pointer_fetch_too_large' | 'pointer_digest_mismatch' | 'jwks_too_large' | 'jwks_too_many_keys' | 'expired' | 'not_yet_valid' | 'audience_mismatch' | 'schema_invalid' | 'policy_violation' | 'extension_too_large' | 'invalid_transport';
|
|
193
|
+
/**
|
|
194
|
+
* High-level verification result
|
|
195
|
+
*/
|
|
196
|
+
export interface VerificationResult {
|
|
197
|
+
/** Overall verification result */
|
|
198
|
+
valid: boolean;
|
|
199
|
+
/** Stable reason code */
|
|
200
|
+
reason: ReasonCode;
|
|
201
|
+
/** Result severity */
|
|
202
|
+
severity: ResultSeverity;
|
|
203
|
+
/** Receipt wire format (e.g., peac-receipt/0.1) */
|
|
204
|
+
receipt_type: string;
|
|
205
|
+
/** Normalized issuer origin (optional) */
|
|
206
|
+
issuer?: string;
|
|
207
|
+
/** Key ID used for verification (optional) */
|
|
208
|
+
kid?: string;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Pointer resolution details
|
|
212
|
+
*/
|
|
213
|
+
export interface PointerArtifact {
|
|
214
|
+
/** Pointer URL */
|
|
215
|
+
url: string;
|
|
216
|
+
/** Expected digest from header */
|
|
217
|
+
expected_digest: DigestObject;
|
|
218
|
+
/** Actual digest of fetched content */
|
|
219
|
+
actual_digest?: DigestObject;
|
|
220
|
+
/** Whether digests matched */
|
|
221
|
+
digest_matched?: boolean;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Key source for enterprise debuggability
|
|
225
|
+
*/
|
|
226
|
+
export type KeySource = 'pinned' | 'jwks_fetch';
|
|
227
|
+
/**
|
|
228
|
+
* Additional verification artifacts
|
|
229
|
+
*
|
|
230
|
+
* Artifacts are divided into two categories:
|
|
231
|
+
*
|
|
232
|
+
* **Deterministic artifacts** (same inputs and policy -> same values):
|
|
233
|
+
* - `issuer_key_source`: Always determined by policy and receipt
|
|
234
|
+
* - `issuer_key_thumbprint`: Computed from the signing key
|
|
235
|
+
* - `normalized_claims_digest`: Computed from the claims
|
|
236
|
+
* - `receipt_pointer`: Derived from the input pointer header
|
|
237
|
+
*
|
|
238
|
+
* **Non-deterministic artifacts** (may vary based on runtime state):
|
|
239
|
+
* - `issuer_jwks_digest`: Only present when JWKS is fetched fresh (not from cache)
|
|
240
|
+
*
|
|
241
|
+
* Use `buildDeterministic()` to exclude non-deterministic artifacts for
|
|
242
|
+
* reproducible report generation.
|
|
243
|
+
*/
|
|
244
|
+
export interface VerificationArtifacts {
|
|
245
|
+
/**
|
|
246
|
+
* Digest of JWKS used for verification.
|
|
247
|
+
*
|
|
248
|
+
* NON-DETERMINISTIC: Only present when JWKS is fetched fresh (not from cache).
|
|
249
|
+
* Excluded by `buildDeterministic()`.
|
|
250
|
+
*/
|
|
251
|
+
issuer_jwks_digest?: DigestObject;
|
|
252
|
+
/** Source of the signing key used for verification (DETERMINISTIC) */
|
|
253
|
+
issuer_key_source?: KeySource;
|
|
254
|
+
/** RFC 7638 JWK Thumbprint (SHA-256, base64url) of the key used (DETERMINISTIC) */
|
|
255
|
+
issuer_key_thumbprint?: string;
|
|
256
|
+
/** Digest of canonicalized claims (DETERMINISTIC) */
|
|
257
|
+
normalized_claims_digest?: DigestObject;
|
|
258
|
+
/** Pointer resolution details (DETERMINISTIC) */
|
|
259
|
+
receipt_pointer?: PointerArtifact;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Keys of artifacts that are non-deterministic (depend on runtime state)
|
|
263
|
+
*/
|
|
264
|
+
export declare const NON_DETERMINISTIC_ARTIFACT_KEYS: (keyof VerificationArtifacts)[];
|
|
265
|
+
/**
|
|
266
|
+
* Verifier implementation info
|
|
267
|
+
*/
|
|
268
|
+
export interface VerifierInfo {
|
|
269
|
+
/** Verifier name */
|
|
270
|
+
name: string;
|
|
271
|
+
/** Verifier version */
|
|
272
|
+
version: string;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Non-deterministic metadata (MUST be excluded from report hashes)
|
|
276
|
+
*/
|
|
277
|
+
export interface VerificationMeta {
|
|
278
|
+
/** RFC 3339 timestamp when report was generated */
|
|
279
|
+
generated_at?: string;
|
|
280
|
+
/** Verifier implementation info */
|
|
281
|
+
verifier?: VerifierInfo;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* PEAC Verification Report per VERIFICATION-REPORT-FORMAT.md
|
|
285
|
+
*
|
|
286
|
+
* This report is designed to be:
|
|
287
|
+
* - Portable: shareable across organizations
|
|
288
|
+
* - Deterministic: reproducible given same inputs
|
|
289
|
+
* - Safe: bounded resource usage
|
|
290
|
+
* - Policy-aware: trust decisions are explicit
|
|
291
|
+
*/
|
|
292
|
+
export interface VerificationReport {
|
|
293
|
+
/** Format version identifier (REQUIRED) */
|
|
294
|
+
report_version: typeof VERIFICATION_REPORT_VERSION;
|
|
295
|
+
/** What was verified (REQUIRED) */
|
|
296
|
+
input: VerificationInput;
|
|
297
|
+
/** Policy used for verification (REQUIRED) */
|
|
298
|
+
policy: VerifierPolicy;
|
|
299
|
+
/** High-level outcome (REQUIRED) */
|
|
300
|
+
result: VerificationResult;
|
|
301
|
+
/** Ordered list of checks (REQUIRED) */
|
|
302
|
+
checks: CheckResult[];
|
|
303
|
+
/** Additional outputs (OPTIONAL) */
|
|
304
|
+
artifacts?: VerificationArtifacts;
|
|
305
|
+
/** Non-deterministic fields (OPTIONAL, excluded from hashes) */
|
|
306
|
+
meta?: VerificationMeta;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Create a digest object from a hex string
|
|
310
|
+
*/
|
|
311
|
+
export declare function createDigest(hexValue: string): DigestObject;
|
|
312
|
+
/**
|
|
313
|
+
* Create an empty verification report structure
|
|
314
|
+
*/
|
|
315
|
+
export declare function createEmptyReport(policy: VerifierPolicy): Omit<VerificationReport, 'input' | 'result' | 'checks'>;
|
|
316
|
+
/**
|
|
317
|
+
* Map SSRF fetch error reason to verification reason code
|
|
318
|
+
*/
|
|
319
|
+
export declare function ssrfErrorToReasonCode(ssrfReason: string, fetchType: 'key' | 'pointer'): ReasonCode;
|
|
320
|
+
/**
|
|
321
|
+
* Map reason code to severity
|
|
322
|
+
*/
|
|
323
|
+
export declare function reasonCodeToSeverity(reason: ReasonCode): ResultSeverity;
|
|
324
|
+
/**
|
|
325
|
+
* Map reason code to error code
|
|
326
|
+
*/
|
|
327
|
+
export declare function reasonCodeToErrorCode(reason: ReasonCode): string;
|
|
328
|
+
//# sourceMappingURL=verifier-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifier-types.d.ts","sourceRoot":"","sources":["../src/verifier-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAGL,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,cAAc,CAAC;AAMtB;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AAMxF;;;;;;;;;GASG;AACH,MAAM,WAAW,SAAS;IACxB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,qBAAqB,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,GAAG,CAAC,EAAE;QACJ,GAAG,EAAE,KAAK,CAAC;QACX,GAAG,EAAE,SAAS,CAAC;QACf,CAAC,EAAE,MAAM,CAAC;QACV,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;CACH;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
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* PEAC Verifier Types
|
|
4
|
+
*
|
|
5
|
+
* Types for verification policy, trust pinning, and verification reports
|
|
6
|
+
* per VERIFIER-SECURITY-MODEL.md, TRUST-PINNING-POLICY.md, and
|
|
7
|
+
* VERIFICATION-REPORT-FORMAT.md
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NON_DETERMINISTIC_ARTIFACT_KEYS = exports.CHECK_IDS = exports.DEFAULT_NETWORK_SECURITY = exports.DEFAULT_VERIFIER_LIMITS = void 0;
|
|
13
|
+
exports.createDefaultPolicy = createDefaultPolicy;
|
|
14
|
+
exports.createDigest = createDigest;
|
|
15
|
+
exports.createEmptyReport = createEmptyReport;
|
|
16
|
+
exports.ssrfErrorToReasonCode = ssrfErrorToReasonCode;
|
|
17
|
+
exports.reasonCodeToSeverity = reasonCodeToSeverity;
|
|
18
|
+
exports.reasonCodeToErrorCode = reasonCodeToErrorCode;
|
|
19
|
+
const kernel_1 = require("@peac/kernel");
|
|
20
|
+
/**
|
|
21
|
+
* Default verifier limits from VERIFIER-SECURITY-MODEL.md
|
|
22
|
+
*/
|
|
23
|
+
exports.DEFAULT_VERIFIER_LIMITS = {
|
|
24
|
+
max_receipt_bytes: kernel_1.VERIFIER_LIMITS.maxReceiptBytes,
|
|
25
|
+
max_jwks_bytes: kernel_1.VERIFIER_LIMITS.maxJwksBytes,
|
|
26
|
+
max_jwks_keys: kernel_1.VERIFIER_LIMITS.maxJwksKeys,
|
|
27
|
+
max_redirects: kernel_1.VERIFIER_LIMITS.maxRedirects,
|
|
28
|
+
fetch_timeout_ms: kernel_1.VERIFIER_LIMITS.fetchTimeoutMs,
|
|
29
|
+
max_extension_bytes: kernel_1.VERIFIER_LIMITS.maxExtensionBytes,
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Default network security settings from VERIFIER-SECURITY-MODEL.md
|
|
33
|
+
*/
|
|
34
|
+
exports.DEFAULT_NETWORK_SECURITY = {
|
|
35
|
+
https_only: kernel_1.VERIFIER_NETWORK.httpsOnly,
|
|
36
|
+
block_private_ips: kernel_1.VERIFIER_NETWORK.blockPrivateIps,
|
|
37
|
+
allow_redirects: kernel_1.VERIFIER_NETWORK.allowRedirects,
|
|
38
|
+
allow_cross_origin_redirects: true, // Allow for CDN compatibility
|
|
39
|
+
dns_failure_behavior: 'block', // Fail-closed by default
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Create a default verifier policy
|
|
43
|
+
*/
|
|
44
|
+
function createDefaultPolicy(mode) {
|
|
45
|
+
return {
|
|
46
|
+
policy_version: kernel_1.VERIFIER_POLICY_VERSION,
|
|
47
|
+
mode,
|
|
48
|
+
limits: { ...exports.DEFAULT_VERIFIER_LIMITS },
|
|
49
|
+
network: { ...exports.DEFAULT_NETWORK_SECURITY },
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Standard check IDs per VERIFIER-SECURITY-MODEL.md (in order)
|
|
54
|
+
*/
|
|
55
|
+
exports.CHECK_IDS = [
|
|
56
|
+
'jws.parse',
|
|
57
|
+
'limits.receipt_bytes',
|
|
58
|
+
'jws.protected_header',
|
|
59
|
+
'claims.schema_unverified',
|
|
60
|
+
'issuer.trust_policy',
|
|
61
|
+
'issuer.discovery',
|
|
62
|
+
'key.resolve',
|
|
63
|
+
'jws.signature',
|
|
64
|
+
'claims.time_window',
|
|
65
|
+
'extensions.limits',
|
|
66
|
+
'transport.profile_binding',
|
|
67
|
+
];
|
|
68
|
+
/**
|
|
69
|
+
* Keys of artifacts that are non-deterministic (depend on runtime state)
|
|
70
|
+
*/
|
|
71
|
+
exports.NON_DETERMINISTIC_ARTIFACT_KEYS = [
|
|
72
|
+
'issuer_jwks_digest',
|
|
73
|
+
];
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
// Report Builder Utilities
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
/**
|
|
78
|
+
* Create a digest object from a hex string
|
|
79
|
+
*/
|
|
80
|
+
function createDigest(hexValue) {
|
|
81
|
+
return {
|
|
82
|
+
alg: 'sha-256',
|
|
83
|
+
value: hexValue.toLowerCase(),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Create an empty verification report structure
|
|
88
|
+
*/
|
|
89
|
+
function createEmptyReport(policy) {
|
|
90
|
+
return {
|
|
91
|
+
report_version: kernel_1.VERIFICATION_REPORT_VERSION,
|
|
92
|
+
policy,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Map SSRF fetch error reason to verification reason code
|
|
97
|
+
*/
|
|
98
|
+
function ssrfErrorToReasonCode(ssrfReason, fetchType) {
|
|
99
|
+
const prefix = fetchType === 'key' ? 'key_fetch' : 'pointer_fetch';
|
|
100
|
+
switch (ssrfReason) {
|
|
101
|
+
case 'not_https':
|
|
102
|
+
case 'private_ip':
|
|
103
|
+
case 'loopback':
|
|
104
|
+
case 'link_local':
|
|
105
|
+
case 'cross_origin_redirect':
|
|
106
|
+
case 'dns_failure':
|
|
107
|
+
return `${prefix}_blocked`;
|
|
108
|
+
case 'timeout':
|
|
109
|
+
return `${prefix}_timeout`;
|
|
110
|
+
case 'response_too_large':
|
|
111
|
+
return fetchType === 'pointer' ? 'pointer_fetch_too_large' : 'jwks_too_large';
|
|
112
|
+
case 'jwks_too_many_keys':
|
|
113
|
+
return 'jwks_too_many_keys';
|
|
114
|
+
case 'too_many_redirects':
|
|
115
|
+
case 'scheme_downgrade':
|
|
116
|
+
case 'network_error':
|
|
117
|
+
case 'invalid_url':
|
|
118
|
+
default:
|
|
119
|
+
return `${prefix}_failed`;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Map reason code to severity
|
|
124
|
+
*/
|
|
125
|
+
function reasonCodeToSeverity(reason) {
|
|
126
|
+
if (reason === 'ok')
|
|
127
|
+
return 'info';
|
|
128
|
+
return 'error';
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Map reason code to error code
|
|
132
|
+
*/
|
|
133
|
+
function reasonCodeToErrorCode(reason) {
|
|
134
|
+
const mapping = {
|
|
135
|
+
ok: '',
|
|
136
|
+
receipt_too_large: 'E_VERIFY_RECEIPT_TOO_LARGE',
|
|
137
|
+
malformed_receipt: 'E_VERIFY_MALFORMED_RECEIPT',
|
|
138
|
+
signature_invalid: 'E_VERIFY_SIGNATURE_INVALID',
|
|
139
|
+
issuer_not_allowed: 'E_VERIFY_ISSUER_NOT_ALLOWED',
|
|
140
|
+
key_not_found: 'E_VERIFY_KEY_NOT_FOUND',
|
|
141
|
+
key_fetch_blocked: 'E_VERIFY_KEY_FETCH_BLOCKED',
|
|
142
|
+
key_fetch_failed: 'E_VERIFY_KEY_FETCH_FAILED',
|
|
143
|
+
key_fetch_timeout: 'E_VERIFY_KEY_FETCH_TIMEOUT',
|
|
144
|
+
pointer_fetch_blocked: 'E_VERIFY_POINTER_FETCH_BLOCKED',
|
|
145
|
+
pointer_fetch_failed: 'E_VERIFY_POINTER_FETCH_FAILED',
|
|
146
|
+
pointer_fetch_timeout: 'E_VERIFY_POINTER_FETCH_TIMEOUT',
|
|
147
|
+
pointer_fetch_too_large: 'E_VERIFY_POINTER_FETCH_TOO_LARGE',
|
|
148
|
+
pointer_digest_mismatch: 'E_VERIFY_POINTER_DIGEST_MISMATCH',
|
|
149
|
+
jwks_too_large: 'E_VERIFY_JWKS_TOO_LARGE',
|
|
150
|
+
jwks_too_many_keys: 'E_VERIFY_JWKS_TOO_MANY_KEYS',
|
|
151
|
+
expired: 'E_VERIFY_EXPIRED',
|
|
152
|
+
not_yet_valid: 'E_VERIFY_NOT_YET_VALID',
|
|
153
|
+
audience_mismatch: 'E_VERIFY_AUDIENCE_MISMATCH',
|
|
154
|
+
schema_invalid: 'E_VERIFY_SCHEMA_INVALID',
|
|
155
|
+
policy_violation: 'E_VERIFY_POLICY_VIOLATION',
|
|
156
|
+
extension_too_large: 'E_VERIFY_EXTENSION_TOO_LARGE',
|
|
157
|
+
invalid_transport: 'E_VERIFY_INVALID_TRANSPORT',
|
|
158
|
+
};
|
|
159
|
+
return mapping[reason] || 'E_VERIFY_POLICY_VIOLATION';
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=verifier-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifier-types.js","sourceRoot":"","sources":["../src/verifier-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAsKH,kDAOC;AA4QD,oCAKC;AAKD,8CAOC;AAKD,sDA2BC;AAKD,oDAGC;AAKD,sDA2BC;AAhhBD,yCAKsB;AAgFtB;;GAEG;AACU,QAAA,uBAAuB,GAAmB;IACrD,iBAAiB,EAAE,wBAAe,CAAC,eAAe;IAClD,cAAc,EAAE,wBAAe,CAAC,YAAY;IAC5C,aAAa,EAAE,wBAAe,CAAC,WAAW;IAC1C,aAAa,EAAE,wBAAe,CAAC,YAAY;IAC3C,gBAAgB,EAAE,wBAAe,CAAC,cAAc;IAChD,mBAAmB,EAAE,wBAAe,CAAC,iBAAiB;CACvD,CAAC;AA8BF;;GAEG;AACU,QAAA,wBAAwB,GAAoB;IACvD,UAAU,EAAE,yBAAgB,CAAC,SAAS;IACtC,iBAAiB,EAAE,yBAAgB,CAAC,eAAe;IACnD,eAAe,EAAE,yBAAgB,CAAC,cAAc;IAChD,4BAA4B,EAAE,IAAI,EAAE,8BAA8B;IAClE,oBAAoB,EAAE,OAAO,EAAE,yBAAyB;CACzD,CAAC;AA2BF;;GAEG;AACH,SAAgB,mBAAmB,CAAC,IAAsB;IACxD,OAAO;QACL,cAAc,EAAE,gCAAuB;QACvC,IAAI;QACJ,MAAM,EAAE,EAAE,GAAG,+BAAuB,EAAE;QACt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
+
"version": "0.10.8",
|
|
4
4
|
"description": "PEAC protocol implementation - receipt issuance and verification",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./verify-local": {
|
|
14
|
+
"types": "./dist/verify-local.d.ts",
|
|
15
|
+
"import": "./dist/verify-local.js",
|
|
16
|
+
"require": "./dist/verify-local.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
7
19
|
"repository": {
|
|
8
20
|
"type": "git",
|
|
9
21
|
"url": "https://github.com/peacprotocol/peac.git",
|
|
@@ -25,10 +37,10 @@
|
|
|
25
37
|
"dependencies": {
|
|
26
38
|
"uuidv7": "^0.6.3",
|
|
27
39
|
"zod": "^3.22.4",
|
|
28
|
-
"@peac/kernel": "0.10.
|
|
29
|
-
"@peac/schema": "0.10.
|
|
30
|
-
"@peac/crypto": "0.10.
|
|
31
|
-
"@peac/telemetry": "0.10.
|
|
40
|
+
"@peac/kernel": "0.10.8",
|
|
41
|
+
"@peac/schema": "0.10.8",
|
|
42
|
+
"@peac/crypto": "0.10.8",
|
|
43
|
+
"@peac/telemetry": "0.10.8"
|
|
32
44
|
},
|
|
33
45
|
"devDependencies": {
|
|
34
46
|
"@types/node": "^20.10.0",
|