@interop/was-client 0.59.1 → 0.61.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 -45
- package/dist/Collection.d.ts +140 -96
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +648 -194
- package/dist/Collection.js.map +1 -1
- package/dist/Resource.d.ts +1 -1
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +0 -3
- package/dist/Resource.js.map +1 -1
- package/dist/Space.d.ts +17 -16
- package/dist/Space.d.ts.map +1 -1
- package/dist/Space.js +41 -24
- package/dist/Space.js.map +1 -1
- package/dist/WasClient.d.ts.map +1 -1
- package/dist/WasClient.js +9 -3
- package/dist/WasClient.js.map +1 -1
- package/dist/codec.d.ts +3 -3
- package/dist/edv/EdvCodec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.js +22 -46
- package/dist/edv/EdvCodec.js.map +1 -1
- package/dist/edv/descriptorStore.d.ts +16 -14
- package/dist/edv/descriptorStore.d.ts.map +1 -1
- package/dist/edv/descriptorStore.js +17 -14
- package/dist/edv/descriptorStore.js.map +1 -1
- package/dist/edv/didKeyRecipient.d.ts +6 -1
- package/dist/edv/didKeyRecipient.d.ts.map +1 -1
- package/dist/edv/didKeyRecipient.js +4 -0
- package/dist/edv/didKeyRecipient.js.map +1 -1
- package/dist/edv/epochKeys.d.ts +43 -3
- package/dist/edv/epochKeys.d.ts.map +1 -1
- package/dist/edv/epochKeys.js +90 -9
- package/dist/edv/epochKeys.js.map +1 -1
- package/dist/edv/epochRoster.d.ts +36 -26
- package/dist/edv/epochRoster.d.ts.map +1 -1
- package/dist/edv/epochRoster.js +61 -10
- package/dist/edv/epochRoster.js.map +1 -1
- package/dist/edv/hmacKey.d.ts +17 -5
- package/dist/edv/hmacKey.d.ts.map +1 -1
- package/dist/edv/hmacKey.js +19 -5
- package/dist/edv/hmacKey.js.map +1 -1
- package/dist/edv/index.d.ts +1 -1
- package/dist/edv/index.js +1 -1
- package/dist/edv/logGovernedDescriptorStore.d.ts +2 -2
- package/dist/edv/logGovernedDescriptorStore.d.ts.map +1 -1
- package/dist/edv/logGovernedDescriptorStore.js +10 -9
- package/dist/edv/logGovernedDescriptorStore.js.map +1 -1
- package/dist/edv/recipients.d.ts +1 -1
- package/dist/edv/recipients.d.ts.map +1 -1
- package/dist/edv/recipients.js +12 -4
- package/dist/edv/recipients.js.map +1 -1
- package/dist/edv/refresh.d.ts +6 -1
- package/dist/edv/refresh.d.ts.map +1 -1
- package/dist/edv/refresh.js +19 -2
- package/dist/edv/refresh.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +3 -3
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/cas.d.ts.map +1 -1
- package/dist/internal/cas.js +7 -4
- package/dist/internal/cas.js.map +1 -1
- package/dist/internal/codec.d.ts +22 -1
- package/dist/internal/codec.d.ts.map +1 -1
- package/dist/internal/codec.js +117 -46
- package/dist/internal/codec.js.map +1 -1
- package/dist/internal/content.d.ts.map +1 -1
- package/dist/internal/content.js +12 -1
- package/dist/internal/content.js.map +1 -1
- package/dist/internal/describe.d.ts +98 -24
- package/dist/internal/describe.d.ts.map +1 -1
- package/dist/internal/describe.js +125 -18
- package/dist/internal/describe.js.map +1 -1
- package/dist/internal/meta.d.ts +32 -17
- package/dist/internal/meta.d.ts.map +1 -1
- package/dist/internal/meta.js +64 -35
- package/dist/internal/meta.js.map +1 -1
- package/dist/internal/paths.d.ts +33 -17
- package/dist/internal/paths.d.ts.map +1 -1
- package/dist/internal/paths.js +92 -40
- package/dist/internal/paths.js.map +1 -1
- package/dist/internal/reserved.d.ts +14 -0
- package/dist/internal/reserved.d.ts.map +1 -1
- package/dist/internal/reserved.js +23 -4
- package/dist/internal/reserved.js.map +1 -1
- package/dist/internal/write.js +30 -1
- package/dist/internal/write.js.map +1 -1
- package/dist/paths.d.ts +8 -5
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +8 -5
- package/dist/paths.js.map +1 -1
- package/dist/sync/port.d.ts.map +1 -1
- package/dist/sync/port.js +14 -1
- package/dist/sync/port.js.map +1 -1
- package/dist/sync/provisioning.d.ts +7 -7
- package/dist/sync/provisioning.d.ts.map +1 -1
- package/dist/sync/provisioning.js +27 -15
- package/dist/sync/provisioning.js.map +1 -1
- package/dist/types.d.ts +16 -9
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/edv/epochKeys.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { KeyUnwrapError } from '../errors.js';
|
|
1
|
+
import { EncryptionError, EncryptOnlyCipherError, KeyUnwrapError } from '../errors.js';
|
|
2
2
|
import { Memo } from '../internal/memo.js';
|
|
3
|
-
import { epochKeyIdFor, reconstructEpochKeyPair, unwrapEpochSecret } from './epochCrypto.js';
|
|
4
|
-
import {
|
|
3
|
+
import { didKeyResolver, epochKeyIdFor, reconstructEpochKeyPair, unwrapEpochSecret } from './epochCrypto.js';
|
|
4
|
+
import { currentEpochOf } from './epochRoster.js';
|
|
5
5
|
/**
|
|
6
6
|
* Resolves the reader's epoch keys from a descriptor. Returns `null` when the
|
|
7
7
|
* descriptor declares no epochs (the epoch codec refuses such a descriptor
|
|
@@ -10,13 +10,21 @@ import { pickEpoch } from './epochRoster.js';
|
|
|
10
10
|
* recipient), so an encrypted collection is never silently read/written with
|
|
11
11
|
* the wrong key.
|
|
12
12
|
*
|
|
13
|
+
* The write epoch is always the descriptor's current epoch, whether or not
|
|
14
|
+
* this reader is a recipient of it: a reader rotated off the current epoch
|
|
15
|
+
* keeps reading the epochs it is still named in, and writes through a
|
|
16
|
+
* public-only stand-in for the current one rather than falling back to an
|
|
17
|
+
* epoch it was rotated off of. `namedInWriteEpoch` reports which of the two it
|
|
18
|
+
* is.
|
|
19
|
+
*
|
|
13
20
|
* @param options {object}
|
|
14
21
|
* @param options.encryption {CollectionEncryption} the Collection's descriptor
|
|
15
22
|
* @param options.keyAgreementKey {IKeyAgreementKey} the reader's own KAK; its
|
|
16
23
|
* `id` must match a recipient `kid` in an epoch for that epoch to unwrap
|
|
24
|
+
* @param [options.label] {string} names the collection in error messages
|
|
17
25
|
* @returns {Promise<ResolvedEpochKeys | null>}
|
|
18
26
|
*/
|
|
19
|
-
export async function resolveEpochKeys({ encryption, keyAgreementKey }) {
|
|
27
|
+
export async function resolveEpochKeys({ encryption, keyAgreementKey, label = '(unnamed)' }) {
|
|
20
28
|
const epochs = encryption.epochs;
|
|
21
29
|
if (!epochs || epochs.length === 0) {
|
|
22
30
|
return null;
|
|
@@ -32,10 +40,37 @@ export async function resolveEpochKeys({ encryption, keyAgreementKey }) {
|
|
|
32
40
|
"reader's key-agreement key). Add this reader with addRecipient, or " +
|
|
33
41
|
'supply the correct key-agreement key.');
|
|
34
42
|
}
|
|
35
|
-
// The
|
|
36
|
-
//
|
|
37
|
-
// own epochs
|
|
38
|
-
|
|
43
|
+
// The write epoch is the descriptor's CURRENT epoch, resolved against the
|
|
44
|
+
// full roster -- never against the subset this reader is named in. Falling
|
|
45
|
+
// back within the reader's own epochs would hand a reader rotated off the
|
|
46
|
+
// current epoch a write key for an epoch it was rotated off OF, so every
|
|
47
|
+
// document it wrote afterward would be sealed to a key each removed
|
|
48
|
+
// recipient of that epoch still holds. The rotation's read axis is
|
|
49
|
+
// prospective on its own terms; it must not depend on the pull axis having
|
|
50
|
+
// already taken effect.
|
|
51
|
+
const writeEpochEntry = currentEpochOf({
|
|
52
|
+
epochs,
|
|
53
|
+
currentEpoch: encryption.currentEpoch,
|
|
54
|
+
label
|
|
55
|
+
});
|
|
56
|
+
const namedInWriteEpoch = writeEpochEntry.recipients.some(recipient => recipient.header.kid === keyAgreementKey.id);
|
|
57
|
+
if (!namedInWriteEpoch) {
|
|
58
|
+
// A rotated-off reader: still a recipient of older epochs (history stays
|
|
59
|
+
// readable -- rotation is prospective, never retroactive), but of no key
|
|
60
|
+
// for the current one. It seals writes to the current epoch's PUBLIC key,
|
|
61
|
+
// reconstructed from the epoch id exactly as an encrypt-only writer does,
|
|
62
|
+
// so nothing it writes reaches a rotated-out epoch and nothing it writes
|
|
63
|
+
// is readable back to it.
|
|
64
|
+
return {
|
|
65
|
+
writeEpoch: writeEpochEntry.id,
|
|
66
|
+
writeKey: await epochWriteStandIn({
|
|
67
|
+
epochId: writeEpochEntry.id,
|
|
68
|
+
label
|
|
69
|
+
}),
|
|
70
|
+
readKeys: namedEpochs.map(epoch => lazyEpochKey({ epoch, keyAgreementKey })),
|
|
71
|
+
namedInWriteEpoch
|
|
72
|
+
};
|
|
73
|
+
}
|
|
39
74
|
// The write epoch is unwrapped eagerly: `writeKey` must be a full key pair the
|
|
40
75
|
// EDV cipher can name recipients with and encrypt under right away.
|
|
41
76
|
const writeKey = await unwrapEpochKey({
|
|
@@ -61,7 +96,53 @@ export async function resolveEpochKeys({ encryption, keyAgreementKey }) {
|
|
|
61
96
|
readKeys.push(lazyEpochKey({ epoch, keyAgreementKey }));
|
|
62
97
|
}
|
|
63
98
|
}
|
|
64
|
-
return {
|
|
99
|
+
return {
|
|
100
|
+
writeEpoch: writeEpochEntry.id,
|
|
101
|
+
writeKey,
|
|
102
|
+
readKeys,
|
|
103
|
+
namedInWriteEpoch
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The public-only write key for an epoch this client holds no secret for,
|
|
108
|
+
* reconstructed from the epoch id alone. Sound because encryption in this
|
|
109
|
+
* scheme needs no secret: a write seals a fresh content-encryption key to the
|
|
110
|
+
* epoch's PUBLIC key, and the epoch id IS that key's did:key. Its
|
|
111
|
+
* `deriveSecret` refuses with {@link EncryptOnlyCipherError}, so the key can
|
|
112
|
+
* never be mistaken for one that decrypts.
|
|
113
|
+
*
|
|
114
|
+
* Shared by the encrypt-only build (a writer holding no key-agreement key at
|
|
115
|
+
* all) and the rotated-off reader (one holding keys, but none for the current
|
|
116
|
+
* epoch), so the two cannot drift.
|
|
117
|
+
*
|
|
118
|
+
* @param options {object}
|
|
119
|
+
* @param options.epochId {string} the epoch to seal to
|
|
120
|
+
* @param options.label {string} names the collection in error messages
|
|
121
|
+
* @returns {Promise<IKeyAgreementKey>}
|
|
122
|
+
*/
|
|
123
|
+
export async function epochWriteStandIn({ epochId, label }) {
|
|
124
|
+
let id;
|
|
125
|
+
try {
|
|
126
|
+
id = epochKeyIdFor(epochId);
|
|
127
|
+
// Fail fast on a malformed epoch id: the resolver validates the fragment
|
|
128
|
+
// is a well-formed X25519 public-key fingerprint, exactly what every
|
|
129
|
+
// write's recipient resolution will do.
|
|
130
|
+
await didKeyResolver({ id });
|
|
131
|
+
}
|
|
132
|
+
catch (err) {
|
|
133
|
+
throw new EncryptionError(`Collection ${label} lists a malformed key-epoch id "${epochId}": it ` +
|
|
134
|
+
'is not the did:key of an X25519 key-agreement key, so no write ' +
|
|
135
|
+
'recipient can be reconstructed from it.', { cause: err });
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
id,
|
|
139
|
+
async deriveSecret() {
|
|
140
|
+
throw new EncryptOnlyCipherError(`The cipher for collection ${label} holds no key-agreement secret ` +
|
|
141
|
+
`for key epoch "${epochId}": it was built from the descriptor ` +
|
|
142
|
+
'alone, or this reader was rotated off that epoch. It encrypts to ' +
|
|
143
|
+
'the epoch and decrypts nothing under it.');
|
|
144
|
+
}
|
|
145
|
+
};
|
|
65
146
|
}
|
|
66
147
|
/**
|
|
67
148
|
* Unwraps and reconstructs a single epoch's key pair for this reader, or returns
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epochKeys.js","sourceRoot":"","sources":["../../src/edv/epochKeys.ts"],"names":[],"mappings":"AAoBA,OAAO,
|
|
1
|
+
{"version":3,"file":"epochKeys.js","sourceRoot":"","sources":["../../src/edv/epochKeys.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,cAAc,EACf,MAAM,cAAc,CAAA;A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C,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;AAC/D,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAS,YAAY,CAAC,EACpB,KAAK,EACL,eAAe,EAIhB;IACC,6EAA6E;IAC7E,0EAA0E;IAC1E,uEAAuE;IACvE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE;QAC/B,MAAM,GAAG,GAAG,MAAM,cAAc,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAA;QAC5D,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,0EAA0E;YAC1E,wEAAwE;YACxE,mEAAmE;YACnE,WAAW;YACX,MAAM,IAAI,cAAc,CACtB,4CAA4C,KAAK,CAAC,EAAE,YAAY;gBAC9D,2BAA2B,CAC9B,CAAA;QACH,CAAC;QACD,OAAO,GAAG,CAAA;IACZ,CAAC,CAAC,CAAA;IACF,OAAO;QACL,EAAE,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,KAAK,CAAC,YAAY,CAAC,OAA+B;YAChD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,GAAG,EAAE,CAAA;YAC5B,OAAO,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;QAClC,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Crypto-free predicates over a Collection's `encryption` descriptor: whether it
|
|
6
|
-
* carries a usable key-epoch roster, and whether two descriptors name the same
|
|
7
|
-
* roster. Neither touches key material, so a caller deciding what to do with a
|
|
8
|
-
* descriptor -- open it, refuse it fail-closed, rebuild a cipher for it -- does
|
|
9
|
-
* not have to pull in the epoch crypto to ask.
|
|
10
|
-
*
|
|
11
|
-
* These exist because every consumer that holds descriptors (a local replica
|
|
12
|
-
* deciding whether a collection is encrypted, a sync layer deciding whether a
|
|
13
|
-
* freshly-read descriptor invalidates the cipher it opened with) otherwise
|
|
14
|
-
* re-derives the same two checks, and the two definitions have to agree across
|
|
15
|
-
* consumers to be worth anything.
|
|
16
|
-
*/
|
|
17
1
|
import type { CollectionEncryption, CollectionEncryptionEpoch } from '../types.js';
|
|
18
2
|
/**
|
|
19
3
|
* Whether a descriptor carries a usable key-epoch roster: it is present, its
|
|
@@ -51,19 +35,20 @@ export declare function hasKeyEpochs(encryption?: CollectionEncryption): encrypt
|
|
|
51
35
|
*/
|
|
52
36
|
export declare function epochRostersEqual(current?: CollectionEncryption, next?: CollectionEncryption): boolean;
|
|
53
37
|
/**
|
|
54
|
-
* Picks the epoch
|
|
55
|
-
*
|
|
56
|
-
*
|
|
38
|
+
* Picks the current epoch out of a roster: the entry named by `currentEpoch`
|
|
39
|
+
* when the list holds it, otherwise the LAST entry in the list's canonical
|
|
40
|
+
* order.
|
|
57
41
|
*
|
|
58
42
|
* The fallback is defined against the list's own order rather than against the
|
|
59
43
|
* incidental order in which secrets happened to unwrap, so the choice is
|
|
60
|
-
* deterministic for every caller
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
44
|
+
* deterministic for every caller, instead of assuming the list is
|
|
45
|
+
* append-ordered newest-last.
|
|
46
|
+
*
|
|
47
|
+
* This is the tolerant form, for callers holding the full roster during a
|
|
48
|
+
* rotation, where `currentEpoch` naming an unlisted entry is not yet
|
|
49
|
+
* actionable. A caller choosing the epoch to SEAL PLAINTEXT UNDER wants
|
|
50
|
+
* {@link currentEpochOf} instead, which refuses that case rather than
|
|
51
|
+
* selecting another entry.
|
|
67
52
|
*
|
|
68
53
|
* The list must be non-empty -- every caller has already established that it
|
|
69
54
|
* holds at least one epoch, so an empty list is a programming error rather than
|
|
@@ -74,4 +59,29 @@ export declare function epochRostersEqual(current?: CollectionEncryption, next?:
|
|
|
74
59
|
* @returns {CollectionEncryptionEpoch}
|
|
75
60
|
*/
|
|
76
61
|
export declare function pickEpoch(epochs: CollectionEncryptionEpoch[], currentEpoch?: string): CollectionEncryptionEpoch;
|
|
62
|
+
/**
|
|
63
|
+
* The epoch a descriptor seals new writes under: the entry `currentEpoch`
|
|
64
|
+
* names, or the last listed entry when the descriptor declares none (the
|
|
65
|
+
* roster is append-only, so the last entry is the newest).
|
|
66
|
+
*
|
|
67
|
+
* Always resolved against the FULL roster, never against the subset of epochs
|
|
68
|
+
* one reader is named in, and fails closed when `currentEpoch` names an entry
|
|
69
|
+
* the roster does not list. Both rules exist for the same reason: selecting
|
|
70
|
+
* any other entry would seal new plaintext under a rotated-out epoch, whose
|
|
71
|
+
* key every removed recipient of that epoch still holds. A descriptor whose
|
|
72
|
+
* `currentEpoch` is unlisted violates the descriptor invariant -- it is stale,
|
|
73
|
+
* partially synced, or tampered with -- and re-reading it is the only sound
|
|
74
|
+
* recovery.
|
|
75
|
+
*
|
|
76
|
+
* @param options {object}
|
|
77
|
+
* @param options.epochs {CollectionEncryptionEpoch[]} the non-empty roster
|
|
78
|
+
* @param [options.currentEpoch] {string} the descriptor's declared write epoch
|
|
79
|
+
* @param options.label {string} names the collection in the error message
|
|
80
|
+
* @returns {CollectionEncryptionEpoch}
|
|
81
|
+
*/
|
|
82
|
+
export declare function currentEpochOf({ epochs, currentEpoch, label }: {
|
|
83
|
+
epochs: CollectionEncryptionEpoch[];
|
|
84
|
+
currentEpoch?: string;
|
|
85
|
+
label: string;
|
|
86
|
+
}): CollectionEncryptionEpoch;
|
|
77
87
|
//# sourceMappingURL=epochRoster.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epochRoster.d.ts","sourceRoot":"","sources":["../../src/edv/epochRoster.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"epochRoster.d.ts","sourceRoot":"","sources":["../../src/edv/epochRoster.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,aAAa,CAAA;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,UAAU,CAAC,EAAE,oBAAoB,GAChC,UAAU,IAAI,oBAAoB,GAAG;IACtC,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,yBAAyB,EAAE,CAAA;CACpC,CAOA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,CAAC,EAAE,oBAAoB,EAC9B,IAAI,CAAC,EAAE,oBAAoB,GAC1B,OAAO,CAaT;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,yBAAyB,EAAE,EACnC,YAAY,CAAC,EAAE,MAAM,GACpB,yBAAyB,CAE3B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,YAAY,EACZ,KAAK,EACN,EAAE;IACD,MAAM,EAAE,yBAAyB,EAAE,CAAA;IACnC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,yBAAyB,CAc5B"}
|
package/dist/edv/epochRoster.js
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Crypto-free predicates over a Collection's `encryption` descriptor: whether it
|
|
6
|
+
* carries a usable key-epoch roster, and whether two descriptors name the same
|
|
7
|
+
* roster. Neither touches key material, so a caller deciding what to do with a
|
|
8
|
+
* descriptor -- open it, refuse it fail-closed, rebuild a cipher for it -- does
|
|
9
|
+
* not have to pull in the epoch crypto to ask.
|
|
10
|
+
*
|
|
11
|
+
* These exist because every consumer that holds descriptors (a local replica
|
|
12
|
+
* deciding whether a collection is encrypted, a sync layer deciding whether a
|
|
13
|
+
* freshly-read descriptor invalidates the cipher it opened with) otherwise
|
|
14
|
+
* re-derives the same two checks, and the two definitions have to agree across
|
|
15
|
+
* consumers to be worth anything.
|
|
16
|
+
*/
|
|
17
|
+
import { EncryptionError } from '../errors.js';
|
|
1
18
|
/**
|
|
2
19
|
* Whether a descriptor carries a usable key-epoch roster: it is present, its
|
|
3
20
|
* `currentEpoch` is a string, and its `epochs` list is a non-empty array. Both
|
|
@@ -47,19 +64,20 @@ export function epochRostersEqual(current, next) {
|
|
|
47
64
|
currentIds.every((id, index) => id === nextIds[index]));
|
|
48
65
|
}
|
|
49
66
|
/**
|
|
50
|
-
* Picks the epoch
|
|
51
|
-
*
|
|
52
|
-
*
|
|
67
|
+
* Picks the current epoch out of a roster: the entry named by `currentEpoch`
|
|
68
|
+
* when the list holds it, otherwise the LAST entry in the list's canonical
|
|
69
|
+
* order.
|
|
53
70
|
*
|
|
54
71
|
* The fallback is defined against the list's own order rather than against the
|
|
55
72
|
* incidental order in which secrets happened to unwrap, so the choice is
|
|
56
|
-
* deterministic for every caller
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
73
|
+
* deterministic for every caller, instead of assuming the list is
|
|
74
|
+
* append-ordered newest-last.
|
|
75
|
+
*
|
|
76
|
+
* This is the tolerant form, for callers holding the full roster during a
|
|
77
|
+
* rotation, where `currentEpoch` naming an unlisted entry is not yet
|
|
78
|
+
* actionable. A caller choosing the epoch to SEAL PLAINTEXT UNDER wants
|
|
79
|
+
* {@link currentEpochOf} instead, which refuses that case rather than
|
|
80
|
+
* selecting another entry.
|
|
63
81
|
*
|
|
64
82
|
* The list must be non-empty -- every caller has already established that it
|
|
65
83
|
* holds at least one epoch, so an empty list is a programming error rather than
|
|
@@ -72,4 +90,37 @@ export function epochRostersEqual(current, next) {
|
|
|
72
90
|
export function pickEpoch(epochs, currentEpoch) {
|
|
73
91
|
return epochs.find(epoch => epoch.id === currentEpoch) ?? epochs.at(-1);
|
|
74
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* The epoch a descriptor seals new writes under: the entry `currentEpoch`
|
|
95
|
+
* names, or the last listed entry when the descriptor declares none (the
|
|
96
|
+
* roster is append-only, so the last entry is the newest).
|
|
97
|
+
*
|
|
98
|
+
* Always resolved against the FULL roster, never against the subset of epochs
|
|
99
|
+
* one reader is named in, and fails closed when `currentEpoch` names an entry
|
|
100
|
+
* the roster does not list. Both rules exist for the same reason: selecting
|
|
101
|
+
* any other entry would seal new plaintext under a rotated-out epoch, whose
|
|
102
|
+
* key every removed recipient of that epoch still holds. A descriptor whose
|
|
103
|
+
* `currentEpoch` is unlisted violates the descriptor invariant -- it is stale,
|
|
104
|
+
* partially synced, or tampered with -- and re-reading it is the only sound
|
|
105
|
+
* recovery.
|
|
106
|
+
*
|
|
107
|
+
* @param options {object}
|
|
108
|
+
* @param options.epochs {CollectionEncryptionEpoch[]} the non-empty roster
|
|
109
|
+
* @param [options.currentEpoch] {string} the descriptor's declared write epoch
|
|
110
|
+
* @param options.label {string} names the collection in the error message
|
|
111
|
+
* @returns {CollectionEncryptionEpoch}
|
|
112
|
+
*/
|
|
113
|
+
export function currentEpochOf({ epochs, currentEpoch, label }) {
|
|
114
|
+
if (currentEpoch === undefined) {
|
|
115
|
+
return epochs.at(-1);
|
|
116
|
+
}
|
|
117
|
+
const entry = epochs.find(epoch => epoch.id === currentEpoch);
|
|
118
|
+
if (entry === undefined) {
|
|
119
|
+
throw new EncryptionError(`Collection ${label} declares currentEpoch "${currentEpoch}" but its ` +
|
|
120
|
+
'epoch roster does not list it. A descriptor names its current ' +
|
|
121
|
+
'epoch among the epochs it lists; re-read the descriptor before ' +
|
|
122
|
+
'writing.');
|
|
123
|
+
}
|
|
124
|
+
return entry;
|
|
125
|
+
}
|
|
75
126
|
//# sourceMappingURL=epochRoster.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epochRoster.js","sourceRoot":"","sources":["../../src/edv/epochRoster.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"epochRoster.js","sourceRoot":"","sources":["../../src/edv/epochRoster.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAM9C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAC1B,UAAiC;IAKjC,OAAO,CACL,UAAU,KAAK,SAAS;QACxB,OAAO,UAAU,CAAC,YAAY,KAAK,QAAQ;QAC3C,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;QAChC,UAAU,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAC7B,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,iBAAiB,CAC/B,OAA8B,EAC9B,IAA2B;IAE3B,IAAI,OAAO,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QAChD,OAAO,OAAO,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,CAAA;IACpD,CAAC;IACD,IAAI,OAAO,CAAC,YAAY,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;QAC/C,OAAO,KAAK,CAAA;IACd,CAAC;IACD,MAAM,UAAU,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAChE,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAC1D,OAAO,CACL,UAAU,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM;QACpC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC,CACvD,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,SAAS,CACvB,MAAmC,EACnC,YAAqB;IAErB,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,YAAY,CAAC,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAA;AAC1E,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,MAAM,EACN,YAAY,EACZ,KAAK,EAKN;IACC,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAA;IACvB,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,YAAY,CAAC,CAAA;IAC7D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,eAAe,CACvB,cAAc,KAAK,2BAA2B,YAAY,YAAY;YACpE,gEAAgE;YAChE,iEAAiE;YACjE,UAAU,CACb,CAAA;IACH,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/dist/edv/hmacKey.d.ts
CHANGED
|
@@ -88,19 +88,31 @@ export declare function hmacKeyFromSecret({ id, secret }: {
|
|
|
88
88
|
* no `hmac` member -- the collection is simply not indexable (installed at
|
|
89
89
|
* provisioning or never).
|
|
90
90
|
*
|
|
91
|
-
* Fails closed when the descriptor DOES declare one
|
|
92
|
-
* unwraps no entry: a current recipient must be able to
|
|
93
|
-
* corrupt entry is an {@link EncryptionError} rather
|
|
94
|
-
* "unindexable" downgrade that would write envelopes nobody can
|
|
91
|
+
* Fails closed when the descriptor DOES declare one, this key-agreement key
|
|
92
|
+
* unwraps no entry, and `required` is set: a current recipient must be able to
|
|
93
|
+
* blind, so a missing or corrupt entry is an {@link EncryptionError} rather
|
|
94
|
+
* than a silent "unindexable" downgrade that would write envelopes nobody can
|
|
95
|
+
* find.
|
|
96
|
+
*
|
|
97
|
+
* `required: false` is the rotated-off reader, whose blinding entry a removal
|
|
98
|
+
* drops along with its epoch key. There is no key to fail closed on behalf of
|
|
99
|
+
* there, and throwing would leave it unable to build any cipher at all --
|
|
100
|
+
* taking away the history reads that rotation is meant to leave untouched. It
|
|
101
|
+
* gets `null`, i.e. a cipher with no blinded index: it reads documents by id
|
|
102
|
+
* and cannot search.
|
|
95
103
|
*
|
|
96
104
|
* @param options {object}
|
|
97
105
|
* @param options.encryption {EncryptionWithHmac} the Collection's descriptor
|
|
98
106
|
* @param options.keyAgreementKey {IKeyAgreementKey} the reader's own KAK; its
|
|
99
107
|
* `id` must match an `hmac.recipients` entry's `kid`
|
|
108
|
+
* @param options.required {boolean} whether an unusable entry is an error
|
|
109
|
+
* rather than an unindexed cipher -- true for a recipient of the current key
|
|
110
|
+
* epoch, false for a reader rotated off it
|
|
100
111
|
* @returns {Promise<SHA256HMACKey | null>}
|
|
101
112
|
*/
|
|
102
|
-
export declare function resolveHmacKey({ encryption, keyAgreementKey }: {
|
|
113
|
+
export declare function resolveHmacKey({ encryption, keyAgreementKey, required }: {
|
|
103
114
|
encryption: EncryptionWithHmac;
|
|
104
115
|
keyAgreementKey: IKeyAgreementKey;
|
|
116
|
+
required: boolean;
|
|
105
117
|
}): Promise<SHA256HMACKey | null>;
|
|
106
118
|
//# sourceMappingURL=hmacKey.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmacKey.d.ts","sourceRoot":"","sources":["../../src/edv/hmacKey.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,M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IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IACxD,MAAM,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,SAAS,EAAE,UAAU,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAC/E;AAED;;;;;;;GAOG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC;IAC3C,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;CACnB,CAAC,CAGD;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,EAAE,EACF,MAAM,EACP,EAAE;IACD,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,UAAU,CAAA;CACnB,GAAG,OAAO,CAAC,aAAa,CAAC,CAEzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,cAAc,CAAC,EACnC,UAAU,EACV,eAAe,EACf,QAAQ,EACT,EAAE;IACD,UAAU,EAAE,kBAAkB,CAAA;IAC9B,eAAe,EAAE,gBAAgB,CAAA;IACjC,QAAQ,EAAE,OAAO,CAAA;CAClB,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAwBhC"}
|
package/dist/edv/hmacKey.js
CHANGED
|
@@ -66,18 +66,29 @@ export async function hmacKeyFromSecret({ id, secret }) {
|
|
|
66
66
|
* no `hmac` member -- the collection is simply not indexable (installed at
|
|
67
67
|
* provisioning or never).
|
|
68
68
|
*
|
|
69
|
-
* Fails closed when the descriptor DOES declare one
|
|
70
|
-
* unwraps no entry: a current recipient must be able to
|
|
71
|
-
* corrupt entry is an {@link EncryptionError} rather
|
|
72
|
-
* "unindexable" downgrade that would write envelopes nobody can
|
|
69
|
+
* Fails closed when the descriptor DOES declare one, this key-agreement key
|
|
70
|
+
* unwraps no entry, and `required` is set: a current recipient must be able to
|
|
71
|
+
* blind, so a missing or corrupt entry is an {@link EncryptionError} rather
|
|
72
|
+
* than a silent "unindexable" downgrade that would write envelopes nobody can
|
|
73
|
+
* find.
|
|
74
|
+
*
|
|
75
|
+
* `required: false` is the rotated-off reader, whose blinding entry a removal
|
|
76
|
+
* drops along with its epoch key. There is no key to fail closed on behalf of
|
|
77
|
+
* there, and throwing would leave it unable to build any cipher at all --
|
|
78
|
+
* taking away the history reads that rotation is meant to leave untouched. It
|
|
79
|
+
* gets `null`, i.e. a cipher with no blinded index: it reads documents by id
|
|
80
|
+
* and cannot search.
|
|
73
81
|
*
|
|
74
82
|
* @param options {object}
|
|
75
83
|
* @param options.encryption {EncryptionWithHmac} the Collection's descriptor
|
|
76
84
|
* @param options.keyAgreementKey {IKeyAgreementKey} the reader's own KAK; its
|
|
77
85
|
* `id` must match an `hmac.recipients` entry's `kid`
|
|
86
|
+
* @param options.required {boolean} whether an unusable entry is an error
|
|
87
|
+
* rather than an unindexed cipher -- true for a recipient of the current key
|
|
88
|
+
* epoch, false for a reader rotated off it
|
|
78
89
|
* @returns {Promise<SHA256HMACKey | null>}
|
|
79
90
|
*/
|
|
80
|
-
export async function resolveHmacKey({ encryption, keyAgreementKey }) {
|
|
91
|
+
export async function resolveHmacKey({ encryption, keyAgreementKey, required }) {
|
|
81
92
|
const hmac = encryption.hmac;
|
|
82
93
|
if (!hmac) {
|
|
83
94
|
return null;
|
|
@@ -87,6 +98,9 @@ export async function resolveHmacKey({ encryption, keyAgreementKey }) {
|
|
|
87
98
|
? await unwrapEpochSecret({ entry, keyAgreementKey })
|
|
88
99
|
: null;
|
|
89
100
|
if (!secret) {
|
|
101
|
+
if (!required) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
90
104
|
throw new EncryptionError('This collection declares a blinded-index key ' +
|
|
91
105
|
`("${hmac.id}") that this client's key-agreement key ` +
|
|
92
106
|
`("${keyAgreementKey.id}") cannot unwrap (no recipient entry names ` +
|
package/dist/edv/hmacKey.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmacKey.js","sourceRoot":"","sources":["../../src/edv/hmacKey.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEpD;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAA;AAkBhD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW;IAK/B,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,CAAA;IACzD,OAAO,EAAE,EAAE,EAAE,YAAY,MAAM,CAAC,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,CAAA;AAC/E,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,EAAE,EACF,MAAM,EAIP;IACC,OAAO,aAAa,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;AACjD,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"hmacKey.js","sourceRoot":"","sources":["../../src/edv/hmacKey.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEpD;;GAEG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AAe,CAAC,EAAE,6CAA6C;YACpE,sEAAsE;YACtE,0CAA0C,CAC7C,CAAA;IACH,CAAC;IACD,OAAO,iBAAiB,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;AACnD,CAAC"}
|
package/dist/edv/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
* loudly; it fails as a resource one of them cannot decrypt):
|
|
62
62
|
*
|
|
63
63
|
* - `EncryptionDescriptorSource` / `EncryptionDescriptorCache` -- the narrow
|
|
64
|
-
* seams a host implements: one signed Collection
|
|
64
|
+
* seams a host implements: one signed Collection Metadata read, and a
|
|
65
65
|
* client-local get/put pre-scoped to one Space. `wasDescriptorSource` is the
|
|
66
66
|
* source over a `WasClient` handle.
|
|
67
67
|
* - `acquireDescriptor` / `acquireDescriptors` -- fetch + cache with the
|
package/dist/edv/index.js
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
* loudly; it fails as a resource one of them cannot decrypt):
|
|
62
62
|
*
|
|
63
63
|
* - `EncryptionDescriptorSource` / `EncryptionDescriptorCache` -- the narrow
|
|
64
|
-
* seams a host implements: one signed Collection
|
|
64
|
+
* seams a host implements: one signed Collection Metadata read, and a
|
|
65
65
|
* client-local get/put pre-scoped to one Space. `wasDescriptorSource` is the
|
|
66
66
|
* source over a `WasClient` handle.
|
|
67
67
|
* - `acquireDescriptor` / `acquireDescriptors` -- fetch + cache with the
|
|
@@ -118,8 +118,8 @@ export declare function logGovernedDescriptorStore({ log, resolveController, pin
|
|
|
118
118
|
}): LogGovernedDescriptorStore;
|
|
119
119
|
/**
|
|
120
120
|
* Builds the `EncryptionDescriptorStore` over a Collection that may be
|
|
121
|
-
* log-governed. `read()` fetches the Collection
|
|
122
|
-
* its `encryption` member: absent, the store resolves `null` (a fresh
|
|
121
|
+
* log-governed. `read()` fetches the Collection Metadata object and dispatches
|
|
122
|
+
* on its `encryption` member: absent, the store resolves `null` (a fresh
|
|
123
123
|
* Collection that `create` makes log-governed with a genesis entry); present
|
|
124
124
|
* without `history`, it is the plain point-state descriptor and the store
|
|
125
125
|
* behaves exactly like `collectionDescriptorStore`; present with `history`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logGovernedDescriptorStore.d.ts","sourceRoot":"","sources":["../../src/edv/logGovernedDescriptorStore.ts"],"names":[],"mappings":"AA+BA,OAAO,EAWL,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAOlD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"logGovernedDescriptorStore.d.ts","sourceRoot":"","sources":["../../src/edv/logGovernedDescriptorStore.ts"],"names":[],"mappings":"AA+BA,OAAO,EAWL,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAOlD,OAAO,KAAK,EAAsB,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAC3E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAErE;;;GAGG;AACH,eAAO,MAAM,8BAA8B,0BAA0B,CAAA;AAErE;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,oBAAoB,GAC/B,oBAAoB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAGzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,8BAA8B,CAAC,EACnD,KAAK,EACL,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACN,EAAE;IACD,KAAK,EAAE,gBAA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CAAC,CAAA;IACvD,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC3B,GAAG,0BAA0B,CAwI7B"}
|
|
@@ -315,8 +315,8 @@ export function logGovernedDescriptorStore({ log, resolveController, pinStore, l
|
|
|
315
315
|
}
|
|
316
316
|
/**
|
|
317
317
|
* Builds the `EncryptionDescriptorStore` over a Collection that may be
|
|
318
|
-
* log-governed. `read()` fetches the Collection
|
|
319
|
-
* its `encryption` member: absent, the store resolves `null` (a fresh
|
|
318
|
+
* log-governed. `read()` fetches the Collection Metadata object and dispatches
|
|
319
|
+
* on its `encryption` member: absent, the store resolves `null` (a fresh
|
|
320
320
|
* Collection that `create` makes log-governed with a genesis entry); present
|
|
321
321
|
* without `history`, it is the plain point-state descriptor and the store
|
|
322
322
|
* behaves exactly like `collectionDescriptorStore`; present with `history`,
|
|
@@ -360,12 +360,13 @@ export function logGovernedCollectionDescriptorStore({ collection, resolveContro
|
|
|
360
360
|
signer
|
|
361
361
|
});
|
|
362
362
|
/**
|
|
363
|
-
* The
|
|
364
|
-
* forwarded by a point-state replace (the
|
|
365
|
-
* otherwise drop them), and its `encryption`
|
|
366
|
-
* a replace takes. Safe to carry even if
|
|
367
|
-
* same read's validator, so a concurrent
|
|
368
|
-
* create clears it, since the Collection it
|
|
363
|
+
* The Collection Metadata object observed by the most recent read: its
|
|
364
|
+
* configuration members are forwarded by a point-state replace (the
|
|
365
|
+
* full-replacement PUT would otherwise drop them), and its `encryption`
|
|
366
|
+
* member decides which write path a replace takes. Safe to carry even if
|
|
367
|
+
* stale: every write is pinned to the same read's validator, so a concurrent
|
|
368
|
+
* change fails the CAS instead. A create clears it, since the Collection it
|
|
369
|
+
* described is now log-governed.
|
|
369
370
|
*/
|
|
370
371
|
let described;
|
|
371
372
|
async function readGoverned(projection) {
|
|
@@ -413,7 +414,7 @@ export function logGovernedCollectionDescriptorStore({ collection, resolveContro
|
|
|
413
414
|
if (current === null) {
|
|
414
415
|
throw unreadableDescriptionError({
|
|
415
416
|
operation: 'manage recipients',
|
|
416
|
-
advice: 'Use a capability that can read the Collection
|
|
417
|
+
advice: 'Use a capability that can read the Collection Metadata object.'
|
|
417
418
|
});
|
|
418
419
|
}
|
|
419
420
|
described = current.description;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logGovernedDescriptorStore.js","sourceRoot":"","sources":["../../src/edv/logGovernedDescriptorStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EAMxB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACvE,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAIrD;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,uBAAuB,CAAA;AAErE;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CACvC,UAAgC;IAEhC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,CAAA;IACjD,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,8BAA8B,EAAE,CAAA;AAC1D,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAAC,EACnD,KAAK,EACL,iBA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AM,CAAA;QACxB,KAAK,CAAC,MAAM,GAAG,KAAK,EAAC,UAAU,EAAC,EAAE;YAChC;;;;;;;;;eASG;YACH,MAAM,UAAU,GAAG,MAAM,iBAAiB,EAAE,CAAA;YAC5C,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,iBAAiB,CAAC;gBACpD,KAAK,EAAE,GAAG;gBACV,UAAU;gBACV,MAAM,EAAE,mBAAmB;gBAC3B,QAAQ;gBACR,KAAK;gBACL,MAAM,EAAE,SAAS;gBACjB,KAAK,EAAE,yBAAyB,CAAC,UAAU,CAAC;aAC7C,CAAC,CAAA;YACF,YAAY,GAAG,QAAQ,CAAA;YACvB,gBAAgB,GAAG,UAAU,CAAA;YAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,uBAAuB,CAC/B,iEAAiE;oBAC/D,uCAAuC,EACzC,EAAE,MAAM,EAAE,GAAG,EAAE,CAChB,CAAA;YACH,CAAC;QACH,CAAC,CAAA;IACH,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,oCAAoC,CAAC,EACnD,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,MAAM,EAOP;IACC,MAAM,QAAQ,GAAG,0BAA0B,CAAC;QAC1C,GAAG,EAAE,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;QACrC,iBAAiB;QACjB,QAAQ;QACR,KAAK;QACL,MAAM;KACP,CAAC,CAAA;IACF
|
|
1
|
+
{"version":3,"file":"logGovernedDescriptorStore.js","sourceRoot":"","sources":["../../src/edv/logGovernedDescriptorStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,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,SAAS,CAAA;QACvB,CAAC,CAAA;IACH,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,OAAO,CAAC,IAAY,EAAE,KAAa;IAC1C,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAA;IACnD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC"}
|
package/dist/edv/recipients.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* the first epoch, adding a reader (escrow -- history included),
|
|
8
8
|
* and removing a reader (the full revoke-and-rotate procedure). Each operation
|
|
9
9
|
* mutates a `CollectionEncryption` descriptor through the descriptor-store seam
|
|
10
|
-
* (see `descriptorStore.ts`) -- the Collection
|
|
10
|
+
* (see `descriptorStore.ts`) -- the Collection Metadata object's `encryption`
|
|
11
11
|
* member for the `collection` sugar, or any explicit `store`, such as a
|
|
12
12
|
* descriptor hosted as a plain JSON Resource -- and writes it back with a
|
|
13
13
|
* compare-and-swap (`If-Match`), retrying on a concurrent change so two racing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipients.d.ts","sourceRoot":"","sources":["../../src/edv/recipients.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAKxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AACrE,OAAO,KAAK,EACV,oBAAoB,EAIpB,cAAc,EACf,MAAM,aAAa,CAAA;AASpB,OAAO,KAAK,EAA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