@wildo-ai/platform-config-lib 1.1.9 → 1.1.11
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/esm/_unimplemented/unimplemented-field-warning.d.ts +1 -1
- package/dist/esm/_unimplemented/unimplemented-field-warning.js +1 -1
- package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +1 -1
- package/dist/esm/blueprint/anchored-region.d.ts +83 -0
- package/dist/esm/blueprint/anchored-region.d.ts.map +1 -0
- package/dist/esm/blueprint/anchored-region.js +263 -0
- package/dist/esm/blueprint/anchored-region.js.map +1 -0
- package/dist/esm/blueprint/blueprint.schemas.d.ts +689 -0
- package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -0
- package/dist/esm/blueprint/blueprint.schemas.js +638 -0
- package/dist/esm/blueprint/blueprint.schemas.js.map +1 -0
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts +13 -1
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.js +6 -0
- package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts +21 -3
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.js +14 -3
- package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +121 -0
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js +129 -0
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/runtime-response-integrity.d.ts +249 -0
- package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-response-integrity.js +353 -0
- package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts +32 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.js +43 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -0
- package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts +51 -0
- package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -0
- package/dist/esm/canonical-json/rfc8785-canonical-json.js +231 -0
- package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -0
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/key-management/approval-seal-verifier.d.ts +216 -0
- package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -0
- package/dist/esm/key-management/approval-seal-verifier.js +233 -0
- package/dist/esm/key-management/approval-seal-verifier.js.map +1 -0
- package/dist/esm/key-management/approval-seal.contracts.d.ts +131 -0
- package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/approval-seal.contracts.js +115 -0
- package/dist/esm/key-management/approval-seal.contracts.js.map +1 -0
- package/dist/esm/key-management/data-key.contracts.d.ts +108 -0
- package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/data-key.contracts.js +54 -0
- package/dist/esm/key-management/data-key.contracts.js.map +1 -0
- package/dist/esm/key-management/es256-jws.d.ts +60 -0
- package/dist/esm/key-management/es256-jws.d.ts.map +1 -0
- package/dist/esm/key-management/es256-jws.js +135 -0
- package/dist/esm/key-management/es256-jws.js.map +1 -0
- package/dist/esm/key-management/key-provider.spi.d.ts +151 -0
- package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -0
- package/dist/esm/key-management/key-provider.spi.js +38 -0
- package/dist/esm/key-management/key-provider.spi.js.map +1 -0
- package/dist/esm/key-management/keyring-rotation.contracts.d.ts +93 -0
- package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/keyring-rotation.contracts.js +101 -0
- package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -0
- package/dist/esm/key-management/keyring-status.contracts.d.ts +66 -0
- package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/keyring-status.contracts.js +45 -0
- package/dist/esm/key-management/keyring-status.contracts.js.map +1 -0
- package/dist/esm/key-management/signature-request.contracts.d.ts +95 -0
- package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/signature-request.contracts.js +96 -0
- package/dist/esm/key-management/signature-request.contracts.js.map +1 -0
- package/dist/esm/key-management/signing-log-export.contracts.d.ts +216 -0
- package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/signing-log-export.contracts.js +268 -0
- package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -0
- package/dist/esm/key-management/vault-custody.contracts.d.ts +55 -0
- package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/vault-custody.contracts.js +88 -0
- package/dist/esm/key-management/vault-custody.contracts.js.map +1 -0
- package/dist/esm/lockfile/lockfile-io.d.ts +7 -9
- package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
- package/dist/esm/lockfile/lockfile-io.js +23 -22
- package/dist/esm/lockfile/lockfile-io.js.map +1 -1
- package/dist/esm/lockfile/materialize-infra-section.d.ts +17 -14
- package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
- package/dist/esm/lockfile/materialize-infra-section.js +9 -9
- package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +26 -2
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +27 -2
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
- package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
- package/dist/esm/project-config/application-public-pricing-catalog.loader.js +9 -2
- package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
- package/dist/esm/project-config/application-served-public-documents.loader.d.ts +26 -0
- package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -0
- package/dist/esm/project-config/application-served-public-documents.loader.js +78 -0
- package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -0
- package/dist/esm/project-config/define-infra-env-config.d.ts +236 -15
- package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-infra-env-config.js +104 -91
- package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
- package/dist/esm/project-config/define-saas-config.d.ts +133 -3
- package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-saas-config.js +170 -19
- package/dist/esm/project-config/define-saas-config.js.map +1 -1
- package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
- package/dist/esm/project-config/hosted-infra-env-config.js +3 -0
- package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
- package/dist/esm/project-config/index.d.ts +3 -0
- package/dist/esm/project-config/index.d.ts.map +1 -1
- package/dist/esm/project-config/index.js +3 -0
- package/dist/esm/project-config/index.js.map +1 -1
- package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
- package/dist/esm/project-config/npm-version-range.js +39 -16
- package/dist/esm/project-config/npm-version-range.js.map +1 -1
- package/dist/esm/project-config/owning-package-tsconfig.d.ts +15 -0
- package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -0
- package/dist/esm/project-config/owning-package-tsconfig.js +29 -0
- package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -0
- package/dist/esm/project-config/provider-companion-discovery.d.ts +4 -4
- package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
- package/dist/esm/project-config/provider-companion-discovery.js +13 -9
- package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts +32 -3
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
- package/dist/esm/project-config/provider-runtime-artifacts.js +67 -13
- package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
- package/dist/esm/project-config/shared/csp-defaults.d.ts +4 -5
- package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
- package/dist/esm/project-config/shared/csp-defaults.js +4 -5
- package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
- package/dist/esm/project-config/shared/csp.schemas.d.ts +1 -2
- package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/csp.schemas.js +1 -2
- package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.d.ts +6 -0
- package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.js +8 -1
- package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +1 -0
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +3 -0
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +4 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
- package/dist/esm/project-config/shared/minion-resource-access.validation.js +6 -2
- package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
- package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +250 -0
- package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/platform-key-management.schemas.js +194 -0
- package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -0
- package/dist/esm/registry/index.d.ts +1 -0
- package/dist/esm/registry/index.d.ts.map +1 -1
- package/dist/esm/registry/index.js +1 -0
- package/dist/esm/registry/index.js.map +1 -1
- package/dist/esm/registry/local-checkout-source.d.ts +22 -2
- package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
- package/dist/esm/registry/local-checkout-source.js +66 -3
- package/dist/esm/registry/local-checkout-source.js.map +1 -1
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +10 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-artifact.schemas.d.ts +23 -0
- package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-manifest.schemas.d.ts +336 -18
- package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-manifest.schemas.js +245 -19
- package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
- package/dist/esm/registry/module-search.schemas.d.ts +2 -0
- package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-search.schemas.js +14 -1
- package/dist/esm/registry/module-search.schemas.js.map +1 -1
- package/dist/esm/registry/registry-errors.d.ts +22 -2
- package/dist/esm/registry/registry-errors.d.ts.map +1 -1
- package/dist/esm/registry/registry-errors.js +28 -2
- package/dist/esm/registry/registry-errors.js.map +1 -1
- package/dist/esm/registry/registry-section-schemas.constants.d.ts +5 -0
- package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
- package/dist/esm/registry/registry-url-resolution.d.ts +72 -0
- package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -0
- package/dist/esm/registry/registry-url-resolution.js +157 -0
- package/dist/esm/registry/registry-url-resolution.js.map +1 -0
- package/dist/esm/schemas/framework-secrets.schemas.d.ts +55 -0
- package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.js +53 -0
- package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RFC 8785 (JSON Canonicalization Scheme) serialization: the ONE implementation in the repository.
|
|
3
|
+
*
|
|
4
|
+
* Lived in `saas-backend-lib` (`flows-actors/utils/canonical-json.backend.utils.ts`) until 2026-10-19, when the response
|
|
5
|
+
* signatures of #2921 needed it on both sides of the apps-manager boundary. It moved here, to the dependency-light
|
|
6
|
+
* contracts package every runtime and every platform service already depends on, rather than gaining a second copy:
|
|
7
|
+
* a hand-rolled alternative (`stableJsonStringify`) was briefly used for those signatures and was wrong in two ways an
|
|
8
|
+
* RFC 8785 serializer is not. It assigned keys onto an ordinary object, so a `"__proto__"` member set the prototype
|
|
9
|
+
* and vanished from the serialization, letting it be added to a signed body undetected; and it let JavaScript order
|
|
10
|
+
* integer-like keys numerically, which no verifier in another language would reproduce.
|
|
11
|
+
*
|
|
12
|
+
* What this serializer guarantees: object keys compared as raw UTF-16 code units; arrays in authored order; numbers in
|
|
13
|
+
* ECMAScript's finite JSON form; strings preserved without Unicode normalization; no whitespace; and members built on
|
|
14
|
+
* null-prototype objects, so `__proto__` is an ordinary member. Values `JSON.stringify` would silently coerce or omit
|
|
15
|
+
* are refused instead, because such coercion would collapse distinct inputs onto one digest.
|
|
16
|
+
*
|
|
17
|
+
* Consumers: apps-manager response signatures (`runtime-response-integrity.ts`), the framework-knowledge generation
|
|
18
|
+
* pipeline (deterministic output bytes), and the meta-workflow compiler tests.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* A fail-closed canonicalization error with the structural location of the
|
|
22
|
+
* invalid value. Error messages intentionally describe shape/type only and do
|
|
23
|
+
* not interpolate the rejected value, which may contain application data.
|
|
24
|
+
*/
|
|
25
|
+
export class CanonicalJsonError extends TypeError {
|
|
26
|
+
path;
|
|
27
|
+
constructor(path, reason) {
|
|
28
|
+
super(`Canonical JSON rejected ${path}: ${reason}`);
|
|
29
|
+
this.name = 'CanonicalJsonError';
|
|
30
|
+
this.path = path;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Produce RFC 8785/JCS-compatible JSON text from strict JSON data.
|
|
35
|
+
*
|
|
36
|
+
* Object keys are compared as raw UTF-16 code units, arrays retain their
|
|
37
|
+
* authored order, numbers use ECMAScript's finite-number JSON form, strings
|
|
38
|
+
* are preserved without Unicode normalization, and no whitespace is emitted.
|
|
39
|
+
* Values that JavaScript's ordinary `JSON.stringify` would silently coerce or
|
|
40
|
+
* omit are rejected instead, because such coercion would collapse distinct
|
|
41
|
+
* semantic inputs onto one digest.
|
|
42
|
+
*/
|
|
43
|
+
export function canonicalizeJson(value) {
|
|
44
|
+
const normalized = normalizeJsonValue(value, '$', new WeakSet());
|
|
45
|
+
return serializeNormalizedJsonValue(normalized);
|
|
46
|
+
}
|
|
47
|
+
function normalizeJsonValue(value, path, ancestors) {
|
|
48
|
+
if (value === null) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
switch (typeof value) {
|
|
52
|
+
case 'boolean':
|
|
53
|
+
return value;
|
|
54
|
+
case 'number':
|
|
55
|
+
if (!Number.isFinite(value)) {
|
|
56
|
+
throw new CanonicalJsonError(path, 'numbers must be finite IEEE-754 values');
|
|
57
|
+
}
|
|
58
|
+
return value;
|
|
59
|
+
case 'string':
|
|
60
|
+
assertPairedSurrogates(value, path);
|
|
61
|
+
return value;
|
|
62
|
+
case 'undefined':
|
|
63
|
+
case 'function':
|
|
64
|
+
case 'symbol':
|
|
65
|
+
case 'bigint':
|
|
66
|
+
throw new CanonicalJsonError(path, `${typeof value} is not JSON data`);
|
|
67
|
+
case 'object':
|
|
68
|
+
if (Array.isArray(value)) {
|
|
69
|
+
return normalizeJsonArray(value, path, ancestors);
|
|
70
|
+
}
|
|
71
|
+
if (!isPlainJsonObject(value)) {
|
|
72
|
+
throw new CanonicalJsonError(path, 'objects must have Object.prototype or null prototype and no toJSON behavior');
|
|
73
|
+
}
|
|
74
|
+
return normalizePlainJsonObject(value, path, ancestors);
|
|
75
|
+
default:
|
|
76
|
+
throw new CanonicalJsonError(path, 'unsupported JavaScript value');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function normalizeJsonArray(value, path, ancestors) {
|
|
80
|
+
if (Object.getPrototypeOf(value) !== Array.prototype) {
|
|
81
|
+
throw new CanonicalJsonError(path, 'non-plain arrays are not JSON data');
|
|
82
|
+
}
|
|
83
|
+
enterContainer(value, path, ancestors);
|
|
84
|
+
try {
|
|
85
|
+
const indexDescriptors = new Map();
|
|
86
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
87
|
+
if (typeof key === 'symbol') {
|
|
88
|
+
throw new CanonicalJsonError(path, 'symbol-keyed array properties are not JSON data');
|
|
89
|
+
}
|
|
90
|
+
if (key === 'length') {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const index = parseCanonicalArrayIndex(key);
|
|
94
|
+
if (index === null || index >= value.length) {
|
|
95
|
+
throw new CanonicalJsonError(path, `array property ${JSON.stringify(key)} is not an element`);
|
|
96
|
+
}
|
|
97
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
98
|
+
if (descriptor === undefined || !('value' in descriptor) || !descriptor.enumerable) {
|
|
99
|
+
throw new CanonicalJsonError(`${path}[${index}]`, 'array elements must be enumerable data properties');
|
|
100
|
+
}
|
|
101
|
+
indexDescriptors.set(index, descriptor);
|
|
102
|
+
}
|
|
103
|
+
if (indexDescriptors.size !== value.length) {
|
|
104
|
+
throw new CanonicalJsonError(path, 'sparse arrays are not permitted');
|
|
105
|
+
}
|
|
106
|
+
const normalized = [];
|
|
107
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
108
|
+
const descriptor = indexDescriptors.get(index);
|
|
109
|
+
if (descriptor === undefined) {
|
|
110
|
+
throw new CanonicalJsonError(path, 'sparse arrays are not permitted');
|
|
111
|
+
}
|
|
112
|
+
normalized.push(normalizeJsonValue(descriptor.value, `${path}[${index}]`, ancestors));
|
|
113
|
+
}
|
|
114
|
+
return normalized;
|
|
115
|
+
}
|
|
116
|
+
finally {
|
|
117
|
+
ancestors.delete(value);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function normalizePlainJsonObject(value, path, ancestors, excludedFields = new Set()) {
|
|
121
|
+
if (!isPlainJsonObject(value)) {
|
|
122
|
+
throw new CanonicalJsonError(path, 'objects must have Object.prototype or null prototype and no toJSON behavior');
|
|
123
|
+
}
|
|
124
|
+
enterContainer(value, path, ancestors);
|
|
125
|
+
try {
|
|
126
|
+
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
127
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
128
|
+
if (typeof key === 'symbol') {
|
|
129
|
+
throw new CanonicalJsonError(path, 'symbol-keyed object properties are not JSON data');
|
|
130
|
+
}
|
|
131
|
+
const descriptor = descriptors[key];
|
|
132
|
+
if (descriptor === undefined || !('value' in descriptor) || !descriptor.enumerable) {
|
|
133
|
+
throw new CanonicalJsonError(appendObjectPath(path, key), 'object members must be enumerable data properties');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const normalized = Object.create(null);
|
|
137
|
+
const keys = Object.keys(descriptors).sort(compareUtf16CodeUnits);
|
|
138
|
+
for (const key of keys) {
|
|
139
|
+
assertPairedSurrogates(key, `${path} (object key)`);
|
|
140
|
+
if (excludedFields.has(key)) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const descriptor = descriptors[key];
|
|
144
|
+
if (descriptor === undefined || !('value' in descriptor)) {
|
|
145
|
+
throw new CanonicalJsonError(appendObjectPath(path, key), 'object members must be data properties');
|
|
146
|
+
}
|
|
147
|
+
normalized[key] = normalizeJsonValue(descriptor.value, appendObjectPath(path, key), ancestors);
|
|
148
|
+
}
|
|
149
|
+
return normalized;
|
|
150
|
+
}
|
|
151
|
+
finally {
|
|
152
|
+
ancestors.delete(value);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function serializeNormalizedJsonValue(value) {
|
|
156
|
+
if (value === null || typeof value === 'boolean' || typeof value === 'number') {
|
|
157
|
+
const serialized = JSON.stringify(value);
|
|
158
|
+
if (serialized === undefined) {
|
|
159
|
+
throw new CanonicalJsonError('$', 'failed to serialize JSON primitive');
|
|
160
|
+
}
|
|
161
|
+
return serialized;
|
|
162
|
+
}
|
|
163
|
+
if (typeof value === 'string') {
|
|
164
|
+
return JSON.stringify(value);
|
|
165
|
+
}
|
|
166
|
+
if (Array.isArray(value)) {
|
|
167
|
+
return `[${value.map(serializeNormalizedJsonValue).join(',')}]`;
|
|
168
|
+
}
|
|
169
|
+
const objectValue = value;
|
|
170
|
+
const entries = Object.keys(objectValue)
|
|
171
|
+
.sort(compareUtf16CodeUnits)
|
|
172
|
+
.map((key) => `${JSON.stringify(key)}:${serializeNormalizedJsonValue(objectValue[key])}`);
|
|
173
|
+
return `{${entries.join(',')}}`;
|
|
174
|
+
}
|
|
175
|
+
function isPlainJsonObject(value) {
|
|
176
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
const prototype = Object.getPrototypeOf(value);
|
|
180
|
+
return prototype === Object.prototype || prototype === null;
|
|
181
|
+
}
|
|
182
|
+
function enterContainer(value, path, ancestors) {
|
|
183
|
+
if (ancestors.has(value)) {
|
|
184
|
+
throw new CanonicalJsonError(path, 'cyclic references are not permitted');
|
|
185
|
+
}
|
|
186
|
+
ancestors.add(value);
|
|
187
|
+
}
|
|
188
|
+
function parseCanonicalArrayIndex(key) {
|
|
189
|
+
if (key === '') {
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
const index = Number(key);
|
|
193
|
+
if (!Number.isInteger(index)
|
|
194
|
+
|| index < 0
|
|
195
|
+
|| index >= 0xffff_ffff
|
|
196
|
+
|| String(index) !== key) {
|
|
197
|
+
return null;
|
|
198
|
+
}
|
|
199
|
+
return index;
|
|
200
|
+
}
|
|
201
|
+
function compareUtf16CodeUnits(left, right) {
|
|
202
|
+
if (left < right) {
|
|
203
|
+
return -1;
|
|
204
|
+
}
|
|
205
|
+
if (left > right) {
|
|
206
|
+
return 1;
|
|
207
|
+
}
|
|
208
|
+
return 0;
|
|
209
|
+
}
|
|
210
|
+
function assertPairedSurrogates(value, path) {
|
|
211
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
212
|
+
const codeUnit = value.charCodeAt(index);
|
|
213
|
+
if (codeUnit >= 0xd800 && codeUnit <= 0xdbff) {
|
|
214
|
+
const nextCodeUnit = value.charCodeAt(index + 1);
|
|
215
|
+
if (!Number.isFinite(nextCodeUnit)
|
|
216
|
+
|| nextCodeUnit < 0xdc00
|
|
217
|
+
|| nextCodeUnit > 0xdfff) {
|
|
218
|
+
throw new CanonicalJsonError(path, 'strings must not contain unpaired UTF-16 surrogates');
|
|
219
|
+
}
|
|
220
|
+
index += 1;
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
if (codeUnit >= 0xdc00 && codeUnit <= 0xdfff) {
|
|
224
|
+
throw new CanonicalJsonError(path, 'strings must not contain unpaired UTF-16 surrogates');
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
function appendObjectPath(path, key) {
|
|
229
|
+
return `${path}[${JSON.stringify(key)}]`;
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=rfc8785-canonical-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rfc8785-canonical-json.js","sourceRoot":"","sources":["../../../../src/canonical-json/rfc8785-canonical-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAkBH;;;;GAIG;AACH,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAC/B,IAAI,CAAS;IAE7B,YAAmB,IAAY,EAAE,MAAc;QAC7C,KAAK,CAAC,2BAA2B,IAAI,KAAK,MAAM,EAAE,CAAC,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C;AACX,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAa,EAAE,IAAY;IACzD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,QAAQ,IAAI,MAAM,IAAI,QAAQ,IAAI,MAAM,EAAE,CAAC;YAC7C,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YACjD,IACE,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;mBAC3B,YAAY,GAAG,MAAM;mBACrB,YAAY,GAAG,MAAM,EACxB,CAAC;gBACD,MAAM,IAAI,kBAAkB,CAC1B,IAAI,EACJ,qDAAqD,CACtD,CAAC;YACJ,CAAC;YACD,KAAK,IAAI,CAAC,CAAC;YACX,SAAS;QACX,CAAC;QACD,IAAI,QAAQ,IAAI,MAAM,IAAI,QAAQ,IAAI,MAAM,EAAE,CAAC;YAC7C,MAAM,IAAI,kBAAkB,CAC1B,IAAI,EACJ,qDAAqD,CACtD,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY,EAAE,GAAW;IACjD,OAAO,GAAG,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC;AAC3C,CAAC","sourcesContent":["/**\n * RFC 8785 (JSON Canonicalization Scheme) serialization: the ONE implementation in the repository.\n *\n * Lived in `saas-backend-lib` (`flows-actors/utils/canonical-json.backend.utils.ts`) until 2026-10-19, when the response\n * signatures of #2921 needed it on both sides of the apps-manager boundary. It moved here, to the dependency-light\n * contracts package every runtime and every platform service already depends on, rather than gaining a second copy:\n * a hand-rolled alternative (`stableJsonStringify`) was briefly used for those signatures and was wrong in two ways an\n * RFC 8785 serializer is not. It assigned keys onto an ordinary object, so a `\"__proto__\"` member set the prototype\n * and vanished from the serialization, letting it be added to a signed body undetected; and it let JavaScript order\n * integer-like keys numerically, which no verifier in another language would reproduce.\n *\n * What this serializer guarantees: object keys compared as raw UTF-16 code units; arrays in authored order; numbers in\n * ECMAScript's finite JSON form; strings preserved without Unicode normalization; no whitespace; and members built on\n * null-prototype objects, so `__proto__` is an ordinary member. Values `JSON.stringify` would silently coerce or omit\n * are refused instead, because such coercion would collapse distinct inputs onto one digest.\n *\n * Consumers: apps-manager response signatures (`runtime-response-integrity.ts`), the framework-knowledge generation\n * pipeline (deterministic output bytes), and the meta-workflow compiler tests.\n */\n\n/**\n * The JSON data model accepted by the canonicalization boundary.\n *\n * The runtime functions intentionally accept `unknown` and validate it rather\n * than trusting this compile-time shape. Digest inputs may originate in parsed\n * artifacts or application-owned adapters, so a type assertion must never be\n * enough to admit a non-JSON value into semantic identity.\n */\nexport type JsonValue =\n | null\n | boolean\n | number\n | string\n | readonly JsonValue[]\n | { readonly [key: string]: JsonValue };\n\n/**\n * A fail-closed canonicalization error with the structural location of the\n * invalid value. Error messages intentionally describe shape/type only and do\n * not interpolate the rejected value, which may contain application data.\n */\nexport class CanonicalJsonError extends TypeError {\n public readonly path: string;\n\n public constructor(path: string, reason: string) {\n super(`Canonical JSON rejected ${path}: ${reason}`);\n this.name = 'CanonicalJsonError';\n this.path = path;\n }\n}\n\n/**\n * Produce RFC 8785/JCS-compatible JSON text from strict JSON data.\n *\n * Object keys are compared as raw UTF-16 code units, arrays retain their\n * authored order, numbers use ECMAScript's finite-number JSON form, strings\n * are preserved without Unicode normalization, and no whitespace is emitted.\n * Values that JavaScript's ordinary `JSON.stringify` would silently coerce or\n * omit are rejected instead, because such coercion would collapse distinct\n * semantic inputs onto one digest.\n */\nexport function canonicalizeJson(value: unknown): string {\n const normalized = normalizeJsonValue(value, '$', new WeakSet<object>());\n return serializeNormalizedJsonValue(normalized);\n}\n\nfunction normalizeJsonValue(\n value: unknown,\n path: string,\n ancestors: WeakSet<object>,\n): JsonValue {\n if (value === null) {\n return null;\n }\n\n switch (typeof value) {\n case 'boolean':\n return value;\n case 'number':\n if (!Number.isFinite(value)) {\n throw new CanonicalJsonError(\n path,\n 'numbers must be finite IEEE-754 values',\n );\n }\n return value;\n case 'string':\n assertPairedSurrogates(value, path);\n return value;\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'bigint':\n throw new CanonicalJsonError(\n path,\n `${typeof value} is not JSON data`,\n );\n case 'object':\n if (Array.isArray(value)) {\n return normalizeJsonArray(value, path, ancestors);\n }\n if (!isPlainJsonObject(value)) {\n throw new CanonicalJsonError(\n path,\n 'objects must have Object.prototype or null prototype and no toJSON behavior',\n );\n }\n return normalizePlainJsonObject(value, path, ancestors);\n default:\n throw new CanonicalJsonError(path, 'unsupported JavaScript value');\n }\n}\n\nfunction normalizeJsonArray(\n value: unknown[],\n path: string,\n ancestors: WeakSet<object>,\n): readonly JsonValue[] {\n if (Object.getPrototypeOf(value) !== Array.prototype) {\n throw new CanonicalJsonError(path, 'non-plain arrays are not JSON data');\n }\n enterContainer(value, path, ancestors);\n\n try {\n const indexDescriptors = new Map<number, PropertyDescriptor>();\n for (const key of Reflect.ownKeys(value)) {\n if (typeof key === 'symbol') {\n throw new CanonicalJsonError(\n path,\n 'symbol-keyed array properties are not JSON data',\n );\n }\n if (key === 'length') {\n continue;\n }\n\n const index = parseCanonicalArrayIndex(key);\n if (index === null || index >= value.length) {\n throw new CanonicalJsonError(\n path,\n `array property ${JSON.stringify(key)} is not an element`,\n );\n }\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined || !('value' in descriptor) || !descriptor.enumerable) {\n throw new CanonicalJsonError(\n `${path}[${index}]`,\n 'array elements must be enumerable data properties',\n );\n }\n indexDescriptors.set(index, descriptor);\n }\n\n if (indexDescriptors.size !== value.length) {\n throw new CanonicalJsonError(path, 'sparse arrays are not permitted');\n }\n\n const normalized: JsonValue[] = [];\n for (let index = 0; index < value.length; index += 1) {\n const descriptor = indexDescriptors.get(index);\n if (descriptor === undefined) {\n throw new CanonicalJsonError(path, 'sparse arrays are not permitted');\n }\n normalized.push(\n normalizeJsonValue(descriptor.value, `${path}[${index}]`, ancestors),\n );\n }\n return normalized;\n } finally {\n ancestors.delete(value);\n }\n}\n\nfunction normalizePlainJsonObject(\n value: object,\n path: string,\n ancestors: WeakSet<object>,\n excludedFields: ReadonlySet<string> = new Set<string>(),\n): { readonly [key: string]: JsonValue } {\n if (!isPlainJsonObject(value)) {\n throw new CanonicalJsonError(\n path,\n 'objects must have Object.prototype or null prototype and no toJSON behavior',\n );\n }\n enterContainer(value, path, ancestors);\n\n try {\n const descriptors = Object.getOwnPropertyDescriptors(value);\n for (const key of Reflect.ownKeys(value)) {\n if (typeof key === 'symbol') {\n throw new CanonicalJsonError(\n path,\n 'symbol-keyed object properties are not JSON data',\n );\n }\n const descriptor = descriptors[key];\n if (descriptor === undefined || !('value' in descriptor) || !descriptor.enumerable) {\n throw new CanonicalJsonError(\n appendObjectPath(path, key),\n 'object members must be enumerable data properties',\n );\n }\n }\n\n const normalized: { [key: string]: JsonValue } = Object.create(null);\n const keys = Object.keys(descriptors).sort(compareUtf16CodeUnits);\n for (const key of keys) {\n assertPairedSurrogates(key, `${path} (object key)`);\n if (excludedFields.has(key)) {\n continue;\n }\n const descriptor = descriptors[key];\n if (descriptor === undefined || !('value' in descriptor)) {\n throw new CanonicalJsonError(\n appendObjectPath(path, key),\n 'object members must be data properties',\n );\n }\n normalized[key] = normalizeJsonValue(\n descriptor.value,\n appendObjectPath(path, key),\n ancestors,\n );\n }\n return normalized;\n } finally {\n ancestors.delete(value);\n }\n}\n\nfunction serializeNormalizedJsonValue(value: JsonValue): string {\n if (value === null || typeof value === 'boolean' || typeof value === 'number') {\n const serialized = JSON.stringify(value);\n if (serialized === undefined) {\n throw new CanonicalJsonError('$', 'failed to serialize JSON primitive');\n }\n return serialized;\n }\n if (typeof value === 'string') {\n return JSON.stringify(value);\n }\n if (Array.isArray(value)) {\n return `[${value.map(serializeNormalizedJsonValue).join(',')}]`;\n }\n\n const objectValue = value as { readonly [key: string]: JsonValue };\n const entries = Object.keys(objectValue)\n .sort(compareUtf16CodeUnits)\n .map(\n (key) =>\n `${JSON.stringify(key)}:${serializeNormalizedJsonValue(objectValue[key])}`,\n );\n return `{${entries.join(',')}}`;\n}\n\nfunction isPlainJsonObject(value: unknown): value is Record<string, unknown> {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) {\n return false;\n }\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\n\nfunction enterContainer(\n value: object,\n path: string,\n ancestors: WeakSet<object>,\n): void {\n if (ancestors.has(value)) {\n throw new CanonicalJsonError(path, 'cyclic references are not permitted');\n }\n ancestors.add(value);\n}\n\nfunction parseCanonicalArrayIndex(key: string): number | null {\n if (key === '') {\n return null;\n }\n const index = Number(key);\n if (\n !Number.isInteger(index)\n || index < 0\n || index >= 0xffff_ffff\n || String(index) !== key\n ) {\n return null;\n }\n return index;\n}\n\nfunction compareUtf16CodeUnits(left: string, right: string): number {\n if (left < right) {\n return -1;\n }\n if (left > right) {\n return 1;\n }\n return 0;\n}\n\nfunction assertPairedSurrogates(value: string, path: string): void {\n for (let index = 0; index < value.length; index += 1) {\n const codeUnit = value.charCodeAt(index);\n if (codeUnit >= 0xd800 && codeUnit <= 0xdbff) {\n const nextCodeUnit = value.charCodeAt(index + 1);\n if (\n !Number.isFinite(nextCodeUnit)\n || nextCodeUnit < 0xdc00\n || nextCodeUnit > 0xdfff\n ) {\n throw new CanonicalJsonError(\n path,\n 'strings must not contain unpaired UTF-16 surrogates',\n );\n }\n index += 1;\n continue;\n }\n if (codeUnit >= 0xdc00 && codeUnit <= 0xdfff) {\n throw new CanonicalJsonError(\n path,\n 'strings must not contain unpaired UTF-16 surrogates',\n );\n }\n }\n}\n\nfunction appendObjectPath(path: string, key: string): string {\n return `${path}[${JSON.stringify(key)}]`;\n}\n"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -14,8 +14,20 @@ export * from './bootstrap/application-backend-env.contracts';
|
|
|
14
14
|
export * from './bootstrap/wildo-owner-organization.contracts';
|
|
15
15
|
export * from './bootstrap/application-creation-verification-env.contracts';
|
|
16
16
|
export * from './bootstrap/platform-runtime-env.contracts';
|
|
17
|
+
export * from './bootstrap/runtime-secret-env.contracts';
|
|
17
18
|
export * from './bootstrap/runtime-topology.contracts';
|
|
18
19
|
export * from './bootstrap/runtime-principal.contracts';
|
|
20
|
+
export * from './bootstrap/runtime-response-integrity';
|
|
21
|
+
export * from './key-management/es256-jws';
|
|
22
|
+
export * from './key-management/data-key.contracts';
|
|
23
|
+
export * from './key-management/key-provider.spi';
|
|
24
|
+
export * from './key-management/keyring-rotation.contracts';
|
|
25
|
+
export * from './key-management/keyring-status.contracts';
|
|
26
|
+
export * from './key-management/signature-request.contracts';
|
|
27
|
+
export * from './key-management/approval-seal.contracts';
|
|
28
|
+
export * from './key-management/approval-seal-verifier';
|
|
29
|
+
export * from './key-management/signing-log-export.contracts';
|
|
30
|
+
export * from './key-management/vault-custody.contracts';
|
|
19
31
|
export * from './bootstrap/runtime-backing-service-access';
|
|
20
32
|
export * from './bootstrap/platform-store-preconnect';
|
|
21
33
|
export * from './bootstrap/runtime-network-topology';
|
|
@@ -30,6 +42,9 @@ export * from './lockfile/file-lock-hold';
|
|
|
30
42
|
export * from './lockfile/build-parallelism';
|
|
31
43
|
export * from './lockfile/materialize-infra-section';
|
|
32
44
|
export * from './lockfile/canonical-json';
|
|
45
|
+
export * from './canonical-json/rfc8785-canonical-json';
|
|
33
46
|
export * from './registry';
|
|
47
|
+
export * from './blueprint/blueprint.schemas';
|
|
48
|
+
export * from './blueprint/anchored-region';
|
|
34
49
|
export * from './_unimplemented';
|
|
35
50
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4CAA4C,CAAC;AAE3D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6DAA6D,CAAC;AAC5E,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qDAAqD,CAAC;AACpE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4CAA4C,CAAC;AAE3D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6DAA6D,CAAC;AAC5E,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qDAAqD,CAAC;AACpE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yCAAyC,CAAC;AACxD,cAAc,YAAY,CAAC;AAC3B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -14,8 +14,20 @@ export * from './bootstrap/application-backend-env.contracts.js';
|
|
|
14
14
|
export * from './bootstrap/wildo-owner-organization.contracts.js';
|
|
15
15
|
export * from './bootstrap/application-creation-verification-env.contracts.js';
|
|
16
16
|
export * from './bootstrap/platform-runtime-env.contracts.js';
|
|
17
|
+
export * from './bootstrap/runtime-secret-env.contracts.js';
|
|
17
18
|
export * from './bootstrap/runtime-topology.contracts.js';
|
|
18
19
|
export * from './bootstrap/runtime-principal.contracts.js';
|
|
20
|
+
export * from './bootstrap/runtime-response-integrity.js';
|
|
21
|
+
export * from './key-management/es256-jws.js';
|
|
22
|
+
export * from './key-management/data-key.contracts.js';
|
|
23
|
+
export * from './key-management/key-provider.spi.js';
|
|
24
|
+
export * from './key-management/keyring-rotation.contracts.js';
|
|
25
|
+
export * from './key-management/keyring-status.contracts.js';
|
|
26
|
+
export * from './key-management/signature-request.contracts.js';
|
|
27
|
+
export * from './key-management/approval-seal.contracts.js';
|
|
28
|
+
export * from './key-management/approval-seal-verifier.js';
|
|
29
|
+
export * from './key-management/signing-log-export.contracts.js';
|
|
30
|
+
export * from './key-management/vault-custody.contracts.js';
|
|
19
31
|
export * from './bootstrap/runtime-backing-service-access.js';
|
|
20
32
|
export * from './bootstrap/platform-store-preconnect.js';
|
|
21
33
|
export * from './bootstrap/runtime-network-topology.js';
|
|
@@ -30,6 +42,9 @@ export * from './lockfile/file-lock-hold.js';
|
|
|
30
42
|
export * from './lockfile/build-parallelism.js';
|
|
31
43
|
export * from './lockfile/materialize-infra-section.js';
|
|
32
44
|
export * from './lockfile/canonical-json.js';
|
|
45
|
+
export * from './canonical-json/rfc8785-canonical-json.js';
|
|
33
46
|
export * from './registry/index.js';
|
|
47
|
+
export * from './blueprint/blueprint.schemas.js';
|
|
48
|
+
export * from './blueprint/anchored-region.js';
|
|
34
49
|
export * from './_unimplemented/index.js';
|
|
35
50
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4CAA4C,CAAC;AAE3D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6DAA6D,CAAC;AAC5E,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qDAAqD,CAAC;AACpE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './project-config';\nexport * from './workspace-scope';\nexport * from './credentials/credential-generator.service';\n\nexport * from './schemas/platform-application-config.schemas';\nexport * from './schemas/platform-application-secrets.schemas';\nexport * from './schemas/platform-config.schemas';\nexport * from './schemas/framework-info.schemas';\nexport * from './schemas/framework-secrets.schemas';\nexport * from './release/framework-release.constants';\nexport * from './bootstrap/bootstrap.schemas';\nexport * from './bootstrap/bootstrap.contracts';\nexport * from './bootstrap/bootstrap-planner';\nexport * from './bootstrap/application-backend-env.contracts';\nexport * from './bootstrap/wildo-owner-organization.contracts';\nexport * from './bootstrap/application-creation-verification-env.contracts';\nexport * from './bootstrap/platform-runtime-env.contracts';\nexport * from './bootstrap/runtime-topology.contracts';\nexport * from './bootstrap/runtime-principal.contracts';\nexport * from './bootstrap/runtime-backing-service-access';\nexport * from './bootstrap/platform-store-preconnect';\nexport * from './bootstrap/runtime-network-topology';\nexport * from './bootstrap/runtime-network-policy';\nexport * from './bootstrap/runtime-platform-access';\nexport * from './project-config/minion-local-provider-registration';\nexport * from './project-config/shared/minion-resource-access.validation';\nexport * from './project-config/shared/object-storage-session-policy';\nexport * from './lockfile/wildo-saas-lock.shared.schemas';\nexport * from './lockfile/lockfile-io';\nexport * from './lockfile/file-lock-hold';\nexport * from './lockfile/build-parallelism';\nexport * from './lockfile/materialize-infra-section';\nexport * from './lockfile/canonical-json';\nexport * from './registry';\nexport * from './_unimplemented';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4CAA4C,CAAC;AAE3D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6DAA6D,CAAC;AAC5E,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qDAAqD,CAAC;AACpE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yCAAyC,CAAC;AACxD,cAAc,YAAY,CAAC;AAC3B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './project-config';\nexport * from './workspace-scope';\nexport * from './credentials/credential-generator.service';\n\nexport * from './schemas/platform-application-config.schemas';\nexport * from './schemas/platform-application-secrets.schemas';\nexport * from './schemas/platform-config.schemas';\nexport * from './schemas/framework-info.schemas';\nexport * from './schemas/framework-secrets.schemas';\nexport * from './release/framework-release.constants';\nexport * from './bootstrap/bootstrap.schemas';\nexport * from './bootstrap/bootstrap.contracts';\nexport * from './bootstrap/bootstrap-planner';\nexport * from './bootstrap/application-backend-env.contracts';\nexport * from './bootstrap/wildo-owner-organization.contracts';\nexport * from './bootstrap/application-creation-verification-env.contracts';\nexport * from './bootstrap/platform-runtime-env.contracts';\nexport * from './bootstrap/runtime-secret-env.contracts';\nexport * from './bootstrap/runtime-topology.contracts';\nexport * from './bootstrap/runtime-principal.contracts';\nexport * from './bootstrap/runtime-response-integrity';\nexport * from './key-management/es256-jws';\nexport * from './key-management/data-key.contracts';\nexport * from './key-management/key-provider.spi';\nexport * from './key-management/keyring-rotation.contracts';\nexport * from './key-management/keyring-status.contracts';\nexport * from './key-management/signature-request.contracts';\nexport * from './key-management/approval-seal.contracts';\nexport * from './key-management/approval-seal-verifier';\nexport * from './key-management/signing-log-export.contracts';\nexport * from './key-management/vault-custody.contracts';\nexport * from './bootstrap/runtime-backing-service-access';\nexport * from './bootstrap/platform-store-preconnect';\nexport * from './bootstrap/runtime-network-topology';\nexport * from './bootstrap/runtime-network-policy';\nexport * from './bootstrap/runtime-platform-access';\nexport * from './project-config/minion-local-provider-registration';\nexport * from './project-config/shared/minion-resource-access.validation';\nexport * from './project-config/shared/object-storage-session-policy';\nexport * from './lockfile/wildo-saas-lock.shared.schemas';\nexport * from './lockfile/lockfile-io';\nexport * from './lockfile/file-lock-hold';\nexport * from './lockfile/build-parallelism';\nexport * from './lockfile/materialize-infra-section';\nexport * from './lockfile/canonical-json';\nexport * from './canonical-json/rfc8785-canonical-json';\nexport * from './registry';\nexport * from './blueprint/blueprint.schemas';\nexport * from './blueprint/anchored-region';\nexport * from './_unimplemented';\n"]}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* # Verifying an approval seal, offline (#2903)
|
|
3
|
+
*
|
|
4
|
+
* Everything a verifier needs travels with the seal: the compact JWS, the stored records of the keys that may have signed
|
|
5
|
+
* it (their public half, scope and issuer, as an export carries them), and, when the person's content is to be shown,
|
|
6
|
+
* the disclosures. Nothing here calls the application or the platform, so a seal verifies after the application is gone.
|
|
7
|
+
*
|
|
8
|
+
* ## What is checked, and on whose authority
|
|
9
|
+
*
|
|
10
|
+
* - The header: ES256 is pinned per key from the key RECORD, never read from the header (RFC 8725 §3.1); `jku`, `x5u`,
|
|
11
|
+
* `jwk` and `x5c` are never followed (RFC 8725 §3.10, RFC 7515 §10.7); a `crit` naming anything is refused, since no
|
|
12
|
+
* extension is understood (RFC 7515 §4.1.11); `typ` must be the approval seal's.
|
|
13
|
+
* - The signature, under the key the `kid` names among those given.
|
|
14
|
+
* - The issuer: the payload's `iss` must be the key record's, and the expected issuer when one is given.
|
|
15
|
+
* - The claims: the version-1 shape, strict.
|
|
16
|
+
* - The key's scope, from its stored record and never from a JWKS member: an organization-scoped key verifies only a seal
|
|
17
|
+
* whose tenant is that organization.
|
|
18
|
+
* - The disclosures: each must digest to the commitment its claim names; a commitment with no disclosure is reported as
|
|
19
|
+
* erased (the person's content was removed, the seal stands).
|
|
20
|
+
* - A COMPROMISED key: the signature may still verify, but the seal is not PROVABLE unless corroborated by evidence the
|
|
21
|
+
* key's holder could not have forged: the decision's payload digest recorded outside the application before the
|
|
22
|
+
* compromise instant (an exported audit event, an immutable sink).
|
|
23
|
+
* - The OPERATOR'S PIN SET, when one is given (#2932): the key must be pinned, by the RFC 7638 thumbprint of the public
|
|
24
|
+
* half the verifier was handed (so a key record that names a pinned `kid` over another key is refused), and the pin's
|
|
25
|
+
* state, scope and compromise instant are used instead of the record's. The record (from a bundle, from the host)
|
|
26
|
+
* only supplies the public half and the issuer; the operator's pin decides whether that half is theirs and what became
|
|
27
|
+
* of it. Without a pin set the records are trusted as given, as before.
|
|
28
|
+
* - The OPERATOR'S KEPT SIGNING-LOG EXPORTS, when given (#2932): a seal under a key compromised after an export that lists
|
|
29
|
+
* it is corroborated by that export, which the host could not have signed after the compromise without the operator's
|
|
30
|
+
* copy disagreeing. Each export is verified here, with the operator's pin set for the export key.
|
|
31
|
+
*
|
|
32
|
+
* spec-cite: RFC 8725 §3.1 (algorithm verification), §3.10 (do not trust received URLs); RFC 7515 §4.1.11 (`crit`),
|
|
33
|
+
* §10.7 (key selection from header parameters). Cited by section; the behaviour is this file's decision.
|
|
34
|
+
*/
|
|
35
|
+
import { z } from 'zod';
|
|
36
|
+
import { CryptoKey_Scope, CryptoKey_VersionState, type CryptoKeyPinSet } from '@wildo-ai/saas-models';
|
|
37
|
+
import { ES256_JWS_ALGORITHM, type P256PublicJwk } from './es256-jws';
|
|
38
|
+
import { ApprovalSealDisclosureClaim, type ApprovalSealClaimsV1, type ApprovalSealDisclosureValue } from './approval-seal.contracts';
|
|
39
|
+
/** One key that may have signed a seal: its STORED record (scope, issuer, state), as an export carries it. */
|
|
40
|
+
export interface ApprovalSealVerificationKey {
|
|
41
|
+
readonly kid: string;
|
|
42
|
+
readonly publicJwk: P256PublicJwk;
|
|
43
|
+
/** The algorithm the key record pins. ES256 for every approval-seal key today. */
|
|
44
|
+
readonly alg: typeof ES256_JWS_ALGORITHM;
|
|
45
|
+
readonly scope: CryptoKey_Scope;
|
|
46
|
+
/** The application's id for an APPLICATION key, the organization's for an ORGANIZATION key. */
|
|
47
|
+
readonly scopeId: string;
|
|
48
|
+
readonly iss: string;
|
|
49
|
+
readonly state: CryptoKey_VersionState;
|
|
50
|
+
/** ISO 8601, for a COMPROMISED key: the earliest instant its private half may have been exposed. */
|
|
51
|
+
readonly compromiseInstant?: string;
|
|
52
|
+
}
|
|
53
|
+
/** Evidence recorded OUTSIDE the application that the decision's payload existed before a key's compromise. */
|
|
54
|
+
export interface ApprovalSealCorroboration {
|
|
55
|
+
readonly decisionPayloadDigest: string;
|
|
56
|
+
/** ISO 8601: when the evidence was recorded where the key's holder could not rewrite it. */
|
|
57
|
+
readonly recordedAt: string;
|
|
58
|
+
}
|
|
59
|
+
export interface ApprovalSealVerificationInput {
|
|
60
|
+
readonly jws: string;
|
|
61
|
+
readonly keys: readonly ApprovalSealVerificationKey[];
|
|
62
|
+
/** The issuer the seal must carry, when the verifier knows which application it expects. */
|
|
63
|
+
readonly expectedIssuer?: string;
|
|
64
|
+
readonly disclosures?: readonly ApprovalSealDisclosureValue[];
|
|
65
|
+
readonly corroboration?: ApprovalSealCorroboration;
|
|
66
|
+
/** The operator's pin set for approval seals (#2932), from a channel the host does not control. */
|
|
67
|
+
readonly pins?: CryptoKeyPinSet;
|
|
68
|
+
/**
|
|
69
|
+
* The signing-log exports the operator kept (#2932), with the records of the keys that signed them and the operator's
|
|
70
|
+
* pin set for SIGNING_LOG_EXPORT. An export that does not verify, or was signed after its own key's compromise, is
|
|
71
|
+
* ignored: it corroborates nothing.
|
|
72
|
+
*/
|
|
73
|
+
readonly signingLogExports?: {
|
|
74
|
+
readonly exports: readonly string[];
|
|
75
|
+
readonly keys: readonly ApprovalSealVerificationKey[];
|
|
76
|
+
readonly pins?: CryptoKeyPinSet;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/** What corroborated a seal under a compromised key. */
|
|
80
|
+
export declare enum ApprovalSealCorroborationSource {
|
|
81
|
+
/** The decision's payload digest, recorded outside the application before the compromise. */
|
|
82
|
+
RECORDED_EVIDENCE = "recorded_evidence",
|
|
83
|
+
/** A signing-log export the operator kept, signed before the compromise, lists the seal. */
|
|
84
|
+
SIGNING_LOG_EXPORT = "signing_log_export"
|
|
85
|
+
}
|
|
86
|
+
/** Why a seal does not verify. */
|
|
87
|
+
export declare enum ApprovalSealVerificationFailure {
|
|
88
|
+
/** Not a compact JWS with a JSON header and payload. */
|
|
89
|
+
MALFORMED = "malformed",
|
|
90
|
+
/** The header's `alg` is not the one the key record pins. */
|
|
91
|
+
ALGORITHM_NOT_PINNED = "algorithm_not_pinned",
|
|
92
|
+
/** The header names a critical extension, and none is understood. */
|
|
93
|
+
CRITICAL_EXTENSION = "critical_extension",
|
|
94
|
+
/** The header's `typ` is not the approval seal's. */
|
|
95
|
+
TYPE_MISMATCH = "type_mismatch",
|
|
96
|
+
/** No given key has the header's `kid`. */
|
|
97
|
+
UNKNOWN_KEY = "unknown_key",
|
|
98
|
+
SIGNATURE_INVALID = "signature_invalid",
|
|
99
|
+
/** The payload's issuer is not the key record's, or not the expected one. */
|
|
100
|
+
ISSUER_MISMATCH = "issuer_mismatch",
|
|
101
|
+
/** The payload is not the version-1 claims shape. */
|
|
102
|
+
CLAIMS_INVALID = "claims_invalid",
|
|
103
|
+
/** The key's stored scope does not cover the seal's tenant (or is not a scope a seal is signed under). */
|
|
104
|
+
TENANT_OUTSIDE_KEY_SCOPE = "tenant_outside_key_scope",
|
|
105
|
+
/** A disclosure does not digest to the commitment its claim names. */
|
|
106
|
+
DISCLOSURE_MISMATCH = "disclosure_mismatch",
|
|
107
|
+
/** A pin set was given and does not pin the key, or the key handed over is not the one its pinned `kid` names. */
|
|
108
|
+
UNPINNED = "unpinned"
|
|
109
|
+
}
|
|
110
|
+
/** What the seal says about one person's disclosure. */
|
|
111
|
+
export declare enum ApprovalSealDisclosureStanding {
|
|
112
|
+
/** Given, and it digests to the commitment. */
|
|
113
|
+
DISCLOSED = "disclosed",
|
|
114
|
+
/** Committed to, and not given: the content was erased (or withheld). The seal stands. */
|
|
115
|
+
ERASED = "erased"
|
|
116
|
+
}
|
|
117
|
+
export interface ApprovalSealVerification {
|
|
118
|
+
/** The signature verifies, under a key whose record covers the seal, over well-formed claims and matching disclosures. */
|
|
119
|
+
readonly valid: boolean;
|
|
120
|
+
readonly failures: readonly ApprovalSealVerificationFailure[];
|
|
121
|
+
/**
|
|
122
|
+
* The seal proves what it says: valid, and its key not compromised, or corroborated before the compromise. A valid seal
|
|
123
|
+
* under a compromised key, uncorroborated, is reported valid and NOT provable.
|
|
124
|
+
*/
|
|
125
|
+
readonly provable: boolean;
|
|
126
|
+
/** For a seal under a compromised key, what corroborated it; absent when nothing did (or nothing needed to). */
|
|
127
|
+
readonly corroboratedBy?: ApprovalSealCorroborationSource;
|
|
128
|
+
readonly kid?: string;
|
|
129
|
+
readonly keyState?: CryptoKey_VersionState;
|
|
130
|
+
readonly claims?: ApprovalSealClaimsV1;
|
|
131
|
+
readonly iss?: string;
|
|
132
|
+
/** The signing instant, epoch seconds. */
|
|
133
|
+
readonly iat?: number;
|
|
134
|
+
readonly lateSeal?: boolean;
|
|
135
|
+
/** Seconds between the decision and its signature: what the database held at signing is what is sealed. */
|
|
136
|
+
readonly signingWindowSeconds?: number;
|
|
137
|
+
/** The digest of the decision's committed payload, to compare with the RESOLVED row of an exported trail. */
|
|
138
|
+
readonly decisionPayloadDigest?: string;
|
|
139
|
+
readonly approver?: {
|
|
140
|
+
readonly standing: ApprovalSealDisclosureStanding;
|
|
141
|
+
readonly value?: Readonly<Record<string, unknown>>;
|
|
142
|
+
};
|
|
143
|
+
readonly requester?: {
|
|
144
|
+
readonly standing: ApprovalSealDisclosureStanding;
|
|
145
|
+
readonly value?: Readonly<Record<string, unknown>>;
|
|
146
|
+
};
|
|
147
|
+
/** What the person was shown (#2903 S6), when the seal binds it: DISCLOSED with the presentation, else not given. */
|
|
148
|
+
readonly presentation?: {
|
|
149
|
+
readonly standing: ApprovalSealDisclosureStanding;
|
|
150
|
+
readonly value?: Readonly<Record<string, unknown>>;
|
|
151
|
+
};
|
|
152
|
+
/** What the person answered, when the seal binds it. */
|
|
153
|
+
readonly statement?: {
|
|
154
|
+
readonly standing: ApprovalSealDisclosureStanding;
|
|
155
|
+
readonly value?: Readonly<Record<string, unknown>>;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/** See the file's header. Pure and offline. */
|
|
159
|
+
export declare function verifyApprovalSeal(input: ApprovalSealVerificationInput): ApprovalSealVerification;
|
|
160
|
+
/** A verification key as an export or a CLI file states it (dates as ISO strings): the one shape of a key record. */
|
|
161
|
+
export declare const ApprovalSealVerificationKeySchema: z.ZodObject<{
|
|
162
|
+
kid: z.ZodString;
|
|
163
|
+
publicJwk: z.ZodObject<{
|
|
164
|
+
kty: z.ZodLiteral<"EC">;
|
|
165
|
+
crv: z.ZodLiteral<"P-256">;
|
|
166
|
+
x: z.ZodString;
|
|
167
|
+
y: z.ZodString;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
alg: z.ZodLiteral<"ES256">;
|
|
170
|
+
scope: z.ZodEnum<typeof CryptoKey_Scope>;
|
|
171
|
+
scopeId: z.ZodString;
|
|
172
|
+
iss: z.ZodString;
|
|
173
|
+
state: z.ZodEnum<typeof CryptoKey_VersionState>;
|
|
174
|
+
compromiseInstant: z.ZodOptional<z.ZodString>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
/**
|
|
177
|
+
* Evidence recorded outside the application that a decision's payload existed before a key's compromise, as the file an
|
|
178
|
+
* operator keeps it in (`wildo seal verify --corroboration <file>`).
|
|
179
|
+
*/
|
|
180
|
+
export declare const ApprovalSealCorroborationSchema: z.ZodObject<{
|
|
181
|
+
decisionPayloadDigest: z.ZodString;
|
|
182
|
+
recordedAt: z.ZodString;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
/**
|
|
185
|
+
* What `wildo seal verify` reads: one seal and everything it needs to verify, offline. A bundle is what the HOST exports,
|
|
186
|
+
* so it carries no pin set, no signing-log exports and no corroboration: each is evidence against the host, and reaches
|
|
187
|
+
* the verifier only from the operator's own files (`ApprovalSealVerificationInput.pins` / `signingLogExports` /
|
|
188
|
+
* `corroboration`). The schema is not strict, so a bundle naming any of them has it stripped on parse rather than
|
|
189
|
+
* believed (#2932 review H1, R1).
|
|
190
|
+
*/
|
|
191
|
+
export declare const ApprovalSealVerificationBundleSchema: z.ZodObject<{
|
|
192
|
+
jws: z.ZodString;
|
|
193
|
+
keys: z.ZodArray<z.ZodObject<{
|
|
194
|
+
kid: z.ZodString;
|
|
195
|
+
publicJwk: z.ZodObject<{
|
|
196
|
+
kty: z.ZodLiteral<"EC">;
|
|
197
|
+
crv: z.ZodLiteral<"P-256">;
|
|
198
|
+
x: z.ZodString;
|
|
199
|
+
y: z.ZodString;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
alg: z.ZodLiteral<"ES256">;
|
|
202
|
+
scope: z.ZodEnum<typeof CryptoKey_Scope>;
|
|
203
|
+
scopeId: z.ZodString;
|
|
204
|
+
iss: z.ZodString;
|
|
205
|
+
state: z.ZodEnum<typeof CryptoKey_VersionState>;
|
|
206
|
+
compromiseInstant: z.ZodOptional<z.ZodString>;
|
|
207
|
+
}, z.core.$strip>>;
|
|
208
|
+
expectedIssuer: z.ZodOptional<z.ZodString>;
|
|
209
|
+
disclosures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
210
|
+
claimName: z.ZodEnum<typeof ApprovalSealDisclosureClaim>;
|
|
211
|
+
salt: z.ZodString;
|
|
212
|
+
value: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
213
|
+
}, z.core.$strip>>>;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
export type ApprovalSealVerificationBundle = z.infer<typeof ApprovalSealVerificationBundleSchema>;
|
|
216
|
+
//# sourceMappingURL=approval-seal-verifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approval-seal-verifier.d.ts","sourceRoot":"","sources":["../../../../src/key-management/approval-seal-verifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAsC,eAAe,EAAE,sBAAsB,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC1I,OAAO,EAAE,mBAAmB,EAAgC,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAGpG,OAAO,EAEL,2BAA2B,EAE3B,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EACjC,MAAM,2BAA2B,CAAC;AAQnC,8GAA8G;AAC9G,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,kFAAkF;IAClF,QAAQ,CAAC,GAAG,EAAE,OAAO,mBAAmB,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,+FAA+F;IAC/F,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CA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