@tinfoilsh/verifier 2.0.0-rc.3 → 2.0.0-rc.5

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.
Files changed (38) hide show
  1. package/README.md +48 -10
  2. package/dist/errors.d.ts +16 -8
  3. package/dist/errors.d.ts.map +1 -1
  4. package/dist/errors.js +11 -9
  5. package/dist/errors.js.map +1 -1
  6. package/dist/index.d.ts +6 -5
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +7 -6
  9. package/dist/index.js.map +1 -1
  10. package/dist/internal/endorsement/approval.js +1 -2
  11. package/dist/internal/endorsement/approval.js.map +1 -1
  12. package/dist/internal/quote/config.js +17 -4
  13. package/dist/internal/quote/config.js.map +1 -1
  14. package/dist/internal/quote/legacy.js +12 -11
  15. package/dist/internal/quote/legacy.js.map +1 -1
  16. package/dist/internal/quote/quote.js +56 -4
  17. package/dist/internal/quote/quote.js.map +1 -1
  18. package/dist/internal/quote/sev/expectations.js +13 -16
  19. package/dist/internal/quote/sev/expectations.js.map +1 -1
  20. package/dist/internal/runtime/config.js +11 -33
  21. package/dist/internal/runtime/config.js.map +1 -1
  22. package/dist/internal/sigstore/certificate.js +4 -4
  23. package/dist/internal/sigstore/certificate.js.map +1 -1
  24. package/dist/report.d.ts +203 -0
  25. package/dist/report.d.ts.map +1 -0
  26. package/dist/report.js +244 -0
  27. package/dist/report.js.map +1 -0
  28. package/dist/verification.d.ts +100 -36
  29. package/dist/verification.d.ts.map +1 -1
  30. package/dist/verification.js +91 -37
  31. package/dist/verification.js.map +1 -1
  32. package/dist/verifier.d.ts +128 -67
  33. package/dist/verifier.d.ts.map +1 -1
  34. package/dist/verifier.js +277 -139
  35. package/dist/verifier.js.map +1 -1
  36. package/dist/version.js +2 -2
  37. package/dist/version.js.map +1 -1
  38. package/package.json +2 -3
package/dist/report.js ADDED
@@ -0,0 +1,244 @@
1
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
+ };
6
+ var _ReportBuilder_steps;
7
+ /**
8
+ * The verification report: the steps that a verification ran, and the facts
9
+ * that it established. The verifier returns one for a document that it
10
+ * accepts, and a {@link VerificationError} carries one for a document that
11
+ * it rejects, so that a caller can show what happened either way.
12
+ */
13
+ import { CRYPTO_MATERIAL_ID_HPKE, CRYPTO_MATERIAL_ID_TLS, KEY_SPKI_FP_SHA256_V1_FORMAT, KEY_X25519_HPKE_V1_FORMAT } from "./document/document.js";
14
+ import { UsageError } from "./errors.js";
15
+ import { fromHex, sha256, toHex } from "./internal/bytes.js";
16
+ import { cloneExpected, cloneMeasurement } from "./measurement.js";
17
+ import { artifactJSON, codeMeasurementJSON, configJSON, copyArtifact, copyConfig, copyVerifiedFacts, cryptoMaterialData, freezeDeep, measurementJSON, rfc3339, stringJSON, } from "./verification.js";
18
+ /**
19
+ * The version of the report's JSON form, which {@link VerificationReportJSON}
20
+ * carries as `schema_version`. Adding a member keeps the version; removing
21
+ * or renaming one, or changing its type or its meaning, bumps it.
22
+ */
23
+ export const REPORT_SCHEMA_VERSION = 1;
24
+ /** Only this module holds the token that the constructor requires, so that untyped code that calls it is refused. */
25
+ const BUILT_HERE = Symbol("VerificationReport");
26
+ /** Calls the private constructor; the class assigns it, as the only place that the constructor can be called. */
27
+ let construct;
28
+ /**
29
+ * One verification of an attestation document, step by step, and what the
30
+ * steps established. `verifyV3` returns one for a document that it accepts,
31
+ * whose `verifiedFacts` are set and none of whose steps failed; a
32
+ * {@link VerificationError} carries one for a document that it rejects, in
33
+ * which one step failed and `partialFacts` are set. A report authorizes
34
+ * nothing: only the channel keys in `verifiedFacts` may be bound to.
35
+ *
36
+ * A report is plain data. It and everything nested in it are frozen, except
37
+ * register bytes (`Uint8Array`) and `Date` values, which have no frozen form
38
+ * in the language and must not be mutated; {@link clone} gives a copy that
39
+ * shares neither. Only the verifier creates a report: the constructor is
40
+ * private. Its data properties survive a structured clone, such as
41
+ * `postMessage`, as a plain object, and `toJSON()` gives the report in the
42
+ * JSON form that every Tinfoil SDK exports, for display and transport.
43
+ */
44
+ export class VerificationReport {
45
+ constructor(token, fields) {
46
+ if (token !== BUILT_HERE)
47
+ throw new UsageError("a verification report comes from a verifier: verify a document to get one");
48
+ if ((fields.verifiedFacts === undefined) === (fields.partialFacts === undefined)) {
49
+ throw new UsageError("a verification report holds either verified facts or partial facts");
50
+ }
51
+ this.steps = freezeDeep(fields.steps.map((s) => ({ layer: s.layer, status: s.status, message: s.message })));
52
+ if (fields.verifiedFacts !== undefined)
53
+ this.verifiedFacts = fields.verifiedFacts;
54
+ if (fields.partialFacts !== undefined)
55
+ this.partialFacts = freezeDeep(copyPartial(fields.partialFacts));
56
+ const host = fields.metadata.host;
57
+ this.metadata = freezeDeep({ verifier: { ...fields.metadata.verifier }, verifiedAt: new Date(fields.metadata.verifiedAt.getTime()), ...(host === undefined || host === "" ? {} : { host }) });
58
+ Object.freeze(this);
59
+ }
60
+ /** The step that failed, or undefined when none did. */
61
+ failedStep() {
62
+ return this.steps.find((s) => s.status === "failed");
63
+ }
64
+ /** A copy of the report that shares nothing with it, register bytes and dates included. */
65
+ clone() {
66
+ return copyReport(this, this.metadata);
67
+ }
68
+ /**
69
+ * A copy of the report, as {@link clone} makes it, whose
70
+ * `metadata.host` is `host`, the host with an optional port that the
71
+ * document was fetched from; "" leaves the host out. The verifier doesn't
72
+ * know where a document came from, so its reports have no host, and the
73
+ * clients set it on every report that they hand out. The host is not
74
+ * attested: it proves nothing about the enclave.
75
+ */
76
+ withHost(host) {
77
+ if (typeof host !== "string")
78
+ throw new UsageError("a report's host must be a string");
79
+ const { verifier, verifiedAt } = this.metadata;
80
+ return copyReport(this, { verifier, verifiedAt, ...(host === "" ? {} : { host }) });
81
+ }
82
+ /**
83
+ * The report in the JSON form that every Tinfoil SDK exports, so that
84
+ * `JSON.stringify(report)` writes it and a consumer reads the report of
85
+ * any SDK in the same way. {@link VerificationReportJSON} describes the
86
+ * form.
87
+ *
88
+ * The JSON is for display and transport, and it authorizes nothing: this
89
+ * package reads nothing back from it, and a holder of the JSON can't tell
90
+ * whether a verifier wrote it. Bind a channel only to the keys of the
91
+ * {@link VerifiedFacts} that a verification returned.
92
+ */
93
+ toJSON() {
94
+ return {
95
+ schema_version: REPORT_SCHEMA_VERSION,
96
+ steps: this.steps.map((s) => ({ layer: s.layer, status: s.status, ...stringJSON("message", s.message) })),
97
+ ...(this.verifiedFacts === undefined ? {} : { verified_facts: this.verifiedFacts.toJSON() }),
98
+ ...(this.partialFacts === undefined ? {} : { partial_facts: partialJSON(this.partialFacts) }),
99
+ metadata: {
100
+ verified_at: rfc3339(this.metadata.verifiedAt),
101
+ ...(this.metadata.verifier.name === "" || this.metadata.verifier.version === "" ? {} : { verifier: { name: this.metadata.verifier.name, version: this.metadata.verifier.version } }),
102
+ ...stringJSON("host", this.metadata.host),
103
+ },
104
+ };
105
+ }
106
+ }
107
+ (() => {
108
+ construct = (fields) => new VerificationReport(BUILT_HERE, fields);
109
+ })();
110
+ /**
111
+ * The fingerprint that {@link MeasuredFacts.hpkePublicKeyFP} reports for
112
+ * `key`, an HPKE public key in lowercase hex as a document endorses it and
113
+ * {@link VerifiedFacts.hpkePublicKey} returns it: the lowercase-hex SHA-256
114
+ * of the key's bytes. Undefined if `key` is empty or not lowercase hex.
115
+ */
116
+ export async function hpkePublicKeyFP(key) {
117
+ let raw;
118
+ try {
119
+ raw = fromHex(key);
120
+ }
121
+ catch {
122
+ return undefined;
123
+ }
124
+ if (raw.length === 0)
125
+ return undefined;
126
+ return toHex(await sha256(raw));
127
+ }
128
+ /** A copy of `report` that shares nothing with it, with `metadata` in place of its own. */
129
+ function copyReport(report, metadata) {
130
+ return construct({
131
+ steps: report.steps,
132
+ ...(report.verifiedFacts === undefined ? {} : { verifiedFacts: copyVerifiedFacts(report.verifiedFacts) }),
133
+ ...(report.partialFacts === undefined ? {} : { partialFacts: report.partialFacts }),
134
+ metadata,
135
+ });
136
+ }
137
+ function copyPartial(p) {
138
+ return {
139
+ ...(p.expected === undefined ? {} : { expected: copyExpected(p.expected) }),
140
+ ...(p.measured === undefined ? {} : { measured: copyMeasured(p.measured) }),
141
+ };
142
+ }
143
+ function copyExpected(e) {
144
+ return {
145
+ configRepo: e.configRepo,
146
+ artifact: copyArtifact(e.artifact),
147
+ ...(e.config === undefined ? {} : { config: copyConfig(e.config) }),
148
+ ...(e.platform === undefined ? {} : { platform: copyArtifact(e.platform) }),
149
+ ...(e.codeMeasurement === undefined ? {} : { codeMeasurement: cloneExpected(e.codeMeasurement) }),
150
+ ...(e.measurement === undefined ? {} : { measurement: cloneMeasurement(e.measurement) }),
151
+ };
152
+ }
153
+ function copyMeasured(m) {
154
+ return {
155
+ ...(m.cpu === undefined ? {} : { cpu: { measurement: cloneMeasurement(m.cpu.measurement) } }),
156
+ ...(m.tlsPublicKeyFP === undefined ? {} : { tlsPublicKeyFP: m.tlsPublicKeyFP }),
157
+ ...(m.hpkePublicKeyFP === undefined ? {} : { hpkePublicKeyFP: m.hpkePublicKeyFP }),
158
+ };
159
+ }
160
+ function partialJSON(p) {
161
+ const e = p.expected;
162
+ const m = p.measured;
163
+ const code = e?.codeMeasurement === undefined ? undefined : codeMeasurementJSON(e.codeMeasurement);
164
+ return {
165
+ ...(e === undefined
166
+ ? {}
167
+ : {
168
+ expected: {
169
+ config_repo: e.configRepo,
170
+ artifact: artifactJSON(e.artifact),
171
+ ...(e.config === undefined ? {} : { config: configJSON(e.config) }),
172
+ ...(e.platform === undefined ? {} : { platform: artifactJSON(e.platform) }),
173
+ ...(code === undefined ? {} : { code_measurement: code }),
174
+ ...(e.measurement === undefined ? {} : { measurement: measurementJSON(e.measurement) }),
175
+ },
176
+ }),
177
+ ...(m === undefined
178
+ ? {}
179
+ : {
180
+ measured: {
181
+ ...(m.cpu === undefined ? {} : { cpu_measurement: measurementJSON(m.cpu.measurement) }),
182
+ ...stringJSON("tls_public_key_fp", m.tlsPublicKeyFP),
183
+ ...stringJSON("hpke_public_key_fp", m.hpkePublicKeyFP),
184
+ },
185
+ }),
186
+ };
187
+ }
188
+ /** The verification layers, in the order that they run. */
189
+ const LAYERS = ["envelope", "provenance", "quote", "policy"];
190
+ /**
191
+ * @internal Records each step of a verification as the verifier runs it,
192
+ * and the facts that each step establishes, from values that the verifier
193
+ * already computes.
194
+ */
195
+ export class ReportBuilder {
196
+ constructor() {
197
+ _ReportBuilder_steps.set(this, LAYERS.map((layer) => ({ layer, status: "not_run", message: "" })));
198
+ }
199
+ set(layer, status, message) {
200
+ for (const step of __classPrivateFieldGet(this, _ReportBuilder_steps, "f")) {
201
+ if (step.layer === layer) {
202
+ step.status = status;
203
+ step.message = message;
204
+ }
205
+ }
206
+ }
207
+ passed(layer) {
208
+ this.set(layer, "passed", "");
209
+ }
210
+ /** The report of a verification that every step accepted. */
211
+ passedAll(verifiedFacts, metadata) {
212
+ return construct({ steps: __classPrivateFieldGet(this, _ReportBuilder_steps, "f"), verifiedFacts, metadata });
213
+ }
214
+ /** The report of a verification that `layer` rejected with `message`. */
215
+ failed(layer, message, metadata) {
216
+ this.set(layer, "failed", message);
217
+ return construct({
218
+ steps: __classPrivateFieldGet(this, _ReportBuilder_steps, "f"),
219
+ partialFacts: {
220
+ ...(this.expected === undefined ? {} : { expected: this.expected }),
221
+ ...(this.measured === undefined ? {} : { measured: this.measured }),
222
+ },
223
+ metadata,
224
+ });
225
+ }
226
+ }
227
+ _ReportBuilder_steps = new WeakMap();
228
+ /**
229
+ * @internal The key fingerprints that `items` endorse. The envelope checked
230
+ * only that the document is consistent with itself, so they stay
231
+ * unverified until the policy step binds them.
232
+ */
233
+ export async function measuredKeys(items) {
234
+ const measured = {};
235
+ const tls = cryptoMaterialData(items, CRYPTO_MATERIAL_ID_TLS, KEY_SPKI_FP_SHA256_V1_FORMAT);
236
+ if (tls !== undefined)
237
+ measured.tlsPublicKeyFP = tls;
238
+ const hpke = cryptoMaterialData(items, CRYPTO_MATERIAL_ID_HPKE, KEY_X25519_HPKE_V1_FORMAT);
239
+ const fp = hpke === undefined ? undefined : await hpkePublicKeyFP(hpke);
240
+ if (fp !== undefined)
241
+ measured.hpkePublicKeyFP = fp;
242
+ return measured;
243
+ }
244
+ //# sourceMappingURL=report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.js","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;GAKG;AACH,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,yBAAyB,EAA2B,MAAM,wBAAwB,CAAC;AAC3K,OAAO,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAmC,MAAM,kBAAkB,CAAC;AACpG,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,OAAO,EACP,UAAU,GAUX,MAAM,mBAAmB,CAAC;AAwF3B;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AA6DvC,qHAAqH;AACrH,MAAM,UAAU,GAAkB,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAE/D,iHAAiH;AACjH,IAAI,SAAuD,CAAC;AAE5D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,kBAAkB;IAkB7B,YAAoB,KAAwB,EAAE,MAAoB;QAChE,IAAI,KAAK,KAAK,UAAU;YAAE,MAAM,IAAI,UAAU,CAAC,2EAA2E,CAAC,CAAC;QAC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AAY,CAAC,KAAoC;IACrE,MAAM,QAAQ,GAA2B,EAAE,CAAC;IAC5C,MAAM,GAAG,GAAG,kBAAkB,CAAC,KAAK,EAAE,sBAAsB,EAAE,4BAA4B,CAAC,CAAC;IAC5F,IAAI,GAAG,KAAK,SAAS;QAAE,QAAQ,CAAC,cAAc,GAAG,GAAG,CAAC;IACrD,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,EAAE,yBAAyB,CAAC,CAAC;IAC3F,MAAM,EAAE,GAAG,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC;IACxE,IAAI,EAAE,KAAK,SAAS;QAAE,QAAQ,CAAC,eAAe,GAAG,EAAE,CAAC;IACpD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -34,14 +34,36 @@ export interface ArtifactVerification {
34
34
  /** Undefined when no freshness approval was consulted. */
35
35
  readonly approvalTime?: Date;
36
36
  }
37
+ /**
38
+ * How a verification was performed. The verifier and the client that called
39
+ * it fill it in from their own state; none of it is attested by or checked
40
+ * against the document.
41
+ */
37
42
  export interface VerificationMetadata {
43
+ /** The name and version of the SDK that verified the document. */
38
44
  readonly verifier: {
39
45
  readonly name: string;
40
46
  readonly version: string;
41
47
  };
48
+ /** The instant that the document was appraised at. It is not a freshness guarantee. */
42
49
  readonly verifiedAt: Date;
50
+ /**
51
+ * The host, with an optional port, that the client contacted for the
52
+ * document: for an enclave client its enclave, even through an EHBP proxy,
53
+ * for a router client the router that it chose, and for a gateway client
54
+ * the replica. It is what the client connected to, not an attested fact,
55
+ * so it proves nothing about the enclave. The verifier doesn't know the
56
+ * host and leaves it undefined; a client sets it on every report that it
57
+ * hands out, and a caller that runs the verifier itself can set it with
58
+ * {@link VerificationReport.withHost}.
59
+ */
60
+ readonly host?: string;
43
61
  }
44
- /** A measurement or expectation with each set register as lowercase hex. */
62
+ /**
63
+ * A measurement in the report's JSON form: the platform, and each register
64
+ * that it holds as lowercase hex. A code measurement leaves out the
65
+ * registers that the release leaves to the platform.
66
+ */
45
67
  export type MeasurementJSON = {
46
68
  readonly platform: "sev-snp";
47
69
  readonly launch?: string;
@@ -53,50 +75,82 @@ export type MeasurementJSON = {
53
75
  readonly rtmr2?: string;
54
76
  readonly rtmr3?: string;
55
77
  };
56
- /** A `ConfigVerification` with its times as ISO 8601 strings. */
57
- export type ConfigVerificationJSON = Omit<ConfigVerification, "approvalTime" | "signatureTime"> & {
58
- readonly approvalTime?: string;
59
- readonly signatureTime?: string;
60
- };
61
- /** An `ArtifactVerification` with its time as an ISO 8601 string. */
62
- export type ArtifactVerificationJSON = Omit<ArtifactVerification, "approvalTime"> & {
63
- readonly approvalTime?: string;
64
- };
65
78
  /**
66
- * The JSON form of a `Verification`, as `toJSON()` returns it and
67
- * `JSON.stringify` serializes it: the same fields as the properties, with
68
- * registers as lowercase hex and times as ISO 8601 strings. Facts that were
69
- * not established are left out.
79
+ * A {@link ConfigVerification} in the report's JSON form, with times as RFC
80
+ * 3339 strings in UTC. A member that the config doesn't have, such as the
81
+ * reference of a config that no endorsement supplied, is left out.
70
82
  */
71
- export interface VerificationJSON {
72
- readonly codeDigest: string;
73
- readonly codeTag: string;
74
- readonly configRepo: string;
75
- readonly codeMeasurement: MeasurementJSON;
76
- readonly enclaveMeasurement: MeasurementJSON;
77
- readonly cryptoMaterial: readonly CryptoMaterialItem[];
83
+ export interface ConfigVerificationJSON {
84
+ readonly source: ReferenceSource;
85
+ readonly name?: string;
86
+ readonly digest: string;
87
+ readonly reference?: string;
88
+ readonly signing_key_hint?: string;
89
+ readonly approval_time?: string;
90
+ readonly registry_id?: string;
91
+ readonly signature_time?: string;
92
+ }
93
+ /**
94
+ * An {@link ArtifactVerification} in the report's JSON form, with its time
95
+ * as an RFC 3339 string in UTC. A member that the artifact doesn't have,
96
+ * such as the name of an embedded artifact, is left out.
97
+ */
98
+ export interface ArtifactVerificationJSON {
99
+ readonly source: ReferenceSource;
100
+ readonly repo?: string;
101
+ readonly tag?: string;
102
+ readonly digest: string;
103
+ readonly name?: string;
104
+ readonly commit?: string;
105
+ readonly approval_time?: string;
106
+ }
107
+ /**
108
+ * The `verified_facts` object of the report's JSON form, as
109
+ * {@link VerifiedFacts.toJSON} returns it. The channel keys appear only in
110
+ * `crypto_material`.
111
+ */
112
+ export interface VerifiedFactsJSON {
113
+ readonly config_repo: string;
114
+ readonly code_digest: string;
115
+ readonly code_tag?: string;
116
+ /** Left out when the release fixes no register on the enclave's platform. */
117
+ readonly code_measurement?: MeasurementJSON;
118
+ readonly enclave_measurement: MeasurementJSON;
78
119
  readonly config?: ConfigVerificationJSON;
79
120
  readonly runtime?: ArtifactVerificationJSON;
80
121
  readonly platform?: ArtifactVerificationJSON;
81
- readonly freshnessExpiresAt?: string;
82
- readonly metadata: {
83
- readonly verifier: VerificationMetadata["verifier"];
84
- readonly verifiedAt: string;
122
+ readonly crypto_material: readonly CryptoMaterialItem[];
123
+ readonly freshness_expires_at?: string;
124
+ }
125
+ /** The `metadata` object of the report's JSON form. */
126
+ export interface VerificationMetadataJSON {
127
+ /** The appraisal instant, as an RFC 3339 string in UTC. */
128
+ readonly verified_at: string;
129
+ /** The name and version of the SDK that verified the document. */
130
+ readonly verifier?: {
131
+ readonly name: string;
132
+ readonly version: string;
85
133
  };
134
+ /** The host that the client contacted for the document, present only in a report that a client produced. Not attested. */
135
+ readonly host?: string;
86
136
  }
87
137
  /**
88
- * The facts proven by verifying an attestation document. Only the verifier
89
- * creates one: the constructor is private, so type-checked code cannot
90
- * construct a verification, and a call from untyped code is refused at
91
- * runtime by a token only this module holds. Every fact is a `readonly` property
138
+ * The facts proven by verifying an attestation document, including the
139
+ * channel keys that a caller binds its traffic to: the `verifiedFacts` of
140
+ * the {@link VerificationReport} of a document that the verifier accepted.
141
+ * They are the only source of channel keys. Only the verifier creates them:
142
+ * the constructor is private, so type-checked code cannot construct them,
143
+ * and a call from untyped code is refused at runtime by a token that only
144
+ * this module holds. Every fact is a `readonly` property
92
145
  * whose value is fixed at construction: the instance and every nested
93
146
  * object and array are frozen, so a property always yields the same
94
147
  * reference and nothing on it can be reassigned. Register bytes
95
148
  * (`Uint8Array`) and `Date` values have no frozen form in the language; they
96
- * are shared as stored and must not be mutated. `toJSON()` gives a plain,
97
- * serializable copy for logging or persisting.
149
+ * are shared as stored and must not be mutated. `toJSON()` gives the facts
150
+ * in the JSON form that every Tinfoil SDK exports, for display and
151
+ * transport; that JSON authorizes nothing.
98
152
  */
99
- export declare class Verification {
153
+ export declare class VerifiedFacts {
100
154
  /** Digest of the verified code or runtime artifact. */
101
155
  readonly codeDigest: string;
102
156
  /** Release tag of the verified code or runtime artifact. */
@@ -117,8 +171,6 @@ export declare class Verification {
117
171
  readonly platform?: ArtifactVerification;
118
172
  /** Earliest approval/freshness timestamp plus the maximum age, capped by CPU collateral validity. */
119
173
  readonly freshnessExpiresAt?: Date;
120
- /** The verifier's name and version, and when it ran. */
121
- readonly metadata: VerificationMetadata;
122
174
  private constructor();
123
175
  /** The data of the endorsed item with the given id and format, or undefined. */
124
176
  cryptoMaterialData(id: string, format: string): string | undefined;
@@ -126,8 +178,20 @@ export declare class Verification {
126
178
  get tlsPublicKeyFP(): string | undefined;
127
179
  /** The endorsed HPKE (x25519) public key, or undefined if the document endorses none in that format. */
128
180
  get hpkePublicKey(): string | undefined;
129
- /** The facts as plain JSON: registers as lowercase hex, times as ISO 8601 strings. */
130
- toJSON(): VerificationJSON;
181
+ /**
182
+ * The facts as the `verified_facts` object of the report's JSON form, the
183
+ * form that every Tinfoil SDK exports, so that `JSON.stringify(facts)`
184
+ * writes it: snake_case members, registers and digests as lowercase hex,
185
+ * times as RFC 3339 strings in UTC, and facts that were not established
186
+ * left out. A code measurement holds only the registers that the release
187
+ * fixes, and is left out when it fixes none.
188
+ *
189
+ * The JSON is for display and transport, and it authorizes nothing: this
190
+ * package reads nothing back from it, and a holder of the JSON can't tell
191
+ * whether a verifier wrote it. Bind a channel only to the keys of facts
192
+ * that a verification returned.
193
+ */
194
+ toJSON(): VerifiedFactsJSON;
131
195
  }
132
196
  /** The data of the first item with the given id and format, or undefined. */
133
197
  export declare function cryptoMaterialData(items: readonly CryptoMaterialItem[], id: string, format: string): string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../src/verification.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4G,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE3K,OAAO,EAAgD,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAEhI,+GAA+G;AAC/G,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEpE,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,+EAA+E;IAC/E,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,oFAAoF;IACpF,QAAQ,CAAC,aAAa,CAAC,EAAE,IAAI,CAAC;CAC/B;AAED,6EAA6E;AAC7E,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAA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