@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.
- package/README.md +48 -10
- package/dist/errors.d.ts +16 -8
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +11 -9
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/internal/endorsement/approval.js +1 -2
- package/dist/internal/endorsement/approval.js.map +1 -1
- package/dist/internal/quote/config.js +17 -4
- package/dist/internal/quote/config.js.map +1 -1
- package/dist/internal/quote/legacy.js +12 -11
- package/dist/internal/quote/legacy.js.map +1 -1
- package/dist/internal/quote/quote.js +56 -4
- package/dist/internal/quote/quote.js.map +1 -1
- package/dist/internal/quote/sev/expectations.js +13 -16
- package/dist/internal/quote/sev/expectations.js.map +1 -1
- package/dist/internal/runtime/config.js +11 -33
- package/dist/internal/runtime/config.js.map +1 -1
- package/dist/internal/sigstore/certificate.js +4 -4
- package/dist/internal/sigstore/certificate.js.map +1 -1
- package/dist/report.d.ts +203 -0
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +244 -0
- package/dist/report.js.map +1 -0
- package/dist/verification.d.ts +100 -36
- package/dist/verification.d.ts.map +1 -1
- package/dist/verification.js +91 -37
- package/dist/verification.js.map +1 -1
- package/dist/verifier.d.ts +128 -67
- package/dist/verifier.d.ts.map +1 -1
- package/dist/verifier.js +277 -139
- package/dist/verifier.js.map +1 -1
- package/dist/version.js +2 -2
- package/dist/version.js.map +1 -1
- package/package.json +2 -3
package/dist/verification.js
CHANGED
|
@@ -2,25 +2,29 @@ import { CRYPTO_MATERIAL_ID_HPKE, CRYPTO_MATERIAL_ID_TLS, KEY_SPKI_FP_SHA256_V1_
|
|
|
2
2
|
import { UsageError } from "./errors.js";
|
|
3
3
|
import { cloneExpected, cloneMeasurement, registerHex } from "./measurement.js";
|
|
4
4
|
/** Only this module holds the token the constructor requires, so untyped code that calls it is refused. */
|
|
5
|
-
const BUILT_HERE = Symbol("
|
|
5
|
+
const BUILT_HERE = Symbol("VerifiedFacts");
|
|
6
6
|
/** Calls the private constructor; the class assigns it, as the only place the constructor can be called. */
|
|
7
7
|
let construct;
|
|
8
8
|
/**
|
|
9
|
-
* The facts proven by verifying an attestation document
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* The facts proven by verifying an attestation document, including the
|
|
10
|
+
* channel keys that a caller binds its traffic to: the `verifiedFacts` of
|
|
11
|
+
* the {@link VerificationReport} of a document that the verifier accepted.
|
|
12
|
+
* They are the only source of channel keys. Only the verifier creates them:
|
|
13
|
+
* the constructor is private, so type-checked code cannot construct them,
|
|
14
|
+
* and a call from untyped code is refused at runtime by a token that only
|
|
15
|
+
* this module holds. Every fact is a `readonly` property
|
|
13
16
|
* whose value is fixed at construction: the instance and every nested
|
|
14
17
|
* object and array are frozen, so a property always yields the same
|
|
15
18
|
* reference and nothing on it can be reassigned. Register bytes
|
|
16
19
|
* (`Uint8Array`) and `Date` values have no frozen form in the language; they
|
|
17
|
-
* are shared as stored and must not be mutated. `toJSON()` gives
|
|
18
|
-
*
|
|
20
|
+
* are shared as stored and must not be mutated. `toJSON()` gives the facts
|
|
21
|
+
* in the JSON form that every Tinfoil SDK exports, for display and
|
|
22
|
+
* transport; that JSON authorizes nothing.
|
|
19
23
|
*/
|
|
20
|
-
export class
|
|
24
|
+
export class VerifiedFacts {
|
|
21
25
|
constructor(token, fields) {
|
|
22
26
|
if (token !== BUILT_HERE)
|
|
23
|
-
throw new UsageError("
|
|
27
|
+
throw new UsageError("verified facts come from a verifier: verify a document to get them");
|
|
24
28
|
this.codeDigest = fields.codeDigest;
|
|
25
29
|
this.codeTag = fields.codeTag;
|
|
26
30
|
this.configRepo = fields.configRepo;
|
|
@@ -31,7 +35,6 @@ export class Verification {
|
|
|
31
35
|
this.runtime = fields.runtime && freezeDeep(copyArtifact(fields.runtime));
|
|
32
36
|
this.platform = fields.platform && freezeDeep(copyArtifact(fields.platform));
|
|
33
37
|
this.freshnessExpiresAt = copyDate(fields.freshnessExpiresAt);
|
|
34
|
-
this.metadata = freezeDeep({ verifier: { ...fields.metadata.verifier }, verifiedAt: new Date(fields.metadata.verifiedAt.getTime()) });
|
|
35
38
|
Object.freeze(this);
|
|
36
39
|
}
|
|
37
40
|
/** The data of the endorsed item with the given id and format, or undefined. */
|
|
@@ -46,56 +49,77 @@ export class Verification {
|
|
|
46
49
|
get hpkePublicKey() {
|
|
47
50
|
return this.cryptoMaterialData(CRYPTO_MATERIAL_ID_HPKE, KEY_X25519_HPKE_V1_FORMAT);
|
|
48
51
|
}
|
|
49
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* The facts as the `verified_facts` object of the report's JSON form, the
|
|
54
|
+
* form that every Tinfoil SDK exports, so that `JSON.stringify(facts)`
|
|
55
|
+
* writes it: snake_case members, registers and digests as lowercase hex,
|
|
56
|
+
* times as RFC 3339 strings in UTC, and facts that were not established
|
|
57
|
+
* left out. A code measurement holds only the registers that the release
|
|
58
|
+
* fixes, and is left out when it fixes none.
|
|
59
|
+
*
|
|
60
|
+
* The JSON is for display and transport, and it authorizes nothing: this
|
|
61
|
+
* package reads nothing back from it, and a holder of the JSON can't tell
|
|
62
|
+
* whether a verifier wrote it. Bind a channel only to the keys of facts
|
|
63
|
+
* that a verification returned.
|
|
64
|
+
*/
|
|
50
65
|
toJSON() {
|
|
66
|
+
const code = codeMeasurementJSON(this.codeMeasurement);
|
|
51
67
|
return {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
cryptoMaterial: this.cryptoMaterial.map((i) => ({ ...i })),
|
|
68
|
+
config_repo: this.configRepo,
|
|
69
|
+
code_digest: this.codeDigest,
|
|
70
|
+
...stringJSON("code_tag", this.codeTag),
|
|
71
|
+
...(code === undefined ? {} : { code_measurement: code }),
|
|
72
|
+
enclave_measurement: measurementJSON(this.enclaveMeasurement),
|
|
58
73
|
...(this.config === undefined ? {} : { config: configJSON(this.config) }),
|
|
59
74
|
...(this.runtime === undefined ? {} : { runtime: artifactJSON(this.runtime) }),
|
|
60
75
|
...(this.platform === undefined ? {} : { platform: artifactJSON(this.platform) }),
|
|
61
|
-
|
|
62
|
-
|
|
76
|
+
crypto_material: this.cryptoMaterial.map((i) => ({ id: i.id, format: i.format, data: i.data })),
|
|
77
|
+
...timeJSON("freshness_expires_at", this.freshnessExpiresAt),
|
|
63
78
|
};
|
|
64
79
|
}
|
|
65
80
|
}
|
|
66
81
|
(() => {
|
|
67
|
-
construct = (fields) => new
|
|
82
|
+
construct = (fields) => new VerifiedFacts(BUILT_HERE, fields);
|
|
68
83
|
})();
|
|
69
|
-
/** @internal The
|
|
70
|
-
export function
|
|
84
|
+
/** @internal The facts that the verifier proved, as a {@link VerifiedFacts}; the verifier is its only caller. */
|
|
85
|
+
export function verifiedFactsOf(fields) {
|
|
71
86
|
return construct(fields);
|
|
72
87
|
}
|
|
88
|
+
/** @internal A copy of `v` that shares no register bytes or dates with it. */
|
|
89
|
+
export function copyVerifiedFacts(v) {
|
|
90
|
+
// The constructor copies every field that it is given.
|
|
91
|
+
return construct(v);
|
|
92
|
+
}
|
|
73
93
|
/** The data of the first item with the given id and format, or undefined. */
|
|
74
94
|
export function cryptoMaterialData(items, id, format) {
|
|
75
95
|
return items.find((i) => i.id === id && i.format === format)?.data;
|
|
76
96
|
}
|
|
77
|
-
/** Freezes a plain object or array and everything reachable through it; byte views and dates are left as they are. */
|
|
78
|
-
function freezeDeep(value) {
|
|
97
|
+
/** @internal Freezes a plain object or array and everything reachable through it; byte views and dates are left as they are. */
|
|
98
|
+
export function freezeDeep(value) {
|
|
79
99
|
if (value === null || typeof value !== "object" || ArrayBuffer.isView(value) || value instanceof Date)
|
|
80
100
|
return value;
|
|
81
101
|
for (const nested of Object.values(value))
|
|
82
102
|
freezeDeep(nested);
|
|
83
103
|
return Object.freeze(value);
|
|
84
104
|
}
|
|
85
|
-
|
|
105
|
+
/** @internal */
|
|
106
|
+
export function copyConfig(c) {
|
|
86
107
|
return {
|
|
87
108
|
...c,
|
|
88
109
|
...(c.approvalTime === undefined ? {} : { approvalTime: copyDate(c.approvalTime) }),
|
|
89
110
|
...(c.signatureTime === undefined ? {} : { signatureTime: copyDate(c.signatureTime) }),
|
|
90
111
|
};
|
|
91
112
|
}
|
|
92
|
-
|
|
113
|
+
/** @internal */
|
|
114
|
+
export function copyArtifact(a) {
|
|
93
115
|
return { ...a, ...(a.approvalTime === undefined ? {} : { approvalTime: copyDate(a.approvalTime) }) };
|
|
94
116
|
}
|
|
95
|
-
|
|
117
|
+
/** @internal */
|
|
118
|
+
export function copyDate(d) {
|
|
96
119
|
return d === undefined ? undefined : new Date(d.getTime());
|
|
97
120
|
}
|
|
98
|
-
|
|
121
|
+
/** @internal A measurement or expectation in the report's JSON form; an unset register is left out. */
|
|
122
|
+
export function measurementJSON(m) {
|
|
99
123
|
switch (m.platform) {
|
|
100
124
|
case "sev-snp":
|
|
101
125
|
return { platform: "sev-snp", ...hexJSON("launch", m.launch) };
|
|
@@ -110,20 +134,50 @@ function measurementJSON(m) {
|
|
|
110
134
|
};
|
|
111
135
|
}
|
|
112
136
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
137
|
+
/** @internal A code measurement in the report's JSON form, or undefined when it holds no register, so that it is left out. */
|
|
138
|
+
export function codeMeasurementJSON(e) {
|
|
139
|
+
const out = measurementJSON(e);
|
|
140
|
+
return Object.keys(out).length > 1 ? out : undefined;
|
|
141
|
+
}
|
|
142
|
+
/** @internal */
|
|
143
|
+
export function configJSON(c) {
|
|
144
|
+
return {
|
|
145
|
+
source: c.source,
|
|
146
|
+
...stringJSON("name", c.name),
|
|
147
|
+
digest: c.digest,
|
|
148
|
+
...stringJSON("reference", c.reference),
|
|
149
|
+
...stringJSON("signing_key_hint", c.signingKeyHint),
|
|
150
|
+
...timeJSON("approval_time", c.approvalTime),
|
|
151
|
+
...stringJSON("registry_id", c.registryID),
|
|
152
|
+
...timeJSON("signature_time", c.signatureTime),
|
|
153
|
+
};
|
|
116
154
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return {
|
|
155
|
+
/** @internal */
|
|
156
|
+
export function artifactJSON(a) {
|
|
157
|
+
return {
|
|
158
|
+
source: a.source,
|
|
159
|
+
...stringJSON("repo", a.repo),
|
|
160
|
+
...stringJSON("tag", a.tag),
|
|
161
|
+
digest: a.digest,
|
|
162
|
+
...stringJSON("name", a.name),
|
|
163
|
+
...stringJSON("commit", a.commit),
|
|
164
|
+
...timeJSON("approval_time", a.approvalTime),
|
|
165
|
+
};
|
|
120
166
|
}
|
|
121
167
|
/** `{ [key]: hex }` for a set register, `{}` for an unset one. */
|
|
122
168
|
function hexJSON(key, r) {
|
|
123
169
|
return r === undefined ? {} : { [key]: registerHex(r) };
|
|
124
170
|
}
|
|
125
|
-
/** `{ [key]:
|
|
126
|
-
function
|
|
127
|
-
return
|
|
171
|
+
/** @internal `{ [key]: s }` for a non-empty string, `{}` for an empty or absent one, since the JSON form never holds "". */
|
|
172
|
+
export function stringJSON(key, s) {
|
|
173
|
+
return s === undefined || s === "" ? {} : { [key]: s };
|
|
174
|
+
}
|
|
175
|
+
/** @internal An instant as an RFC 3339 string in UTC, without a fraction when it falls on a whole second. */
|
|
176
|
+
export function rfc3339(d) {
|
|
177
|
+
return d.toISOString().replace(/\.000Z$/, "Z");
|
|
178
|
+
}
|
|
179
|
+
/** @internal `{ [key]: time }` for a set time, `{}` for an unset one. */
|
|
180
|
+
export function timeJSON(key, d) {
|
|
181
|
+
return d === undefined ? {} : { [key]: rfc3339(d) };
|
|
128
182
|
}
|
|
129
183
|
//# sourceMappingURL=verification.js.map
|
package/dist/verification.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification.js","sourceRoot":"","sources":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,UAAU,CAAmB,GAAM,EAAE,CAAqB;IACxE,OAAO,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAA4B,CAAC;AACpF,CAAC;AAED,6GAA6G;AAC7G,MAAM,UAAU,OAAO,CAAC,CAAO;IAC7B,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;AACjD,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,QAAQ,CAAmB,GAAM,EAAE,CAAmB;IACpE,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAE,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAA4B,CAAC;AACjF,CAAC"}
|
package/dist/verifier.d.ts
CHANGED
|
@@ -1,45 +1,130 @@
|
|
|
1
1
|
import type { ConfigEndorsement } from "./document/collateral/config.js";
|
|
2
2
|
import { type RuntimeReference } from "./document/collateral/runtime.js";
|
|
3
3
|
import { type Expected } from "./measurement.js";
|
|
4
|
-
import { type
|
|
4
|
+
import { type VerificationReport } from "./report.js";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Who vouches for the config that an enclave runs: one of {@link Registries},
|
|
7
|
+
* {@link ConfigSigningKeys}, {@link ConfigAuthorizer}, {@link EmbeddedConfig}
|
|
8
|
+
* or {@link EmbeddedConfigReference}, told apart by `kind`. Undefined selects
|
|
9
|
+
* Tinfoil's public registry. Every choice other than undefined requires
|
|
10
|
+
* attestation-collaterals/v3.
|
|
10
11
|
*/
|
|
11
|
-
export
|
|
12
|
+
export type ConfigTrust = Registries | ConfigSigningKeys | ConfigAuthorizer | EmbeddedConfig | EmbeddedConfigReference;
|
|
13
|
+
/**
|
|
14
|
+
* Trusts configs that exactly these registries endorse, under Tinfoil's
|
|
15
|
+
* registry root, in place of the public registry alone. To keep the public
|
|
16
|
+
* registry, list {@link PUBLIC_REGISTRY_ID}: `[PUBLIC_REGISTRY_ID, ...mine]`.
|
|
17
|
+
* `ids` must be non-empty, canonical and without repeats.
|
|
18
|
+
*/
|
|
19
|
+
export interface Registries {
|
|
20
|
+
readonly kind: "registries";
|
|
21
|
+
readonly ids: readonly string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Trusts configs whose endorsements these PEM-encoded P-256 public keys
|
|
25
|
+
* sign, in place of Tinfoil's registry root. This trust path uses no
|
|
26
|
+
* registry IDs and doesn't authorize artifact freshness. `keys` must not be
|
|
27
|
+
* empty.
|
|
28
|
+
*/
|
|
29
|
+
export interface ConfigSigningKeys {
|
|
30
|
+
readonly kind: "configSigningKeys";
|
|
31
|
+
readonly keys: readonly string[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Replaces config endorsement verification with the caller's policy.
|
|
35
|
+
* `authorize` receives detached, untrusted material and must throw for
|
|
36
|
+
* config bytes that it doesn't authorize; a throw rejects the document at
|
|
37
|
+
* the provenance layer. It may run concurrently. Runtime, platform and
|
|
38
|
+
* hardware checks still apply. Approval authenticates no registry name or
|
|
39
|
+
* timestamp, so a `project` pin is a {@link UsageError}.
|
|
40
|
+
*/
|
|
41
|
+
export interface ConfigAuthorizer {
|
|
42
|
+
readonly kind: "configAuthorizer";
|
|
43
|
+
readonly authorize: (endorsement: ConfigEndorsement) => void | Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Trusts the exact config bytes that the caller supplies, in place of a
|
|
47
|
+
* registry endorsement; the digest and the runtime that the config pins are
|
|
48
|
+
* taken from the bytes. `name`, an /org/project/revision identity, optionally
|
|
49
|
+
* names them, and a `project` pin must then match it. The bytes must come
|
|
50
|
+
* from trusted client configuration and be a JSON config.
|
|
51
|
+
*/
|
|
52
|
+
export interface EmbeddedConfig {
|
|
53
|
+
readonly kind: "embeddedConfig";
|
|
12
54
|
/** The /org/project/revision name; absent or "" leaves the name unpinned. */
|
|
13
55
|
readonly name?: string;
|
|
14
|
-
/** The config bytes. */
|
|
15
56
|
readonly bytes: Uint8Array;
|
|
16
|
-
readonly digest?: never;
|
|
17
|
-
readonly runtime?: never;
|
|
18
57
|
}
|
|
19
58
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* refused at compile time.
|
|
59
|
+
* Trusts an exact config that the caller identifies without disclosing its
|
|
60
|
+
* bytes: the hex SHA-256 `digest` of its bytes and the `runtime` release that
|
|
61
|
+
* it pins. The quote must still bind the digest. Otherwise it is
|
|
62
|
+
* {@link EmbeddedConfig}.
|
|
25
63
|
*/
|
|
26
64
|
export interface EmbeddedConfigReference {
|
|
65
|
+
readonly kind: "embeddedConfigReference";
|
|
27
66
|
/** The /org/project/revision name; absent or "" leaves the name unpinned. */
|
|
28
67
|
readonly name?: string;
|
|
29
68
|
/** Lowercase hex SHA-256 of the config bytes. */
|
|
30
69
|
readonly digest: string;
|
|
31
|
-
/** The runtime release the config pins (its `cvm-version`). */
|
|
70
|
+
/** The runtime release that the config pins (its `cvm-version`). */
|
|
32
71
|
readonly runtime: RuntimeReference;
|
|
33
|
-
readonly bytes?: never;
|
|
34
72
|
}
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
73
|
+
/**
|
|
74
|
+
* How the runtime and platform artifacts are trusted: {@link EndorsedArtifacts}
|
|
75
|
+
* or {@link EmbeddedArtifacts}, told apart by `kind`. Undefined selects
|
|
76
|
+
* `{ kind: "endorsedArtifacts" }`.
|
|
77
|
+
*/
|
|
78
|
+
export type ArtifactTrust = EndorsedArtifacts | EmbeddedArtifacts;
|
|
79
|
+
/**
|
|
80
|
+
* Trusts runtime and platform artifacts that the document's endorsements
|
|
81
|
+
* authenticate and whose freshness approvals `freshnessKeys` sign:
|
|
82
|
+
* PEM-encoded P-256 public keys. Undefined `freshnessKeys` selects Tinfoil's
|
|
83
|
+
* public keys, which approve artifacts only and authorize no config. An
|
|
84
|
+
* explicit key set requires attestation-collaterals/v3, and an empty one is
|
|
85
|
+
* a {@link UsageError}.
|
|
86
|
+
*/
|
|
87
|
+
export interface EndorsedArtifacts {
|
|
88
|
+
readonly kind: "endorsedArtifacts";
|
|
89
|
+
readonly freshnessKeys?: readonly string[];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Trusts caller-supplied runtime and platform artifacts in place of their
|
|
93
|
+
* endorsements, and requires attestation-collaterals/v3. `runtime` is the
|
|
94
|
+
* exact runtime manifest that the config pins, and `platform` is a
|
|
95
|
+
* platform-endorsements/v2 policy artifact. No endorsement is consulted for
|
|
96
|
+
* a supplied artifact, even if the document carries one. An artifact that
|
|
97
|
+
* is left out is still endorsed, with its freshness approval signed by
|
|
98
|
+
* `freshnessKeys`, as {@link EndorsedArtifacts} describes. At least one
|
|
99
|
+
* artifact must be supplied, and `freshnessKeys` must be left out when both
|
|
100
|
+
* are, since nothing is left for them to verify. Hardware authentication,
|
|
101
|
+
* component bindings and pins remain mandatory. These values must come from
|
|
102
|
+
* trusted client configuration.
|
|
103
|
+
*/
|
|
104
|
+
export interface EmbeddedArtifacts {
|
|
105
|
+
readonly kind: "embeddedArtifacts";
|
|
40
106
|
readonly runtime?: Uint8Array;
|
|
41
|
-
/** A platform-endorsements/v2 policy artifact. */
|
|
42
107
|
readonly platform?: Uint8Array;
|
|
108
|
+
readonly freshnessKeys?: readonly string[];
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The checks that a verifier applies on top of its config trust, as plain
|
|
112
|
+
* data. Every field is optional, and the empty policy keeps every default:
|
|
113
|
+
* no register pins, the seven-day freshness bound, and runtime and platform
|
|
114
|
+
* artifacts that Tinfoil's public keys endorse.
|
|
115
|
+
*/
|
|
116
|
+
export interface Policy {
|
|
117
|
+
/**
|
|
118
|
+
* Registers that the enclave must match in addition to the release's: each
|
|
119
|
+
* set register fills one that the release leaves open, and must equal one
|
|
120
|
+
* that the release fixes. Pins for one platform reject every enclave on the
|
|
121
|
+
* other. It is copied, so later changes by the caller have no effect.
|
|
122
|
+
*/
|
|
123
|
+
readonly pinnedRegisters?: Expected;
|
|
124
|
+
/** How old an authenticated witness may be; 0 or undefined selects seven days, and a negative age is a {@link UsageError}. */
|
|
125
|
+
readonly freshnessMaxAgeMs?: number;
|
|
126
|
+
/** How the runtime and platform artifacts are trusted; undefined selects `{ kind: "endorsedArtifacts" }`. */
|
|
127
|
+
readonly artifacts?: ArtifactTrust;
|
|
43
128
|
}
|
|
44
129
|
/**
|
|
45
130
|
* Names the workload a caller trusts. `repo` and `project` are separate
|
|
@@ -54,42 +139,6 @@ export interface Pin {
|
|
|
54
139
|
/** A config registry project, `org/project[@revision][@sha256:digest]`. */
|
|
55
140
|
readonly project?: string;
|
|
56
141
|
}
|
|
57
|
-
export interface VerifierOptions {
|
|
58
|
-
/** Registers the enclave must match in addition to the release's. */
|
|
59
|
-
readonly pinnedRegisters?: Expected;
|
|
60
|
-
/** The freshness window; 0 or undefined selects seven days. */
|
|
61
|
-
readonly freshnessMaxAgeMs?: number;
|
|
62
|
-
/** PEM-encoded P-256 public keys that approve configs, replacing Tinfoil's. */
|
|
63
|
-
readonly configSigningKeys?: readonly string[];
|
|
64
|
-
/** PEM-encoded P-256 public keys that approve artifact freshness, replacing Tinfoil's. */
|
|
65
|
-
readonly freshnessSigningKeys?: readonly string[];
|
|
66
|
-
/** Authorizes an unsigned config; throwing rejects the document at the provenance layer. */
|
|
67
|
-
readonly configAuthorizer?: (endorsement: ConfigEndorsement) => void | Promise<void>;
|
|
68
|
-
/**
|
|
69
|
-
* The exact registry IDs a config approval may be accepted under, replacing
|
|
70
|
-
* public-only trust: an approval certified for any other registry rejects.
|
|
71
|
-
* To accept the public registry alongside others, list it:
|
|
72
|
-
* `[PUBLIC_REGISTRY_ID, ...mine]`. Needs registry trust, so it conflicts
|
|
73
|
-
* with config signing keys, an embedded config and a config authorizer.
|
|
74
|
-
* Must be non-empty, canonical and without repeats.
|
|
75
|
-
*/
|
|
76
|
-
readonly configRegistryIDs?: readonly string[];
|
|
77
|
-
/**
|
|
78
|
-
* Caller-trusted reference values, each replacing the document's
|
|
79
|
-
* endorsement of that component: `config` pins the exact config, as
|
|
80
|
-
* `{ bytes, name? }` (the digest and runtime pin are taken from the bytes)
|
|
81
|
-
* or `{ digest, runtime, name? }`; `runtime` pins the exact runtime
|
|
82
|
-
* manifest, which on its own must be the release the document's config
|
|
83
|
-
* endorsement names, and with an embedded config must be the one that
|
|
84
|
-
* config pins; `platform` pins a platform-endorsements/v2 policy
|
|
85
|
-
* artifact. At least one must be present.
|
|
86
|
-
* An embedded config selects its own trust source, so it conflicts with
|
|
87
|
-
* `configSigningKeys`, `configAuthorizer` and `configRegistryIDs`; with
|
|
88
|
-
* both `runtime` and `platform` embedded, `freshnessSigningKeys` has no
|
|
89
|
-
* endorsed artifact to verify and is refused.
|
|
90
|
-
*/
|
|
91
|
-
readonly embeddedReferences?: EmbeddedReferences;
|
|
92
|
-
}
|
|
93
142
|
/**
|
|
94
143
|
* Appraises v3 attestation documents against a fixed policy. Immutable once
|
|
95
144
|
* built, and built only by {@link Verifier.create}: the constructor is
|
|
@@ -106,15 +155,17 @@ export declare class Verifier {
|
|
|
106
155
|
* not be mutated.
|
|
107
156
|
*/
|
|
108
157
|
readonly pinnedRegisters: Expected | undefined;
|
|
109
|
-
/** Whether the caller, rather than an endorsement, authorizes the config. */
|
|
110
|
-
readonly callerAuthorizesConfig: boolean;
|
|
111
158
|
private constructor();
|
|
112
159
|
/**
|
|
113
|
-
* Builds a verifier
|
|
114
|
-
* Tinfoil's public
|
|
115
|
-
*
|
|
160
|
+
* Builds a verifier that trusts configs as `config` selects and applies
|
|
161
|
+
* `policy`. Undefined `config` selects Tinfoil's public registry, and an
|
|
162
|
+
* undefined or empty `policy` keeps every default: the embedded production
|
|
163
|
+
* trust roots, Tinfoil's public artifact signing keys and a seven-day
|
|
164
|
+
* freshness bound. Both are copied, so later changes by the caller have no
|
|
165
|
+
* effect. Throws UsageError for an invalid field, an unknown `kind` among
|
|
166
|
+
* them.
|
|
116
167
|
*/
|
|
117
|
-
static create(
|
|
168
|
+
static create(config?: ConfigTrust, policy?: Policy): Promise<Verifier>;
|
|
118
169
|
/**
|
|
119
170
|
* Throws UsageError, without a document or network I/O, for a pin that
|
|
120
171
|
* verification rejects whatever the document: one that names nothing under
|
|
@@ -126,12 +177,22 @@ export declare class Verifier {
|
|
|
126
177
|
/**
|
|
127
178
|
* Appraises a nonce-bound v3 document against `pin` at the current time.
|
|
128
179
|
* The document's collateral decides which part of `pin` applies.
|
|
180
|
+
*
|
|
181
|
+
* A document that it accepts resolves to a {@link VerificationReport}
|
|
182
|
+
* whose `verifiedFacts` hold what the document proved; the caller must
|
|
183
|
+
* bind its traffic to the keys in them and enforce their
|
|
184
|
+
* `freshnessExpiresAt`. A document that it rejects rejects with a
|
|
185
|
+
* {@link VerificationError} whose `report` shows the step that failed and
|
|
186
|
+
* what the steps before it established. A {@link UsageError} carries no
|
|
187
|
+
* report, because it reports a mistake in the caller's code rather than a
|
|
188
|
+
* rejected document.
|
|
129
189
|
*/
|
|
130
|
-
verifyV3(docBytes: Uint8Array, nonce: Uint8Array, pin: Pin): Promise<
|
|
190
|
+
verifyV3(docBytes: Uint8Array, nonce: Uint8Array, pin: Pin): Promise<VerificationReport>;
|
|
131
191
|
/**
|
|
132
192
|
* Like {@link verifyV3}, but `verificationTime` replaces the clock in every
|
|
133
|
-
* time-bound check (freshness, vendor certificate and CRL validity)
|
|
193
|
+
* time-bound check (freshness, vendor certificate and CRL validity), and
|
|
194
|
+
* the report's `metadata.verifiedAt` reports it.
|
|
134
195
|
*/
|
|
135
|
-
verifyV3At(docBytes: Uint8Array, nonce: Uint8Array, pin: Pin, verificationTime: Date): Promise<
|
|
196
|
+
verifyV3At(docBytes: Uint8Array, nonce: Uint8Array, pin: Pin, verificationTime: Date): Promise<VerificationReport>;
|
|
136
197
|
}
|
|
137
198
|
//# sourceMappingURL=verifier.d.ts.map
|
package/dist/verifier.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifier.d.ts","sourceRoot":"","sources":["../src/verifier.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAA4B,KAAK,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"verifier.d.ts","sourceRoot":"","sources":["../src/verifier.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAA4B,KAAK,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AA8BnG,OAAO,EAAgC,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAA+B,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGnF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,cAAc,GAAG,uBAAuB,CAAC;AAEvH;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,CAAC,WAAW,EAAE,iB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