@gadicc/loom 1.35.3 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -0
- package/THIRD_PARTY_NOTICES.md +12 -9
- package/esm/src/cli/externalSkills.d.ts.map +1 -1
- package/esm/src/cli/externalSkills.js +25 -20
- package/esm/src/cli/mod.d.ts +117 -1
- package/esm/src/cli/mod.d.ts.map +1 -1
- package/esm/src/cli/mod.js +1368 -44
- package/esm/src/cli/projectSkills.d.ts +10 -3
- package/esm/src/cli/projectSkills.d.ts.map +1 -1
- package/esm/src/cli/projectSkills.js +173 -49
- package/esm/src/cli/vercelBuildEnv.d.ts +28 -0
- package/esm/src/cli/vercelBuildEnv.d.ts.map +1 -1
- package/esm/src/cli/vercelBuildEnv.js +120 -30
- package/esm/src/next/secrets/mod.d.ts +108 -0
- package/esm/src/next/secrets/mod.d.ts.map +1 -0
- package/esm/src/next/secrets/mod.js +176 -0
- package/esm/src/secrets/encoding.d.ts +32 -0
- package/esm/src/secrets/encoding.d.ts.map +1 -0
- package/esm/src/secrets/encoding.js +87 -0
- package/esm/src/secrets/errors.d.ts +45 -0
- package/esm/src/secrets/errors.d.ts.map +1 -0
- package/esm/src/secrets/errors.js +39 -0
- package/esm/src/secrets/fingerprint.d.ts +43 -0
- package/esm/src/secrets/fingerprint.d.ts.map +1 -0
- package/esm/src/secrets/fingerprint.js +87 -0
- package/esm/src/secrets/frame.d.ts +34 -0
- package/esm/src/secrets/frame.d.ts.map +1 -0
- package/esm/src/secrets/frame.js +86 -0
- package/esm/src/secrets/keyring.d.ts +62 -0
- package/esm/src/secrets/keyring.d.ts.map +1 -0
- package/esm/src/secrets/keyring.js +160 -0
- package/esm/src/secrets/legacy.d.ts +60 -0
- package/esm/src/secrets/legacy.d.ts.map +1 -0
- package/esm/src/secrets/legacy.js +147 -0
- package/esm/src/secrets/maintenance.d.ts +173 -0
- package/esm/src/secrets/maintenance.d.ts.map +1 -0
- package/esm/src/secrets/maintenance.js +315 -0
- package/esm/src/secrets/mod.d.ts +6 -0
- package/esm/src/secrets/mod.d.ts.map +1 -0
- package/esm/src/secrets/mod.js +5 -0
- package/esm/src/secrets/secrets.d.ts +192 -0
- package/esm/src/secrets/secrets.d.ts.map +1 -0
- package/esm/src/secrets/secrets.js +528 -0
- package/package.json +50 -2
- package/script/src/cli/externalSkills.d.ts.map +1 -1
- package/script/src/cli/externalSkills.js +25 -20
- package/script/src/cli/mod.d.ts +117 -1
- package/script/src/cli/mod.d.ts.map +1 -1
- package/script/src/cli/mod.js +1372 -41
- package/script/src/cli/projectSkills.d.ts +10 -3
- package/script/src/cli/projectSkills.d.ts.map +1 -1
- package/script/src/cli/projectSkills.js +173 -49
- package/script/src/cli/vercelBuildEnv.d.ts +28 -0
- package/script/src/cli/vercelBuildEnv.d.ts.map +1 -1
- package/script/src/cli/vercelBuildEnv.js +121 -30
- package/script/src/next/secrets/mod.d.ts +108 -0
- package/script/src/next/secrets/mod.d.ts.map +1 -0
- package/script/src/next/secrets/mod.js +218 -0
- package/script/src/secrets/encoding.d.ts +32 -0
- package/script/src/secrets/encoding.d.ts.map +1 -0
- package/script/src/secrets/encoding.js +95 -0
- package/script/src/secrets/errors.d.ts +45 -0
- package/script/src/secrets/errors.d.ts.map +1 -0
- package/script/src/secrets/errors.js +45 -0
- package/script/src/secrets/fingerprint.d.ts +43 -0
- package/script/src/secrets/fingerprint.d.ts.map +1 -0
- package/script/src/secrets/fingerprint.js +92 -0
- package/script/src/secrets/frame.d.ts +34 -0
- package/script/src/secrets/frame.d.ts.map +1 -0
- package/script/src/secrets/frame.js +91 -0
- package/script/src/secrets/keyring.d.ts +62 -0
- package/script/src/secrets/keyring.d.ts.map +1 -0
- package/script/src/secrets/keyring.js +202 -0
- package/script/src/secrets/legacy.d.ts +60 -0
- package/script/src/secrets/legacy.d.ts.map +1 -0
- package/script/src/secrets/legacy.js +186 -0
- package/script/src/secrets/maintenance.d.ts +173 -0
- package/script/src/secrets/maintenance.d.ts.map +1 -0
- package/script/src/secrets/maintenance.js +323 -0
- package/script/src/secrets/mod.d.ts +6 -0
- package/script/src/secrets/mod.d.ts.map +1 -0
- package/script/src/secrets/mod.js +24 -0
- package/script/src/secrets/secrets.d.ts +192 -0
- package/script/src/secrets/secrets.d.ts.map +1 -0
- package/script/src/secrets/secrets.js +532 -0
- package/skills/loom/SKILL.md +79 -222
- package/skills/loom/references/dependency-upgrades.md +26 -0
- package/skills/loom/references/local-development.md +157 -0
- package/skills/loom/references/release-safety.md +118 -0
- package/skills/loom/references/release-trusted-sources.md +55 -0
- package/skills/loom/references/tools-and-skills.md +83 -0
- package/skills/loom-api-keys/SKILL.md +1 -1
- package/skills/loom-auth/SKILL.md +7 -60
- package/skills/loom-auth/references/secrets-and-rotation.md +61 -0
- package/skills/loom-db/SKILL.md +4 -79
- package/skills/loom-files/SKILL.md +4 -2
- package/skills/loom-files/references/provider-configuration.md +150 -0
- package/skills/loom-jobs/SKILL.md +9 -8
- package/skills/loom-lingui/SKILL.md +5 -3
- package/skills/loom-secrets/SKILL.md +266 -0
- package/skills/loom-torvalds-review/SKILL.md +9 -6
- package/skills/loom-torvalds-review/references/context-profiles.md +2 -1
- package/skills/upgrade-deps/SKILL.md +15 -7
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecretMaintenanceError = void 0;
|
|
4
|
+
exports.defineSecretLocations = defineSecretLocations;
|
|
5
|
+
exports.reportSecretLocations = reportSecretLocations;
|
|
6
|
+
exports.verifySecretLocations = verifySecretLocations;
|
|
7
|
+
exports.resealSecretLocations = resealSecretLocations;
|
|
8
|
+
require("../../_dnt.polyfills.js");
|
|
9
|
+
/**
|
|
10
|
+
* A maintenance run stopped on something other than an unreadable row, such
|
|
11
|
+
* as a lost database connection. Rows already handled stay handled; running
|
|
12
|
+
* again is safe. The original error is `cause`.
|
|
13
|
+
*/
|
|
14
|
+
class SecretMaintenanceError extends Error {
|
|
15
|
+
constructor(location, rowId, results, cause) {
|
|
16
|
+
// The cause's own message is left out: a driver may quote parameters.
|
|
17
|
+
super(`Secret maintenance stopped in "${location}"${rowId === null ? "" : ` at row ${rowId}`}.`, { cause });
|
|
18
|
+
/** The location being processed. */
|
|
19
|
+
Object.defineProperty(this, "location", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: void 0
|
|
24
|
+
});
|
|
25
|
+
/** The row being processed, when one was. */
|
|
26
|
+
Object.defineProperty(this, "rowId", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
value: void 0
|
|
31
|
+
});
|
|
32
|
+
/** Results for the locations finished before this one. */
|
|
33
|
+
Object.defineProperty(this, "results", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
value: void 0
|
|
38
|
+
});
|
|
39
|
+
this.name = "SecretMaintenanceError";
|
|
40
|
+
this.location = location;
|
|
41
|
+
this.rowId = rowId;
|
|
42
|
+
this.results = results;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.SecretMaintenanceError = SecretMaintenanceError;
|
|
46
|
+
const DEFAULT_BATCH_SIZE = 100;
|
|
47
|
+
const DEFAULT_MAX_FAILURES = 1000;
|
|
48
|
+
const KINDS = ["text", "json", "bytes"];
|
|
49
|
+
/**
|
|
50
|
+
* Declares an app's secret locations, rejecting duplicate names so that a
|
|
51
|
+
* report line or a saved cursor always means one place.
|
|
52
|
+
*/
|
|
53
|
+
function defineSecretLocations(locations) {
|
|
54
|
+
const names = new Set();
|
|
55
|
+
for (const location of locations) {
|
|
56
|
+
if (typeof location.name !== "string" || location.name === "") {
|
|
57
|
+
throw new TypeError("A secret location needs a name.");
|
|
58
|
+
}
|
|
59
|
+
if (names.has(location.name)) {
|
|
60
|
+
throw new TypeError(`Secret location "${location.name}" is declared twice.`);
|
|
61
|
+
}
|
|
62
|
+
if (location.kind !== undefined && !KINDS.includes(location.kind)) {
|
|
63
|
+
throw new TypeError(`Secret location "${location.name}" has an unknown kind.`);
|
|
64
|
+
}
|
|
65
|
+
names.add(location.name);
|
|
66
|
+
}
|
|
67
|
+
return [...locations];
|
|
68
|
+
}
|
|
69
|
+
function positiveInteger(value, fallback, what) {
|
|
70
|
+
const resolved = value ?? fallback;
|
|
71
|
+
if (!Number.isSafeInteger(resolved) || resolved <= 0) {
|
|
72
|
+
throw new RangeError(`${what} must be a positive integer.`);
|
|
73
|
+
}
|
|
74
|
+
return resolved;
|
|
75
|
+
}
|
|
76
|
+
/** Collects failures up to a limit while counting all of them. */
|
|
77
|
+
function failureList(max) {
|
|
78
|
+
const list = [];
|
|
79
|
+
return {
|
|
80
|
+
failures: list,
|
|
81
|
+
failureCount: 0,
|
|
82
|
+
add(id, reason) {
|
|
83
|
+
this.failureCount += 1;
|
|
84
|
+
if (list.length < max) {
|
|
85
|
+
list.push({ id, reason });
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Turns an error from sealing or opening one row into a row failure. Anything
|
|
92
|
+
* else is not about that row's secret and is rethrown to stop the run.
|
|
93
|
+
*/
|
|
94
|
+
function rowFailureReason(error) {
|
|
95
|
+
const candidate = error;
|
|
96
|
+
// Matched by shape, not `instanceof`: the app and this module may have
|
|
97
|
+
// loaded different copies of the error class (ESM and CommonJS builds).
|
|
98
|
+
if (candidate?.name === "SecretUnreadableError" &&
|
|
99
|
+
typeof candidate.reason === "string") {
|
|
100
|
+
return candidate.reason;
|
|
101
|
+
}
|
|
102
|
+
if (error instanceof TypeError) {
|
|
103
|
+
return "invalid-binding";
|
|
104
|
+
}
|
|
105
|
+
throw error;
|
|
106
|
+
}
|
|
107
|
+
/** Runs one operation over every location, with paging and error context. */
|
|
108
|
+
async function eachLocation(db, declared, options, start) {
|
|
109
|
+
const locations = defineSecretLocations(declared);
|
|
110
|
+
const batchSize = positiveInteger(options.batchSize, DEFAULT_BATCH_SIZE, "batchSize");
|
|
111
|
+
const maxRows = options.maxRows === undefined
|
|
112
|
+
? Infinity
|
|
113
|
+
: positiveInteger(options.maxRows, 1, "maxRows");
|
|
114
|
+
const maxFailures = positiveInteger(options.maxFailures, DEFAULT_MAX_FAILURES, "maxFailures");
|
|
115
|
+
const results = [];
|
|
116
|
+
for (const location of locations) {
|
|
117
|
+
const operation = start(location, maxFailures);
|
|
118
|
+
const earlier = options.previous?.find((progress) => progress.name === location.name);
|
|
119
|
+
if (earlier?.done) {
|
|
120
|
+
results.push(operation.finish({
|
|
121
|
+
name: location.name,
|
|
122
|
+
rows: 0,
|
|
123
|
+
done: true,
|
|
124
|
+
cursor: null,
|
|
125
|
+
}));
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
let cursor = earlier?.cursor ?? null;
|
|
129
|
+
let rows = 0;
|
|
130
|
+
let done = false;
|
|
131
|
+
let rowId = null;
|
|
132
|
+
let previousPage = new Set();
|
|
133
|
+
try {
|
|
134
|
+
while (rows < maxRows) {
|
|
135
|
+
rowId = null;
|
|
136
|
+
const page = await location.read(db, cursor, Math.min(batchSize, maxRows - rows));
|
|
137
|
+
if (page.length === 0) {
|
|
138
|
+
done = true;
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
const thisPage = new Set();
|
|
142
|
+
for (const row of page) {
|
|
143
|
+
if (typeof row?.id !== "string" || row.id === "") {
|
|
144
|
+
throw new TypeError("A row was returned without a string id.");
|
|
145
|
+
}
|
|
146
|
+
// A read that ignores its cursor would otherwise never finish. No
|
|
147
|
+
// order is imposed on ids: a database may sort them differently
|
|
148
|
+
// from JavaScript, and only lack of progress is an error.
|
|
149
|
+
if (previousPage.has(row.id) || thisPage.has(row.id)) {
|
|
150
|
+
throw new Error("The same row was returned twice.");
|
|
151
|
+
}
|
|
152
|
+
thisPage.add(row.id);
|
|
153
|
+
rowId = row.id;
|
|
154
|
+
await operation.visit(row);
|
|
155
|
+
cursor = row.id;
|
|
156
|
+
rows += 1;
|
|
157
|
+
}
|
|
158
|
+
previousPage = thisPage;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
catch (error) {
|
|
162
|
+
throw new SecretMaintenanceError(location.name, rowId, results, error);
|
|
163
|
+
}
|
|
164
|
+
results.push(operation.finish({
|
|
165
|
+
name: location.name,
|
|
166
|
+
rows,
|
|
167
|
+
done,
|
|
168
|
+
cursor: done ? null : cursor,
|
|
169
|
+
}));
|
|
170
|
+
}
|
|
171
|
+
return results;
|
|
172
|
+
}
|
|
173
|
+
/** Opens a row strictly and returns a comparable form of its plaintext. */
|
|
174
|
+
async function openComparable(location, sealed, binding) {
|
|
175
|
+
const { purpose } = location;
|
|
176
|
+
switch (location.kind ?? "text") {
|
|
177
|
+
case "json":
|
|
178
|
+
return JSON.stringify(await purpose.openJson(sealed, binding));
|
|
179
|
+
case "bytes":
|
|
180
|
+
return (await purpose.openBytes(sealed, binding)).join(",");
|
|
181
|
+
default:
|
|
182
|
+
return await purpose.open(sealed, binding);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Counts rows per key version by parsing each string. It decrypts nothing, so
|
|
187
|
+
* it needs no key and can run anywhere the database can be read. A clean
|
|
188
|
+
* report says where rows stand, not that they open: use
|
|
189
|
+
* {@link verifySecretLocations} for that.
|
|
190
|
+
*/
|
|
191
|
+
function reportSecretLocations(db, locations, options = {}) {
|
|
192
|
+
return eachLocation(db, locations, options, (location, maxFailures) => {
|
|
193
|
+
const byKeyId = {};
|
|
194
|
+
const malformed = failureList(maxFailures);
|
|
195
|
+
return {
|
|
196
|
+
visit(row) {
|
|
197
|
+
const keyId = location.purpose.keyId(row.sealed);
|
|
198
|
+
if (keyId === null) {
|
|
199
|
+
malformed.add(row.id, "malformed");
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
byKeyId[keyId] = (byKeyId[keyId] ?? 0) + 1;
|
|
203
|
+
}
|
|
204
|
+
return Promise.resolve();
|
|
205
|
+
},
|
|
206
|
+
finish: (progress) => ({
|
|
207
|
+
...progress,
|
|
208
|
+
byKeyId,
|
|
209
|
+
failures: malformed.failures,
|
|
210
|
+
failureCount: malformed.failureCount,
|
|
211
|
+
}),
|
|
212
|
+
};
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Opens every declared row with no fallback of any kind, and reports each row
|
|
217
|
+
* that does not open by id and reason. Run it inside the deployed app: that is
|
|
218
|
+
* the only place the keys exist. It never outputs a value.
|
|
219
|
+
*
|
|
220
|
+
* A value whose lifetime has passed is reported as `expired` on every run. It
|
|
221
|
+
* can never be resealed, so the app must delete such rows before the key they
|
|
222
|
+
* are under can be retired.
|
|
223
|
+
*/
|
|
224
|
+
function verifySecretLocations(db, locations, options = {}) {
|
|
225
|
+
return eachLocation(db, locations, options, (location, maxFailures) => {
|
|
226
|
+
let opened = 0;
|
|
227
|
+
const failed = failureList(maxFailures);
|
|
228
|
+
return {
|
|
229
|
+
async visit(row) {
|
|
230
|
+
try {
|
|
231
|
+
await openComparable(location, row.sealed, row.binding);
|
|
232
|
+
opened += 1;
|
|
233
|
+
}
|
|
234
|
+
catch (error) {
|
|
235
|
+
failed.add(row.id, rowFailureReason(error));
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
finish: (progress) => ({
|
|
239
|
+
...progress,
|
|
240
|
+
opened,
|
|
241
|
+
failures: failed.failures,
|
|
242
|
+
failureCount: failed.failureCount,
|
|
243
|
+
}),
|
|
244
|
+
};
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Moves rows that are under an older key to the active key.
|
|
249
|
+
*
|
|
250
|
+
* Before anything else it runs `assertReady()` for the keys each location's
|
|
251
|
+
* purpose will actually use. A real run also requires that an expected-key
|
|
252
|
+
* list was applied, so rows are never moved onto a key that has not been shown
|
|
253
|
+
* to match its recorded fingerprint: moving every row onto a mistyped
|
|
254
|
+
* write-only key, and later retiring the old one, would lose them all.
|
|
255
|
+
*
|
|
256
|
+
* For each row it reseals, opens the new string and compares it with the old
|
|
257
|
+
* plaintext, and only then swaps it in with the location's compare-and-swap. A
|
|
258
|
+
* row someone else changed in the meantime is counted and left alone. It is
|
|
259
|
+
* safe to run again, and to stop and continue by passing the results back as
|
|
260
|
+
* `previous`.
|
|
261
|
+
*/
|
|
262
|
+
async function resealSecretLocations(db, locations, options = {}) {
|
|
263
|
+
const dryRun = options.dryRun !== false;
|
|
264
|
+
for (const location of defineSecretLocations(locations)) {
|
|
265
|
+
const readiness = await location.purpose.assertReady();
|
|
266
|
+
if (!dryRun && !readiness.verified && !options.allowUnverifiedKeys) {
|
|
267
|
+
throw new Error(`Secret location "${location.name}" has no expected-key list, so its active key is unverified. Refusing to reseal.`);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return eachLocation(db, locations, options, (location, maxFailures) => {
|
|
271
|
+
const counts = { current: 0, resealed: 0, changed: 0 };
|
|
272
|
+
const changedIds = [];
|
|
273
|
+
const failed = failureList(maxFailures);
|
|
274
|
+
return {
|
|
275
|
+
async visit(row) {
|
|
276
|
+
let next;
|
|
277
|
+
try {
|
|
278
|
+
if (location.purpose.keyId(row.sealed) === null) {
|
|
279
|
+
failed.add(row.id, "malformed");
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
if (!await location.purpose.needsReseal(row.sealed)) {
|
|
283
|
+
counts.current += 1;
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
next = await location.purpose.reseal(row.sealed, row.binding);
|
|
287
|
+
const [before, after] = await Promise.all([
|
|
288
|
+
openComparable(location, row.sealed, row.binding),
|
|
289
|
+
openComparable(location, next, row.binding),
|
|
290
|
+
]);
|
|
291
|
+
if (before !== after) {
|
|
292
|
+
// Unreachable unless the purpose or the runtime is broken; a row
|
|
293
|
+
// must never be replaced by something that reads differently.
|
|
294
|
+
failed.add(row.id, "malformed");
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
catch (error) {
|
|
299
|
+
failed.add(row.id, rowFailureReason(error));
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
// Outside the try: a failed write is not an unreadable row.
|
|
303
|
+
if (dryRun || await location.write(db, row.id, row.sealed, next)) {
|
|
304
|
+
counts.resealed += 1;
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
counts.changed += 1;
|
|
308
|
+
if (changedIds.length < maxFailures) {
|
|
309
|
+
changedIds.push(row.id);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
finish: (progress) => ({
|
|
314
|
+
...progress,
|
|
315
|
+
dryRun,
|
|
316
|
+
...counts,
|
|
317
|
+
changedIds,
|
|
318
|
+
failures: failed.failures,
|
|
319
|
+
failureCount: failed.failureCount,
|
|
320
|
+
}),
|
|
321
|
+
};
|
|
322
|
+
});
|
|
323
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "../../_dnt.polyfills.js";
|
|
2
|
+
export { type SecretFailureReason, SecretsKeyError, SecretsKeyMismatchError, SecretUnreadableError, } from "./errors.js";
|
|
3
|
+
export { type ExpectedSecretKey, isSecretKeyFingerprint, parseExpectedSecretKeys, secretKeyFingerprint, type SecretKeyState, } from "./fingerprint.js";
|
|
4
|
+
export { decodeSecretKey, DEFAULT_SECRETS_ACTIVE_KEY_ENV, DEFAULT_SECRETS_KEY_ENV_PREFIX, envKeyring, type EnvKeyringOptions, isSecretKeyId, type SecretKeyring, SECRETS_KEY_BYTES, staticKeyring, } from "./keyring.js";
|
|
5
|
+
export { createSecrets, type CreateSecretsOptions, KEYED_FINGERPRINT_FORMAT, type MacOptions, SEALED_FORMAT, type SealOptions, type SecretBinding, type SecretFailureEvent, type SecretPurpose, type SecretPurposeOptions, type Secrets, type SecretsReadiness, } from "./secrets.js";
|
|
6
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/secrets/mod.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,EACL,KAAK,mBAAmB,EACxB,eAAe,EACf,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,iBAAiB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,eAAe,EACf,8BAA8B,EAC9B,8BAA8B,EAC9B,UAAU,EACV,KAAK,iBAAiB,EACtB,aAAa,EACb,KAAK,aAAa,EAClB,iBAAiB,EACjB,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,wBAAwB,EACxB,KAAK,UAAU,EACf,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SEALED_FORMAT = exports.KEYED_FINGERPRINT_FORMAT = exports.createSecrets = exports.staticKeyring = exports.SECRETS_KEY_BYTES = exports.isSecretKeyId = exports.envKeyring = exports.DEFAULT_SECRETS_KEY_ENV_PREFIX = exports.DEFAULT_SECRETS_ACTIVE_KEY_ENV = exports.decodeSecretKey = exports.secretKeyFingerprint = exports.parseExpectedSecretKeys = exports.isSecretKeyFingerprint = exports.SecretUnreadableError = exports.SecretsKeyMismatchError = exports.SecretsKeyError = void 0;
|
|
4
|
+
require("../../_dnt.polyfills.js");
|
|
5
|
+
var errors_js_1 = require("./errors.js");
|
|
6
|
+
Object.defineProperty(exports, "SecretsKeyError", { enumerable: true, get: function () { return errors_js_1.SecretsKeyError; } });
|
|
7
|
+
Object.defineProperty(exports, "SecretsKeyMismatchError", { enumerable: true, get: function () { return errors_js_1.SecretsKeyMismatchError; } });
|
|
8
|
+
Object.defineProperty(exports, "SecretUnreadableError", { enumerable: true, get: function () { return errors_js_1.SecretUnreadableError; } });
|
|
9
|
+
var fingerprint_js_1 = require("./fingerprint.js");
|
|
10
|
+
Object.defineProperty(exports, "isSecretKeyFingerprint", { enumerable: true, get: function () { return fingerprint_js_1.isSecretKeyFingerprint; } });
|
|
11
|
+
Object.defineProperty(exports, "parseExpectedSecretKeys", { enumerable: true, get: function () { return fingerprint_js_1.parseExpectedSecretKeys; } });
|
|
12
|
+
Object.defineProperty(exports, "secretKeyFingerprint", { enumerable: true, get: function () { return fingerprint_js_1.secretKeyFingerprint; } });
|
|
13
|
+
var keyring_js_1 = require("./keyring.js");
|
|
14
|
+
Object.defineProperty(exports, "decodeSecretKey", { enumerable: true, get: function () { return keyring_js_1.decodeSecretKey; } });
|
|
15
|
+
Object.defineProperty(exports, "DEFAULT_SECRETS_ACTIVE_KEY_ENV", { enumerable: true, get: function () { return keyring_js_1.DEFAULT_SECRETS_ACTIVE_KEY_ENV; } });
|
|
16
|
+
Object.defineProperty(exports, "DEFAULT_SECRETS_KEY_ENV_PREFIX", { enumerable: true, get: function () { return keyring_js_1.DEFAULT_SECRETS_KEY_ENV_PREFIX; } });
|
|
17
|
+
Object.defineProperty(exports, "envKeyring", { enumerable: true, get: function () { return keyring_js_1.envKeyring; } });
|
|
18
|
+
Object.defineProperty(exports, "isSecretKeyId", { enumerable: true, get: function () { return keyring_js_1.isSecretKeyId; } });
|
|
19
|
+
Object.defineProperty(exports, "SECRETS_KEY_BYTES", { enumerable: true, get: function () { return keyring_js_1.SECRETS_KEY_BYTES; } });
|
|
20
|
+
Object.defineProperty(exports, "staticKeyring", { enumerable: true, get: function () { return keyring_js_1.staticKeyring; } });
|
|
21
|
+
var secrets_js_1 = require("./secrets.js");
|
|
22
|
+
Object.defineProperty(exports, "createSecrets", { enumerable: true, get: function () { return secrets_js_1.createSecrets; } });
|
|
23
|
+
Object.defineProperty(exports, "KEYED_FINGERPRINT_FORMAT", { enumerable: true, get: function () { return secrets_js_1.KEYED_FINGERPRINT_FORMAT; } });
|
|
24
|
+
Object.defineProperty(exports, "SEALED_FORMAT", { enumerable: true, get: function () { return secrets_js_1.SEALED_FORMAT; } });
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { type SecretFailureReason } from "./errors.js";
|
|
2
|
+
import { type ExpectedSecretKey } from "./fingerprint.js";
|
|
3
|
+
import { type SecretKeyring } from "./keyring.js";
|
|
4
|
+
/** Prefix and version of the sealed string format. */
|
|
5
|
+
export declare const SEALED_FORMAT = "ls1";
|
|
6
|
+
/** Prefix and version of the keyed fingerprint format. */
|
|
7
|
+
export declare const KEYED_FINGERPRINT_FORMAT = "lm1";
|
|
8
|
+
/**
|
|
9
|
+
* Non-secret context a sealed value is tied to, such as its owner and the
|
|
10
|
+
* destination it may be sent to. It is not stored: the caller supplies the
|
|
11
|
+
* same entries to `seal` and to `open`, and opening fails if any differ.
|
|
12
|
+
*
|
|
13
|
+
* Use stable identifiers the app never transforms. Changing how a purpose is
|
|
14
|
+
* bound makes its existing values unreadable, so a new binding scheme is a new
|
|
15
|
+
* purpose name.
|
|
16
|
+
*/
|
|
17
|
+
export type SecretBinding = Readonly<Record<string, string>>;
|
|
18
|
+
/**
|
|
19
|
+
* Reported to `onFailure` for every value that could not be opened, and for
|
|
20
|
+
* every stored fingerprint that could not be checked.
|
|
21
|
+
*/
|
|
22
|
+
export interface SecretFailureEvent {
|
|
23
|
+
purpose: string;
|
|
24
|
+
/** Key version named in the string; `null` when the string is malformed. */
|
|
25
|
+
keyId: number | null;
|
|
26
|
+
reason: SecretFailureReason;
|
|
27
|
+
}
|
|
28
|
+
/** Options for {@link createSecrets}. */
|
|
29
|
+
export interface CreateSecretsOptions {
|
|
30
|
+
keys: SecretKeyring;
|
|
31
|
+
/**
|
|
32
|
+
* The keys this environment is expected to hold. When given, a key is used
|
|
33
|
+
* only if it is listed, not retired and matches its recorded fingerprint,
|
|
34
|
+
* and values are sealed only under the one marked `active`. Omit it where
|
|
35
|
+
* no fingerprints are recorded, such as local development.
|
|
36
|
+
*/
|
|
37
|
+
expectedKeys?: readonly ExpectedSecretKey[] | undefined;
|
|
38
|
+
/** Milliseconds since the Unix epoch. Defaults to `Date.now`. */
|
|
39
|
+
now?: (() => number) | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Clock difference, in seconds, tolerated when bounding a future expiry.
|
|
42
|
+
* Defaults to 60.
|
|
43
|
+
*/
|
|
44
|
+
skewSeconds?: number | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Called for every failed open, for logging and metrics. It receives no
|
|
47
|
+
* plaintext, ciphertext or binding. Anything it throws, or a promise it
|
|
48
|
+
* returns that rejects, is ignored.
|
|
49
|
+
*/
|
|
50
|
+
onFailure?: ((event: SecretFailureEvent) => unknown) | undefined;
|
|
51
|
+
}
|
|
52
|
+
/** Options for one purpose. */
|
|
53
|
+
export interface SecretPurposeOptions {
|
|
54
|
+
/** Allow an empty binding. Off by default so a binding is never forgotten. */
|
|
55
|
+
unbound?: boolean | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Lifetime of every value sealed under this purpose. A caller may shorten
|
|
58
|
+
* it per call but not extend it, and `open` rejects a value with no expiry.
|
|
59
|
+
* Reducing it later makes values sealed under the longer lifetime unreadable
|
|
60
|
+
* until they are within the new lifetime of their expiry.
|
|
61
|
+
*/
|
|
62
|
+
ttlSeconds?: number | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Longest sealed string accepted, in characters. Set a small value for
|
|
65
|
+
* purposes whose strings come back from a caller. Defaults to 2 MiB.
|
|
66
|
+
*/
|
|
67
|
+
maxLength?: number | undefined;
|
|
68
|
+
}
|
|
69
|
+
/** Per-call options for sealing. */
|
|
70
|
+
export interface SealOptions {
|
|
71
|
+
/** Lifetime for this value. With a purpose lifetime it may only be shorter. */
|
|
72
|
+
ttlSeconds?: number | undefined;
|
|
73
|
+
}
|
|
74
|
+
/** Per-call options for {@link SecretPurpose.mac}. */
|
|
75
|
+
export interface MacOptions {
|
|
76
|
+
/**
|
|
77
|
+
* Compute under this key version instead of the active one. Needed to look
|
|
78
|
+
* a value up by fingerprint after a rotation, when stored fingerprints are
|
|
79
|
+
* still under an older key. Throws if that version is not configured.
|
|
80
|
+
*/
|
|
81
|
+
keyId?: number | undefined;
|
|
82
|
+
}
|
|
83
|
+
/** A named use of the keyring, with its own derived encryption key. */
|
|
84
|
+
export interface SecretPurpose {
|
|
85
|
+
readonly name: string;
|
|
86
|
+
seal(value: string, binding: SecretBinding, options?: SealOptions): Promise<string>;
|
|
87
|
+
sealJson(value: unknown, binding: SecretBinding, options?: SealOptions): Promise<string>;
|
|
88
|
+
sealBytes(value: Uint8Array, binding: SecretBinding, options?: SealOptions): Promise<string>;
|
|
89
|
+
/** Throws {@link SecretUnreadableError} on any failure. */
|
|
90
|
+
open(sealed: string, binding: SecretBinding): Promise<string>;
|
|
91
|
+
openJson(sealed: string, binding: SecretBinding): Promise<unknown>;
|
|
92
|
+
openBytes(sealed: string, binding: SecretBinding): Promise<Uint8Array>;
|
|
93
|
+
/** Like `open`, but `null` when the value cannot be read. */
|
|
94
|
+
tryOpen(sealed: string, binding: SecretBinding): Promise<string | null>;
|
|
95
|
+
/** Wrapped in an object so that a sealed JSON `null` differs from a failure. */
|
|
96
|
+
tryOpenJson(sealed: string, binding: SecretBinding): Promise<{
|
|
97
|
+
value: unknown;
|
|
98
|
+
} | null>;
|
|
99
|
+
tryOpenBytes(sealed: string, binding: SecretBinding): Promise<Uint8Array | null>;
|
|
100
|
+
/** Key version named in a sealed string, or `null` when it does not parse. */
|
|
101
|
+
keyId(sealed: string): number | null;
|
|
102
|
+
/**
|
|
103
|
+
* Whether a sealed string is under a key other than the active one. `false`
|
|
104
|
+
* for a string that does not parse: there is nothing `reseal` could do.
|
|
105
|
+
* Rejects with {@link SecretsKeyError} when the active key cannot be
|
|
106
|
+
* determined, so do not call it on a path that only needs to read.
|
|
107
|
+
*/
|
|
108
|
+
needsReseal(sealed: string): Promise<boolean>;
|
|
109
|
+
/**
|
|
110
|
+
* Re-encrypts under the active key. The frame is carried over unchanged, so
|
|
111
|
+
* the kind and any expiry survive; an expired value is refused. Returns the
|
|
112
|
+
* input when it is already under the active key.
|
|
113
|
+
*/
|
|
114
|
+
reseal(sealed: string, binding: SecretBinding): Promise<string>;
|
|
115
|
+
/**
|
|
116
|
+
* A keyed fingerprint of `text`, for matching a value without storing it:
|
|
117
|
+
* `lm1.<key id>.<HMAC-SHA-256>`. Equal inputs give equal strings under one
|
|
118
|
+
* key, purpose and binding, and nothing about the text can be recovered
|
|
119
|
+
* from it without the key.
|
|
120
|
+
*
|
|
121
|
+
* The text is used exactly as given: no trimming, case folding or Unicode
|
|
122
|
+
* normalisation. Equal text under an equal binding is visibly equal to
|
|
123
|
+
* anyone who can read where the fingerprints are stored, so include an
|
|
124
|
+
* owner in the binding where that matters.
|
|
125
|
+
*
|
|
126
|
+
* A fingerprint cannot be recomputed without its input, so it moves to a new
|
|
127
|
+
* key only when the input is seen again, and it is not a stable lookup key
|
|
128
|
+
* across a rotation: look up under each key version still in use (see
|
|
129
|
+
* {@link MacOptions.keyId}). An app that wants to retire a key must keep a
|
|
130
|
+
* way to recover the input, for example by sealing it beside the value the
|
|
131
|
+
* fingerprint indexes.
|
|
132
|
+
*/
|
|
133
|
+
mac(text: string, binding: SecretBinding, options?: MacOptions): Promise<string>;
|
|
134
|
+
/**
|
|
135
|
+
* Whether `stored` is the fingerprint of `text`, under whichever key version
|
|
136
|
+
* `stored` names. `false` when it does not parse or its key version is not
|
|
137
|
+
* configured; both are also reported to `onFailure`, since a missing key
|
|
138
|
+
* otherwise looks like an ordinary mismatch. Throws {@link SecretsKeyError}
|
|
139
|
+
* when that key is configured but unusable.
|
|
140
|
+
*/
|
|
141
|
+
macMatches(stored: string, text: string, binding: SecretBinding): Promise<boolean>;
|
|
142
|
+
/**
|
|
143
|
+
* Whether a fingerprint is under a key other than the active one, so the
|
|
144
|
+
* caller should replace it the next time it sees the input. Like
|
|
145
|
+
* `needsReseal`, it rejects when the active key cannot be determined.
|
|
146
|
+
*/
|
|
147
|
+
macNeedsRefresh(stored: string): Promise<boolean>;
|
|
148
|
+
/**
|
|
149
|
+
* {@link Secrets.assertReady} for the instance this purpose belongs to, so
|
|
150
|
+
* that code holding only a purpose checks the keys that purpose will use.
|
|
151
|
+
*/
|
|
152
|
+
assertReady(): Promise<SecretsReadiness>;
|
|
153
|
+
}
|
|
154
|
+
/** What {@link Secrets.assertReady} found. Nothing in it is secret. */
|
|
155
|
+
export interface SecretsReadiness {
|
|
156
|
+
/**
|
|
157
|
+
* Whether an expected-key list was applied, so every key below was shown to
|
|
158
|
+
* match its recorded fingerprint. `false` means only that the pointer names
|
|
159
|
+
* a usable key: nothing says it is the key the operator saved. A production
|
|
160
|
+
* health check should require `true`.
|
|
161
|
+
*/
|
|
162
|
+
verified: boolean;
|
|
163
|
+
activeKeyId: number;
|
|
164
|
+
/** Every key that was checked, with the fingerprint computed from it. */
|
|
165
|
+
keys: {
|
|
166
|
+
id: number;
|
|
167
|
+
fingerprint: string;
|
|
168
|
+
}[];
|
|
169
|
+
}
|
|
170
|
+
/** What {@link createSecrets} returns. */
|
|
171
|
+
export interface Secrets {
|
|
172
|
+
purpose(name: string, options?: SecretPurposeOptions): SecretPurpose;
|
|
173
|
+
/**
|
|
174
|
+
* Checks the keys without sealing or opening anything, for a health route
|
|
175
|
+
* or a post-deploy smoke test: the pointer names a usable key, and, when an
|
|
176
|
+
* expected-key list was given, every listed key that is not retired exists
|
|
177
|
+
* and matches its fingerprint and the pointer names the active one.
|
|
178
|
+
*
|
|
179
|
+
* Throws {@link SecretsKeyError} naming the first problem. Without it, a bad
|
|
180
|
+
* pointer shows only when the first write fails.
|
|
181
|
+
*/
|
|
182
|
+
assertReady(): Promise<SecretsReadiness>;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Creates the sealing and opening operations over a keyring.
|
|
186
|
+
*
|
|
187
|
+
* Each purpose encrypts with its own key, derived with HKDF from the keyring's
|
|
188
|
+
* key, so a value sealed for one purpose cannot be opened as another. The
|
|
189
|
+
* format version, key version, purpose and binding are all authenticated.
|
|
190
|
+
*/
|
|
191
|
+
export declare function createSecrets(options: CreateSecretsOptions): Secrets;
|
|
192
|
+
//# sourceMappingURL=secrets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../../src/src/secrets/secrets.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,mBAAmB,EAIzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,iBAAiB,EAGvB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,cAAc,CAAC;AAEtB,sDAAsD;AACtD,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,0DAA0D;AAC1D,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAe9C;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7D;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,aAAa,CAAC;IACpB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,SAAS,iBAAiB,EAAE,GA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