@interop/was-react 0.6.0 → 0.8.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 +1 -1
- package/dist/auth/loginFlow.d.ts +2 -2
- package/dist/auth/loginRequest.d.ts +7 -7
- package/dist/auth/loginRequest.d.ts.map +1 -1
- package/dist/auth/loginRequest.js +9 -6
- package/dist/auth/loginRequest.js.map +1 -1
- package/dist/auth/walletRequestTypes.d.ts +1 -1
- package/dist/dev/provisionDevGrants.d.ts +2 -2
- package/dist/dev/provisionDevGrants.js +7 -7
- package/dist/dev/provisionDevGrants.js.map +1 -1
- package/dist/identity/seedCredential.d.ts.map +1 -1
- package/dist/identity/seedCredential.js +15 -8
- package/dist/identity/seedCredential.js.map +1 -1
- package/dist/identity/seedStore.d.ts +5 -5
- package/dist/identity/seedStore.d.ts.map +1 -1
- package/dist/identity/seedStore.js +6 -6
- package/dist/identity/seedStore.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/session/authStore.js +14 -14
- package/dist/session/authStore.js.map +1 -1
- package/dist/storage/localStore.d.ts +16 -16
- package/dist/storage/localStore.d.ts.map +1 -1
- package/dist/storage/localStore.js +36 -36
- package/dist/storage/localStore.js.map +1 -1
- package/dist/storage/sharedCollectionReader.d.ts +2 -2
- package/dist/storage/sharedCollectionReader.js +9 -9
- package/dist/storage/sharedCollectionReader.js.map +1 -1
- package/dist/storage/wasRemoteStore.d.ts +17 -17
- package/dist/storage/wasRemoteStore.d.ts.map +1 -1
- package/dist/storage/wasRemoteStore.js +11 -11
- package/dist/storage/wasRemoteStore.js.map +1 -1
- package/dist/storage/wasSync.d.ts +5 -5
- package/dist/storage/wasSync.d.ts.map +1 -1
- package/dist/storage/wasSync.js +16 -16
- package/dist/storage/wasSync.js.map +1 -1
- package/dist/sync/docCipher.d.ts +4 -4
- package/dist/sync/docCipher.js +4 -4
- package/dist/sync/wasSyncPort.d.ts +2 -2
- package/dist/sync/wasSyncPort.js +2 -2
- package/package.json +5 -4
|
@@ -61,10 +61,10 @@ export declare class LocalStore {
|
|
|
61
61
|
* is derived ONCE, by the caller, and shared by every private collection: an
|
|
62
62
|
* epoch-roster recipient is always the X25519 twin of a controller did:key.
|
|
63
63
|
*
|
|
64
|
-
* When `
|
|
65
|
-
* the offline
|
|
64
|
+
* When `descriptors` carries an encryption descriptor for a private collection (from
|
|
65
|
+
* the offline descriptor cache), that collection's cipher is built epoch-aware so
|
|
66
66
|
* a multi-recipient envelope decrypts before any live description read; a
|
|
67
|
-
* collection with no cached
|
|
67
|
+
* collection with no cached descriptor keeps the single-key behavior.
|
|
68
68
|
*
|
|
69
69
|
* @param options {object}
|
|
70
70
|
* @param options.keyAgreementKey {IKeyAgreementKey} the app's identity KAK
|
|
@@ -77,19 +77,19 @@ export declare class LocalStore {
|
|
|
77
77
|
* (read-only, wallet-owned) registry. Nothing is opened for these -- they
|
|
78
78
|
* have no local replica -- but they are validated against the app-owned
|
|
79
79
|
* registry here, before any replica exists
|
|
80
|
-
* @param [options.
|
|
81
|
-
* encryption
|
|
80
|
+
* @param [options.descriptors] {Record<string, CollectionEncryption>} cached
|
|
81
|
+
* encryption descriptors keyed by WAS collection id (from the offline cache)
|
|
82
82
|
* @param [options.storage] {RxStorage<unknown, unknown>} defaults to
|
|
83
83
|
* Dexie/IndexedDB; injectable for tests
|
|
84
84
|
* @param [options.dbName] {string} defaults to {@link DEFAULT_DB_NAME}
|
|
85
85
|
* @returns {Promise<LocalStore>}
|
|
86
86
|
*/
|
|
87
|
-
static init({ keyAgreementKey, keyResolver, collections, sharedCollections,
|
|
87
|
+
static init({ keyAgreementKey, keyResolver, collections, sharedCollections, descriptors, storage, dbName }: {
|
|
88
88
|
keyAgreementKey: IKeyAgreementKey;
|
|
89
89
|
keyResolver: IKeyResolver;
|
|
90
90
|
collections: WasCollectionConfig[];
|
|
91
91
|
sharedCollections?: SharedCollectionConfig[];
|
|
92
|
-
|
|
92
|
+
descriptors?: Record<string, CollectionEncryption>;
|
|
93
93
|
storage?: RxStorage<unknown, unknown>;
|
|
94
94
|
dbName?: string;
|
|
95
95
|
}): Promise<LocalStore>;
|
|
@@ -103,24 +103,24 @@ export declare class LocalStore {
|
|
|
103
103
|
*/
|
|
104
104
|
collectionConfig(key: string): WasCollectionConfig;
|
|
105
105
|
/**
|
|
106
|
-
* Installs the epoch-
|
|
107
|
-
* that collection's fresh encryption
|
|
106
|
+
* Installs the epoch-descriptor refresher: given a WAS collection id, it fetches
|
|
107
|
+
* that collection's fresh encryption descriptor (a live description read). Called
|
|
108
108
|
* once a remote store exists; a decrypt that meets an unknown key epoch uses
|
|
109
|
-
* it to re-read the
|
|
109
|
+
* it to re-read the descriptor and rebuild the cipher exactly once.
|
|
110
110
|
*
|
|
111
111
|
* @param refresher {(collectionId: string) => Promise<CollectionEncryption | undefined>}
|
|
112
112
|
* @returns {void}
|
|
113
113
|
*/
|
|
114
114
|
setEpochRefresher(refresher: (collectionId: string) => Promise<CollectionEncryption | undefined>): void;
|
|
115
115
|
/**
|
|
116
|
-
* Rebuilds one private collection's cipher from a new encryption
|
|
116
|
+
* Rebuilds one private collection's cipher from a new encryption descriptor, on
|
|
117
117
|
* the same identity KAK the store was opened with. A public (plaintext)
|
|
118
118
|
* collection has no EDV cipher and is a no-op. The new cipher replaces the
|
|
119
119
|
* held one in place, so the conflict handler and every read path pick it up.
|
|
120
120
|
*
|
|
121
121
|
* @param options {object}
|
|
122
122
|
* @param options.key {string} the collection logical key
|
|
123
|
-
* @param options.encryption {CollectionEncryption} the new
|
|
123
|
+
* @param options.encryption {CollectionEncryption} the new descriptor
|
|
124
124
|
* @returns {Promise<void>}
|
|
125
125
|
*/
|
|
126
126
|
rebuildCipher({ key, encryption }: {
|
|
@@ -128,18 +128,18 @@ export declare class LocalStore {
|
|
|
128
128
|
encryption: CollectionEncryption;
|
|
129
129
|
}): Promise<void>;
|
|
130
130
|
/**
|
|
131
|
-
* Applies a freshly fetched remote encryption
|
|
132
|
-
* rebuilds that collection's cipher when the
|
|
131
|
+
* Applies a freshly fetched remote encryption descriptor (by WAS collection id):
|
|
132
|
+
* rebuilds that collection's cipher when the descriptor's current epoch differs
|
|
133
133
|
* from the one the current cipher was built from (a wallet-side rotation, or
|
|
134
134
|
* first-ever epochs), so subsequent writes stamp the current epoch. Returns
|
|
135
135
|
* whether a rebuild happened. Unknown / public collections are ignored.
|
|
136
136
|
*
|
|
137
137
|
* @param options {object}
|
|
138
138
|
* @param options.collectionId {string} the WAS collection id
|
|
139
|
-
* @param options.encryption {CollectionEncryption} the fetched
|
|
139
|
+
* @param options.encryption {CollectionEncryption} the fetched descriptor
|
|
140
140
|
* @returns {Promise<boolean>}
|
|
141
141
|
*/
|
|
142
|
-
|
|
142
|
+
applyRemoteDescriptor({ collectionId, encryption }: {
|
|
143
143
|
collectionId: string;
|
|
144
144
|
encryption: CollectionEncryption;
|
|
145
145
|
}): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localStore.d.ts","sourceRoot":"","sources":["../../src/storage/localStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAGL,KAAK,YAAY,EAEjB,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAE/D,OAAO,EAML,KAAK,IAAI,EACT,KAAK,SAAS,EAEf,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,8BAA8B,CAAA;AAKrC,KAAK,aAAa,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnC;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,aAAa,EACd,EAAE;IACD,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;CACtB,GAAG,MAAM,CAOT;AAED;;;;;GAKG;AACH,qBAAa,UAAU;;IAsBrB,OAAO;IA2BP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;WACU,IAAI,CAAC,EAChB,eAAe,EACf,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"localStore.d.ts","sourceRoot":"","sources":["../../src/storage/localStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAGL,KAAK,YAAY,EAEjB,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAE/D,OAAO,EAML,KAAK,IAAI,EACT,KAAK,SAAS,EAEf,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,8BAA8B,CAAA;AAKrC,KAAK,aAAa,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnC;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,aAAa,EACd,EAAE;IACD,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;CACtB,GAAG,MAAM,CAOT;AAED;;;;;GAKG;AACH,qBAAa,UAAU;;IAsBrB,OAAO;IA2BP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;WACU,IAAI,CAAC,EAChB,eAAe,EACf,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,WAAgB,EAChB,OAAO,EACP,MAAwB,EACzB,EAAE;QACD,eAAe,EAAE,gBAAgB,CA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;;;;;;;;;OASG;WACU,cAAc,CAAC,EAC1B,MAAM,EACN,OAAO,EACR,EAAE;QACD,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,CAAC,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;KACtC,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlB"}
|
|
@@ -61,17 +61,17 @@ export class LocalStore {
|
|
|
61
61
|
#index;
|
|
62
62
|
// The app's identity KAK and its resolver: the ONE key material every
|
|
63
63
|
// private collection's cipher is built on, kept so a cipher can be rebuilt
|
|
64
|
-
// when its epoch
|
|
64
|
+
// when its epoch descriptor changes (a wallet-side rotation).
|
|
65
65
|
#keyAgreementKey;
|
|
66
66
|
#keyResolver;
|
|
67
|
-
// The encryption
|
|
68
|
-
// from (keyed by collection logical key), so a
|
|
69
|
-
#
|
|
70
|
-
// Fetches a private collection's fresh encryption
|
|
67
|
+
// The encryption descriptor each private collection's current cipher was built
|
|
68
|
+
// from (keyed by collection logical key), so a descriptor change can be detected.
|
|
69
|
+
#descriptors;
|
|
70
|
+
// Fetches a private collection's fresh encryption descriptor (by WAS collection
|
|
71
71
|
// id) when a decrypt meets an unknown key epoch; injected once a remote store
|
|
72
72
|
// exists. Absent offline / local-only.
|
|
73
73
|
#epochRefresher;
|
|
74
|
-
constructor({ db, collections, ciphers, configs, keyAgreementKey, keyResolver,
|
|
74
|
+
constructor({ db, collections, ciphers, configs, keyAgreementKey, keyResolver, descriptors }) {
|
|
75
75
|
this.#db = db;
|
|
76
76
|
this.#collections = collections;
|
|
77
77
|
this.#ciphers = ciphers;
|
|
@@ -79,7 +79,7 @@ export class LocalStore {
|
|
|
79
79
|
this.#index = {};
|
|
80
80
|
this.#keyAgreementKey = keyAgreementKey;
|
|
81
81
|
this.#keyResolver = keyResolver;
|
|
82
|
-
this.#
|
|
82
|
+
this.#descriptors = descriptors;
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
85
|
* Opens (or creates) the store: builds one cipher per PRIVATE collection on
|
|
@@ -88,10 +88,10 @@ export class LocalStore {
|
|
|
88
88
|
* is derived ONCE, by the caller, and shared by every private collection: an
|
|
89
89
|
* epoch-roster recipient is always the X25519 twin of a controller did:key.
|
|
90
90
|
*
|
|
91
|
-
* When `
|
|
92
|
-
* the offline
|
|
91
|
+
* When `descriptors` carries an encryption descriptor for a private collection (from
|
|
92
|
+
* the offline descriptor cache), that collection's cipher is built epoch-aware so
|
|
93
93
|
* a multi-recipient envelope decrypts before any live description read; a
|
|
94
|
-
* collection with no cached
|
|
94
|
+
* collection with no cached descriptor keeps the single-key behavior.
|
|
95
95
|
*
|
|
96
96
|
* @param options {object}
|
|
97
97
|
* @param options.keyAgreementKey {IKeyAgreementKey} the app's identity KAK
|
|
@@ -104,22 +104,22 @@ export class LocalStore {
|
|
|
104
104
|
* (read-only, wallet-owned) registry. Nothing is opened for these -- they
|
|
105
105
|
* have no local replica -- but they are validated against the app-owned
|
|
106
106
|
* registry here, before any replica exists
|
|
107
|
-
* @param [options.
|
|
108
|
-
* encryption
|
|
107
|
+
* @param [options.descriptors] {Record<string, CollectionEncryption>} cached
|
|
108
|
+
* encryption descriptors keyed by WAS collection id (from the offline cache)
|
|
109
109
|
* @param [options.storage] {RxStorage<unknown, unknown>} defaults to
|
|
110
110
|
* Dexie/IndexedDB; injectable for tests
|
|
111
111
|
* @param [options.dbName] {string} defaults to {@link DEFAULT_DB_NAME}
|
|
112
112
|
* @returns {Promise<LocalStore>}
|
|
113
113
|
*/
|
|
114
|
-
static async init({ keyAgreementKey, keyResolver, collections, sharedCollections,
|
|
114
|
+
static async init({ keyAgreementKey, keyResolver, collections, sharedCollections, descriptors = {}, storage, dbName = DEFAULT_DB_NAME }) {
|
|
115
115
|
validateCollections(collections);
|
|
116
116
|
validateSharedCollections({
|
|
117
117
|
collections,
|
|
118
118
|
...(sharedCollections && { sharedCollections })
|
|
119
119
|
});
|
|
120
120
|
const ciphers = {};
|
|
121
|
-
// The
|
|
122
|
-
const
|
|
121
|
+
// The descriptor each private cipher was built from, keyed by logical key.
|
|
122
|
+
const builtDescriptors = {};
|
|
123
123
|
for (const { key, id, visibility } of collections) {
|
|
124
124
|
// A public collection is stored plaintext: no key derivation, no EDV
|
|
125
125
|
// cipher -- just the pass-through codec behind the same seam.
|
|
@@ -127,14 +127,14 @@ export class LocalStore {
|
|
|
127
127
|
ciphers[key] = createPlaintextDocCodec({ collectionId: id });
|
|
128
128
|
continue;
|
|
129
129
|
}
|
|
130
|
-
const encryption =
|
|
130
|
+
const encryption = descriptors[id];
|
|
131
131
|
ciphers[key] = await createDocCipher({
|
|
132
132
|
keyAgreementKey,
|
|
133
133
|
keyResolver,
|
|
134
134
|
collectionId: id,
|
|
135
135
|
...(encryption && { encryption })
|
|
136
136
|
});
|
|
137
|
-
|
|
137
|
+
builtDescriptors[key] = encryption;
|
|
138
138
|
}
|
|
139
139
|
const db = await createRxDatabase({
|
|
140
140
|
name: dbName,
|
|
@@ -159,7 +159,7 @@ export class LocalStore {
|
|
|
159
159
|
{
|
|
160
160
|
schema: syncedDocSchema(),
|
|
161
161
|
// Reads the CURRENT cipher for this key at decrypt time (not a
|
|
162
|
-
// captured reference), so a `rebuildCipher` after a
|
|
162
|
+
// captured reference), so a `rebuildCipher` after a descriptor change
|
|
163
163
|
// takes effect here too. `ciphers` is the same object the instance
|
|
164
164
|
// holds as `#ciphers`, so the swap is visible.
|
|
165
165
|
conflictHandler: makeLwwConflictHandler(envelope => {
|
|
@@ -180,7 +180,7 @@ export class LocalStore {
|
|
|
180
180
|
configs: Object.fromEntries(collections.map(entry => [entry.key, entry])),
|
|
181
181
|
keyAgreementKey,
|
|
182
182
|
keyResolver,
|
|
183
|
-
|
|
183
|
+
descriptors: builtDescriptors
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
#collection(key) {
|
|
@@ -213,10 +213,10 @@ export class LocalStore {
|
|
|
213
213
|
return cipher;
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
|
-
* Installs the epoch-
|
|
217
|
-
* that collection's fresh encryption
|
|
216
|
+
* Installs the epoch-descriptor refresher: given a WAS collection id, it fetches
|
|
217
|
+
* that collection's fresh encryption descriptor (a live description read). Called
|
|
218
218
|
* once a remote store exists; a decrypt that meets an unknown key epoch uses
|
|
219
|
-
* it to re-read the
|
|
219
|
+
* it to re-read the descriptor and rebuild the cipher exactly once.
|
|
220
220
|
*
|
|
221
221
|
* @param refresher {(collectionId: string) => Promise<CollectionEncryption | undefined>}
|
|
222
222
|
* @returns {void}
|
|
@@ -226,10 +226,10 @@ export class LocalStore {
|
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* Decrypts an at-rest envelope through the collection's cipher, with a
|
|
229
|
-
* one-shot recovery from a stale epoch
|
|
229
|
+
* one-shot recovery from a stale epoch descriptor: when the cipher throws
|
|
230
230
|
* {@link UnknownEpochError} (an envelope written under an epoch this device has
|
|
231
231
|
* not seen -- a rekey on another device / a wallet revoke-rotation) and a
|
|
232
|
-
* refresher is installed, re-read the
|
|
232
|
+
* refresher is installed, re-read the descriptor, rebuild the cipher, and retry
|
|
233
233
|
* the decrypt once. A second failure propagates rather than looping.
|
|
234
234
|
*/
|
|
235
235
|
async #decryptWithRefresh(key, envelope) {
|
|
@@ -251,14 +251,14 @@ export class LocalStore {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
/**
|
|
254
|
-
* Rebuilds one private collection's cipher from a new encryption
|
|
254
|
+
* Rebuilds one private collection's cipher from a new encryption descriptor, on
|
|
255
255
|
* the same identity KAK the store was opened with. A public (plaintext)
|
|
256
256
|
* collection has no EDV cipher and is a no-op. The new cipher replaces the
|
|
257
257
|
* held one in place, so the conflict handler and every read path pick it up.
|
|
258
258
|
*
|
|
259
259
|
* @param options {object}
|
|
260
260
|
* @param options.key {string} the collection logical key
|
|
261
|
-
* @param options.encryption {CollectionEncryption} the new
|
|
261
|
+
* @param options.encryption {CollectionEncryption} the new descriptor
|
|
262
262
|
* @returns {Promise<void>}
|
|
263
263
|
*/
|
|
264
264
|
async rebuildCipher({ key, encryption }) {
|
|
@@ -272,21 +272,21 @@ export class LocalStore {
|
|
|
272
272
|
collectionId: config.id,
|
|
273
273
|
encryption
|
|
274
274
|
});
|
|
275
|
-
this.#
|
|
275
|
+
this.#descriptors[key] = encryption;
|
|
276
276
|
}
|
|
277
277
|
/**
|
|
278
|
-
* Applies a freshly fetched remote encryption
|
|
279
|
-
* rebuilds that collection's cipher when the
|
|
278
|
+
* Applies a freshly fetched remote encryption descriptor (by WAS collection id):
|
|
279
|
+
* rebuilds that collection's cipher when the descriptor's current epoch differs
|
|
280
280
|
* from the one the current cipher was built from (a wallet-side rotation, or
|
|
281
281
|
* first-ever epochs), so subsequent writes stamp the current epoch. Returns
|
|
282
282
|
* whether a rebuild happened. Unknown / public collections are ignored.
|
|
283
283
|
*
|
|
284
284
|
* @param options {object}
|
|
285
285
|
* @param options.collectionId {string} the WAS collection id
|
|
286
|
-
* @param options.encryption {CollectionEncryption} the fetched
|
|
286
|
+
* @param options.encryption {CollectionEncryption} the fetched descriptor
|
|
287
287
|
* @returns {Promise<boolean>}
|
|
288
288
|
*/
|
|
289
|
-
async
|
|
289
|
+
async applyRemoteDescriptor({ collectionId, encryption }) {
|
|
290
290
|
const entry = Object.entries(this.#configs).find(([, config]) => config.id === collectionId);
|
|
291
291
|
if (!entry) {
|
|
292
292
|
return false;
|
|
@@ -295,7 +295,7 @@ export class LocalStore {
|
|
|
295
295
|
if (config.visibility === 'public') {
|
|
296
296
|
return false;
|
|
297
297
|
}
|
|
298
|
-
if (
|
|
298
|
+
if (descriptorsEqual(this.#descriptors[key], encryption)) {
|
|
299
299
|
return false;
|
|
300
300
|
}
|
|
301
301
|
await this.rebuildCipher({ key, encryption });
|
|
@@ -619,17 +619,17 @@ export class LocalStore {
|
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
621
|
/**
|
|
622
|
-
* Whether two encryption
|
|
622
|
+
* Whether two encryption descriptors select the same writing epoch: same
|
|
623
623
|
* `currentEpoch` and the same ordered epoch id list. That is all a cipher rebuild
|
|
624
624
|
* turns on -- rotation only appends epochs and moves `currentEpoch` -- so a
|
|
625
|
-
*
|
|
626
|
-
* built) never equals a real
|
|
625
|
+
* descriptor that matches on both needs no rebuild. A cached `undefined` (no descriptor
|
|
626
|
+
* built) never equals a real descriptor, so first-ever epochs always rebuild.
|
|
627
627
|
*
|
|
628
628
|
* @param current {CollectionEncryption | undefined}
|
|
629
629
|
* @param next {CollectionEncryption}
|
|
630
630
|
* @returns {boolean}
|
|
631
631
|
*/
|
|
632
|
-
function
|
|
632
|
+
function descriptorsEqual(current, next) {
|
|
633
633
|
if (current === undefined) {
|
|
634
634
|
return false;
|
|
635
635
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localStore.js","sourceRoot":"","sources":["../../src/storage/localStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAIjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EAG1B,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EACL,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EAIlB,MAAM,kBAAkB,CAAA;AAWzB;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAClC,MAAM,EACN,aAAa,EAId;IACC,IAAI,IAAI,GAAG,UAAU,CAAA;IACrB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QAC1D,IAAI,IAAI,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,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IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAC1D,IAAI,UAAU,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;QACzC,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;AAC/D,CAAC"}
|
|
@@ -32,11 +32,11 @@ export declare class SharedCollectionReader {
|
|
|
32
32
|
readonly collectionId: string;
|
|
33
33
|
private constructor();
|
|
34
34
|
/**
|
|
35
|
-
* Opens a reader over one shared collection: reads its `encryption`
|
|
35
|
+
* Opens a reader over one shared collection: reads its `encryption` descriptor
|
|
36
36
|
* through the delegated zcap and builds the epoch-aware cipher from it.
|
|
37
37
|
*
|
|
38
38
|
* Throws {@link SharedCollectionUnavailableError} when the collection carries
|
|
39
|
-
* no
|
|
39
|
+
* no descriptor or a descriptor with no key epochs (it is not multi-recipient, so this
|
|
40
40
|
* app cannot be a recipient of it), and likewise when the cipher cannot unwrap
|
|
41
41
|
* any epoch (this app is not, or is no longer, in the roster).
|
|
42
42
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* SharedCollectionReader: a READ-ONLY view over one wallet-owned encrypted
|
|
6
6
|
* collection the wallet has shared with this app (the
|
|
7
|
-
* `
|
|
7
|
+
* `https://w3id.org/byoe#shared-collection` grant). It is the app-side other half of the
|
|
8
8
|
* wallet's share flow, and it is read-only BY CONSTRUCTION -- there is no write
|
|
9
9
|
* verb on this class, the collection is never replicated into RxDB, and the
|
|
10
10
|
* sync bootstrap never PUTs a description onto it.
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* verbatim, so reads must be RAW: the handle is opened with the
|
|
24
24
|
* `encryption: 'plaintext'` override (the `WasClient`'s own encryption provider
|
|
25
25
|
* is a deliberate no-op keystore) and the envelope is decrypted locally with a
|
|
26
|
-
* cipher built from the collection's `encryption`
|
|
26
|
+
* cipher built from the collection's `encryption` descriptor.
|
|
27
27
|
*
|
|
28
28
|
* The honest ceiling, the same one the wallet's consent screen states:
|
|
29
29
|
*
|
|
@@ -61,8 +61,8 @@ export class SharedCollectionReader {
|
|
|
61
61
|
#keyAgreementKey;
|
|
62
62
|
#keyResolver;
|
|
63
63
|
#cipher;
|
|
64
|
-
// Whether an unknown-epoch
|
|
65
|
-
// epoch rotation emits no change-feed entry, so a stale
|
|
64
|
+
// Whether an unknown-epoch descriptor refresh has already run for this reader. An
|
|
65
|
+
// epoch rotation emits no change-feed entry, so a stale descriptor is the
|
|
66
66
|
// expected failure mode; one refresh per reader is enough to recover, and the
|
|
67
67
|
// cap keeps a genuinely undecryptable envelope from looping.
|
|
68
68
|
#refreshed = false;
|
|
@@ -79,11 +79,11 @@ export class SharedCollectionReader {
|
|
|
79
79
|
this.#pageSize = pageSize;
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* Opens a reader over one shared collection: reads its `encryption`
|
|
82
|
+
* Opens a reader over one shared collection: reads its `encryption` descriptor
|
|
83
83
|
* through the delegated zcap and builds the epoch-aware cipher from it.
|
|
84
84
|
*
|
|
85
85
|
* Throws {@link SharedCollectionUnavailableError} when the collection carries
|
|
86
|
-
* no
|
|
86
|
+
* no descriptor or a descriptor with no key epochs (it is not multi-recipient, so this
|
|
87
87
|
* app cannot be a recipient of it), and likewise when the cipher cannot unwrap
|
|
88
88
|
* any epoch (this app is not, or is no longer, in the roster).
|
|
89
89
|
*
|
|
@@ -241,9 +241,9 @@ export class SharedCollectionReader {
|
|
|
241
241
|
/**
|
|
242
242
|
* Decrypts one fetched body, tolerating the two expected non-results: a body
|
|
243
243
|
* that is not an EDV envelope at all, and a pre-share single-recipient
|
|
244
|
-
* envelope. An {@link UnknownEpochError} drives one
|
|
244
|
+
* envelope. An {@link UnknownEpochError} drives one descriptor re-read + cipher
|
|
245
245
|
* rebuild + retry (an epoch rotation emits no change-feed entry, so a stale
|
|
246
|
-
*
|
|
246
|
+
* descriptor is the expected failure mode).
|
|
247
247
|
*/
|
|
248
248
|
async #decryptBody({ id, body }) {
|
|
249
249
|
if (body === null || body === undefined) {
|
|
@@ -272,7 +272,7 @@ export class SharedCollectionReader {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
/**
|
|
275
|
-
* Re-reads the collection's `encryption`
|
|
275
|
+
* Re-reads the collection's `encryption` descriptor and rebuilds the cipher from
|
|
276
276
|
* it. Used once per reader on an unknown epoch.
|
|
277
277
|
*/
|
|
278
278
|
async #rebuildCipher() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedCollectionReader.js","sourceRoot":"","sources":["../../src/storage/sharedCollectionReader.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAMzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,mBAAmB,EAGpB,MAAM,kBAAkB,CAAA;AAGzB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAA;AAmB3C;;;;;GAKG;AACH,MAAM,OAAO,gCAAiC,SAAQ,KAAK;IACzD,YAAY,OAAe,EAAE,OAA6B;QACxD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,kCAAkC,CAAA;IAChD,CAAC;CACF;AAED,MAAM,OAAO,sBAAsB;IACxB,YAAY,CAAQ;IACpB,YAAY,CAAgB;IAC5B,gBAAgB,CAAkB;IAClC,YAAY,CAAc;IACnC,OAAO,CAAW;IAClB,
|
|
1
|
+
{"version":3,"file":"sharedCollectionReader.js","source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AAI,CAAC,OAAO,GAAG,MAAM,iBAAiB,CAAC;YACrC,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,eAAe,EAAE,IAAI,CAAC,gBAAgB;YACtC,WAAW,EAAE,IAAI,CAAC,YAAY;YAC9B,UAAU;SACX,CAAC,CAAA;IACJ,CAAC;IAED;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,EAAE,EAAE,GAAG,EAAgC;QAC1D,OAAO,CAAC,IAAI,CACV,sBAAsB,EAAE,yBAAyB;YAC/C,IAAI,IAAI,CAAC,YAAY,iDAAiD;YACtE,kEAAkE;YAClE,8DAA8D;YAC9D,kBAAkB,YAAY,CAAC,GAAG,CAAC,EAAE,CACxC,CAAA;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,KAAK,UAAU,iBAAiB,CAAC,EAC/B,YAAY,EACZ,eAAe,EACf,WAAW,EACX,UAAU,EAMX;IACC,IAAI,CAAC,UAAU,EAAE,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1D,MAAM,IAAI,gCAAgC,CACxC,sBAAsB,YAAY,uCAAuC;YACvE,uEAAuE;YACvE,yCAAyC,CAC5C,CAAA;IACH,CAAC;IACD,IAAI,CAAC;QACH,OAAO,MAAM,eAAe,CAAC;YAC3B,eAAe;YACf,WAAW;YACX,YAAY;YACZ,UAAU;SACX,CAAC,CAAA;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,gCAAgC,CACxC,kCAAkC,YAAY,uBAAuB;YACnE,mEAAmE;YACnE,oEAAoE;YACpE,4BAA4B,EAC9B,EAAE,KAAK,EAAE,GAAG,EAAE,CACf,CAAA;IACH,CAAC;AACH,CAAC"}
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* the seed-derived controller the grants were delegated to);
|
|
13
13
|
* - per-collection capability routing, so each sync request invokes the exact
|
|
14
14
|
* collection grant;
|
|
15
|
-
* - a best-effort encryption-
|
|
15
|
+
* - a best-effort encryption-descriptor PUT (whether a delegated collection-scoped
|
|
16
16
|
* RW zcap authorizes writing the collection description). It is non-fatal
|
|
17
17
|
* either way -- envelopes replicate into an unmarked (plaintext) collection
|
|
18
18
|
* just the same. A PUBLIC collection is never marked: public implies
|
|
19
|
-
* plaintext, so the
|
|
19
|
+
* plaintext, so the descriptor PUT is skipped outright;
|
|
20
20
|
* - the sibling best-effort `indexes` declaration PUT for public collections
|
|
21
21
|
* that declare equality-indexed attributes, plus the equality query verb
|
|
22
22
|
* itself ({@link WasRemoteStore.queryCollectionByEquality}): the canonical
|
|
@@ -30,9 +30,9 @@ import type { CollectionEncryption } from '@interop/was-client';
|
|
|
30
30
|
import type { WasCollectionConfig } from '../config.js';
|
|
31
31
|
import type { ParsedGrants } from '../grants.js';
|
|
32
32
|
/**
|
|
33
|
-
* The outcome of a best-effort encryption-
|
|
33
|
+
* The outcome of a best-effort encryption-descriptor PUT, for diagnostics.
|
|
34
34
|
*/
|
|
35
|
-
export interface
|
|
35
|
+
export interface DeclarationResult {
|
|
36
36
|
collectionId: string;
|
|
37
37
|
ok: boolean;
|
|
38
38
|
status?: number;
|
|
@@ -40,7 +40,7 @@ export interface MarkerResult {
|
|
|
40
40
|
/**
|
|
41
41
|
* True when no PUT was attempted -- the collection is public (plaintext), or
|
|
42
42
|
* it already carries an `encryption` block (e.g. an epoch roster the wallet
|
|
43
|
-
* provisioned at consent time, which a bare-
|
|
43
|
+
* provisioned at consent time, which a bare-descriptor PUT must never clobber).
|
|
44
44
|
* Reported as `ok` since the goal state holds either way.
|
|
45
45
|
*/
|
|
46
46
|
skipped?: boolean;
|
|
@@ -95,11 +95,11 @@ export declare class WasRemoteStore {
|
|
|
95
95
|
*/
|
|
96
96
|
collectionCapability(collectionId: string): IZcap | undefined;
|
|
97
97
|
/**
|
|
98
|
-
* Reads one collection's `encryption`
|
|
98
|
+
* Reads one collection's `encryption` descriptor from its Collection Description,
|
|
99
99
|
* invoked with that collection's delegated zcap. Returns the
|
|
100
|
-
* {@link CollectionEncryption} block (a multi-recipient
|
|
101
|
-
* epochs) or `undefined` when the collection carries no
|
|
102
|
-
* the
|
|
100
|
+
* {@link CollectionEncryption} block (a multi-recipient descriptor carries key
|
|
101
|
+
* epochs) or `undefined` when the collection carries no descriptor. Non-fatal like
|
|
102
|
+
* the descriptor PUTs: returns `undefined` rather than throwing when no capability
|
|
103
103
|
* covers the collection or the read fails (offline, unauthorized), so a caller
|
|
104
104
|
* can fall back to its cached copy.
|
|
105
105
|
*
|
|
@@ -108,7 +108,7 @@ export declare class WasRemoteStore {
|
|
|
108
108
|
*/
|
|
109
109
|
readCollectionEncryption(collectionId: string): Promise<CollectionEncryption | undefined>;
|
|
110
110
|
/**
|
|
111
|
-
* Best-effort declaration of the `{ encryption: { scheme: 'edv' } }`
|
|
111
|
+
* Best-effort declaration of the `{ encryption: { scheme: 'edv' } }` descriptor on
|
|
112
112
|
* one collection, invoked with that collection's delegated RW zcap. Non-fatal:
|
|
113
113
|
* returns the outcome rather than throwing, so a server that does not authorize
|
|
114
114
|
* a delegated description write leaves replication untouched (the collection
|
|
@@ -117,29 +117,29 @@ export declare class WasRemoteStore {
|
|
|
117
117
|
* and reported as `ok` + `skipped`.
|
|
118
118
|
*
|
|
119
119
|
* A collection that ALREADY carries an `encryption` block is also skipped: the
|
|
120
|
-
* wallet provisions a multi-recipient epoch roster on the
|
|
121
|
-
* time, and overwriting it with the bare `{ scheme: 'edv' }`
|
|
120
|
+
* wallet provisions a multi-recipient epoch roster on the descriptor at consent
|
|
121
|
+
* time, and overwriting it with the bare `{ scheme: 'edv' }` descriptor would
|
|
122
122
|
* destroy that roster. The description is read first, so this method is a
|
|
123
123
|
* no-op fallback for servers/wallets that did not provision the roster.
|
|
124
124
|
*
|
|
125
125
|
* @param collectionId {string} the WAS collection id
|
|
126
|
-
* @returns {Promise<
|
|
126
|
+
* @returns {Promise<DeclarationResult>}
|
|
127
127
|
*/
|
|
128
|
-
markCollectionEncrypted(collectionId: string): Promise<
|
|
128
|
+
markCollectionEncrypted(collectionId: string): Promise<DeclarationResult>;
|
|
129
129
|
/**
|
|
130
130
|
* Best-effort declaration of a public collection's equality-indexed
|
|
131
131
|
* attributes (`{ indexes: [...] }`) on its collection description, invoked
|
|
132
132
|
* with that collection's delegated RW zcap. The server rejects
|
|
133
133
|
* `filter[attr]=value` queries on undeclared attributes fail-closed, so a
|
|
134
134
|
* public collection that wants `store.query()` must announce its `indexes`
|
|
135
|
-
* here. Non-fatal like the encryption
|
|
135
|
+
* here. Non-fatal like the encryption descriptor: returns the outcome rather
|
|
136
136
|
* than throwing. Skipped (reported `ok` + `skipped`) for a private
|
|
137
137
|
* collection or one that declares no indexes.
|
|
138
138
|
*
|
|
139
139
|
* @param collectionId {string} the WAS collection id
|
|
140
|
-
* @returns {Promise<
|
|
140
|
+
* @returns {Promise<DeclarationResult>}
|
|
141
141
|
*/
|
|
142
|
-
declareCollectionIndexes(collectionId: string): Promise<
|
|
142
|
+
declareCollectionIndexes(collectionId: string): Promise<DeclarationResult>;
|
|
143
143
|
/**
|
|
144
144
|
* Runs one equality query against a public collection: the canonical GET
|
|
145
145
|
* `filter[attr]=value` form of the server's `equality` profile, invoked with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasRemoteStore.d.ts","sourceRoot":"","sources":["../../src/storage/wasRemoteStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAG/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CA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