@interop/was-react 0.10.0 → 0.11.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/dist/dev/provisionDevGrants.d.ts +13 -5
- package/dist/dev/provisionDevGrants.d.ts.map +1 -1
- package/dist/dev/provisionDevGrants.js +55 -23
- package/dist/dev/provisionDevGrants.js.map +1 -1
- package/dist/identity/documentLoader.d.ts.map +1 -1
- package/dist/identity/documentLoader.js +9 -2
- package/dist/identity/documentLoader.js.map +1 -1
- package/dist/identity/seedStore.d.ts +15 -4
- package/dist/identity/seedStore.d.ts.map +1 -1
- package/dist/identity/seedStore.js +17 -5
- package/dist/identity/seedStore.js.map +1 -1
- package/dist/session/authStore.d.ts.map +1 -1
- package/dist/session/authStore.js +147 -35
- package/dist/session/authStore.js.map +1 -1
- package/dist/storage/localStore.d.ts +12 -7
- package/dist/storage/localStore.d.ts.map +1 -1
- package/dist/storage/localStore.js +35 -20
- package/dist/storage/localStore.js.map +1 -1
- package/dist/storage/sharedCollectionReader.d.ts +6 -6
- package/dist/storage/sharedCollectionReader.d.ts.map +1 -1
- package/dist/storage/sharedCollectionReader.js +15 -13
- package/dist/storage/sharedCollectionReader.js.map +1 -1
- package/dist/storage/wasSync.d.ts +22 -1
- package/dist/storage/wasSync.d.ts.map +1 -1
- package/dist/storage/wasSync.js +45 -1
- package/dist/storage/wasSync.js.map +1 -1
- package/dist/sync/docCipher.d.ts +44 -17
- package/dist/sync/docCipher.d.ts.map +1 -1
- package/dist/sync/docCipher.js +60 -13
- package/dist/sync/docCipher.js.map +1 -1
- package/dist/sync/index.d.ts +1 -1
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +1 -1
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/syncedDocSchema.js +1 -1
- package/dist/sync/syncedDocSchema.js.map +1 -1
- package/dist/sync/types.d.ts +2 -2
- package/dist/sync/wasSyncPort.js +1 -1
- package/dist/sync/wasSyncPort.js.map +1 -1
- package/package.json +7 -7
|
@@ -34,7 +34,8 @@ export interface ProvisionDevGrantsResult {
|
|
|
34
34
|
provisionerDid: string;
|
|
35
35
|
/**
|
|
36
36
|
* Present only when `probe` was requested: the result of PUTting the
|
|
37
|
-
*
|
|
37
|
+
* collection description (read first, written back verbatim) with the app's
|
|
38
|
+
* delegated RW zcap.
|
|
38
39
|
*/
|
|
39
40
|
probe?: {
|
|
40
41
|
authorized: boolean;
|
|
@@ -50,8 +51,11 @@ export interface ProvisionDevGrantsResult {
|
|
|
50
51
|
* @param options.serverUrl {string} base URL of a running was-teaching-server
|
|
51
52
|
* @param options.seed {Uint8Array} the app (relying party) master seed; the
|
|
52
53
|
* app DID the grants are delegated to is derived from it
|
|
53
|
-
* @param options.collections {string
|
|
54
|
-
* grant (
|
|
54
|
+
* @param options.collections {Array<string | object>} the WAS collections to
|
|
55
|
+
* create and grant: a bare id string (private by default) or
|
|
56
|
+
* `{ id, visibility }`. A private collection is declared `edv` and gets its
|
|
57
|
+
* epoch[0] roster (sole recipient: the app's identity key-agreement key); a
|
|
58
|
+
* public one stays plaintext
|
|
55
59
|
* @param [options.spaceName] {string} human-readable Space name (defaults to
|
|
56
60
|
* `'Dev Space'`)
|
|
57
61
|
* @param [options.outFile] {string} when given, the `{ grants }` JSON is
|
|
@@ -63,7 +67,8 @@ export interface ProvisionDevGrantsResult {
|
|
|
63
67
|
* @param [options.actions] {ActionInput[]} the RW action set delegated per
|
|
64
68
|
* collection (defaults to the auth layer's `RW_ACTIONS`)
|
|
65
69
|
* @param [options.probe] {boolean} when true, probe whether the delegated RW
|
|
66
|
-
* zcap authorizes a PUT of the
|
|
70
|
+
* zcap authorizes a PUT of the collection description (read first and written
|
|
71
|
+
* back verbatim, so an installed epoch roster is never clobbered)
|
|
67
72
|
* @param [options.log] {(message: string) => void} progress sink (defaults to
|
|
68
73
|
* a no-op; the CLI passes `console.log`)
|
|
69
74
|
* @returns {Promise<ProvisionDevGrantsResult>}
|
|
@@ -71,7 +76,10 @@ export interface ProvisionDevGrantsResult {
|
|
|
71
76
|
export declare function provisionDevGrants({ serverUrl, seed, collections, spaceName, outFile, provisionerSeed, identityHandle, actions, probe, log }: {
|
|
72
77
|
serverUrl: string;
|
|
73
78
|
seed: Uint8Array;
|
|
74
|
-
collections: string
|
|
79
|
+
collections: Array<string | {
|
|
80
|
+
id: string;
|
|
81
|
+
visibility?: 'private' | 'public';
|
|
82
|
+
}>;
|
|
75
83
|
spaceName?: string;
|
|
76
84
|
outFile?: string;
|
|
77
85
|
provisionerSeed?: Uint8Array;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provisionDevGrants.d.ts","sourceRoot":"","sources":["../../src/dev/provisionDevGrants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"provisionDevGrants.d.ts","sourceRoot":"","sources":["../../src/dev/provisionDevGrants.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAQlE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,UAIrC,CAAA;AAEF;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE;QACN,UAAU,EAAE,OAAO,CAAA;QACnB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,IAAI,CAAC,EAAE,OAAO,CAAA;KACf,CAAA;CACF;AA0BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,SAAS,EACT,IAAI,EACJ,WAAW,EACX,SAAuB,EACvB,OAAO,EACP,eAA0C,EAC1C,cAAc,EAGd,OAAqC,EACrC,KAAa,EACb,GAAc,EACf,EAAE;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,WAAW,EAAE,KAAK,CAAC,MAAM,GAAG;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;KAAE,CAAC,CAAA;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,UAAU,CAAA;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAA;IACvB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAiIpC"}
|
|
@@ -6,22 +6,25 @@
|
|
|
6
6
|
* this:
|
|
7
7
|
*
|
|
8
8
|
* 1. derives a throwaway "provisioner" identity (stands in for the wallet that
|
|
9
|
-
* owns the Space) and the app's own
|
|
9
|
+
* owns the Space) and the app's own identity from the supplied seed;
|
|
10
10
|
* 2. creates a Space (owned by the provisioner) and the requested collections,
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* mirroring what a wallet does when it provisions RP-requested collections:
|
|
12
|
+
* a PRIVATE collection is declared `edv` and gets its epoch[0] roster
|
|
13
|
+
* installed (`ensureFirstEpoch`) with the app's identity key-agreement key
|
|
14
|
+
* as the sole recipient -- epoch-from-birth, no plaintext interlude; a
|
|
15
|
+
* PUBLIC collection stays plaintext with no descriptor;
|
|
13
16
|
* 3. delegates a per-collection read/write zcap to the app's controller DID;
|
|
14
17
|
* 4. returns the signed grants and (optionally) writes them to a JSON file the
|
|
15
18
|
* app loads in dev-sync mode;
|
|
16
19
|
* 5. optionally probes the open question: does the delegated, collection-scoped
|
|
17
|
-
* RW zcap authorize an RP-side PUT of the collection description
|
|
18
|
-
* { encryption: { scheme: 'edv' } } descriptor?
|
|
20
|
+
* RW zcap authorize an RP-side PUT of the collection description?
|
|
19
21
|
*
|
|
20
22
|
* Node only (uses `fs`); consumed through the package `./dev` subpath.
|
|
21
23
|
*/
|
|
22
24
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
23
25
|
import { dirname } from 'node:path';
|
|
24
26
|
import { WasClient } from '@interop/was-client';
|
|
27
|
+
import { ensureFirstEpoch, ownerRecipient } from '@interop/was-client/edv';
|
|
25
28
|
import { CapabilityAgent } from '@interop/webkms-client';
|
|
26
29
|
import { agentsFromKeyAgent } from '@interop/wallet-core/identity';
|
|
27
30
|
import { deriveIdentity } from '../identity/agents.js';
|
|
@@ -63,8 +66,11 @@ async function provisionerClient({ serverUrl, seed }) {
|
|
|
63
66
|
* @param options.serverUrl {string} base URL of a running was-teaching-server
|
|
64
67
|
* @param options.seed {Uint8Array} the app (relying party) master seed; the
|
|
65
68
|
* app DID the grants are delegated to is derived from it
|
|
66
|
-
* @param options.collections {string
|
|
67
|
-
* grant (
|
|
69
|
+
* @param options.collections {Array<string | object>} the WAS collections to
|
|
70
|
+
* create and grant: a bare id string (private by default) or
|
|
71
|
+
* `{ id, visibility }`. A private collection is declared `edv` and gets its
|
|
72
|
+
* epoch[0] roster (sole recipient: the app's identity key-agreement key); a
|
|
73
|
+
* public one stays plaintext
|
|
68
74
|
* @param [options.spaceName] {string} human-readable Space name (defaults to
|
|
69
75
|
* `'Dev Space'`)
|
|
70
76
|
* @param [options.outFile] {string} when given, the `{ grants }` JSON is
|
|
@@ -76,7 +82,8 @@ async function provisionerClient({ serverUrl, seed }) {
|
|
|
76
82
|
* @param [options.actions] {ActionInput[]} the RW action set delegated per
|
|
77
83
|
* collection (defaults to the auth layer's `RW_ACTIONS`)
|
|
78
84
|
* @param [options.probe] {boolean} when true, probe whether the delegated RW
|
|
79
|
-
* zcap authorizes a PUT of the
|
|
85
|
+
* zcap authorizes a PUT of the collection description (read first and written
|
|
86
|
+
* back verbatim, so an installed epoch roster is never clobbered)
|
|
80
87
|
* @param [options.log] {(message: string) => void} progress sink (defaults to
|
|
81
88
|
* a no-op; the CLI passes `console.log`)
|
|
82
89
|
* @returns {Promise<ProvisionDevGrantsResult>}
|
|
@@ -85,7 +92,7 @@ export async function provisionDevGrants({ serverUrl, seed, collections, spaceNa
|
|
|
85
92
|
// The server accepts HEAD even though storage-core's ActionInput union omits
|
|
86
93
|
// it, hence the assertion.
|
|
87
94
|
actions = RW_ACTIONS, probe = false, log = () => { } }) {
|
|
88
|
-
const [{ controllerDid: appDid, zcapClient: appZcapClient }, { was: provisioner, did: provisionerDid }] = await Promise.all([
|
|
95
|
+
const [{ controllerDid: appDid, zcapClient: appZcapClient, keyAgreementKey }, { was: provisioner, did: provisionerDid }] = await Promise.all([
|
|
89
96
|
deriveIdentity({ seed, identityHandle }),
|
|
90
97
|
provisionerClient({ serverUrl, seed: provisionerSeed })
|
|
91
98
|
]);
|
|
@@ -113,17 +120,32 @@ actions = RW_ACTIONS, probe = false, log = () => { } }) {
|
|
|
113
120
|
};
|
|
114
121
|
// `Promise.all` preserves input order, so `grants[i]` still corresponds to
|
|
115
122
|
// `collections[i]` (the probe below relies on that for `[0]`).
|
|
116
|
-
const grants = await Promise.all(collections.map(async (
|
|
117
|
-
|
|
118
|
-
// provisioning
|
|
119
|
-
|
|
123
|
+
const grants = await Promise.all(collections.map(async (entry) => {
|
|
124
|
+
const { id, visibility = 'private' } = typeof entry === 'string' ? { id: entry } : entry;
|
|
125
|
+
// A private collection mirrors wallet provisioning: declared `edv` at
|
|
126
|
+
// creation, epoch[0] installed with the app's identity key-agreement
|
|
127
|
+
// key as the sole recipient (the roster entry a wallet would write for
|
|
128
|
+
// an app-owned collection). A public collection stays plaintext.
|
|
129
|
+
const collection = await space.createCollection({
|
|
130
|
+
id,
|
|
131
|
+
name: id,
|
|
132
|
+
...(visibility === 'private' && {
|
|
133
|
+
encryption: { scheme: 'edv' }
|
|
134
|
+
})
|
|
135
|
+
});
|
|
136
|
+
if (visibility === 'private') {
|
|
137
|
+
await ensureFirstEpoch({
|
|
138
|
+
collection,
|
|
139
|
+
recipients: [ownerRecipient({ keyAgreementKey })]
|
|
140
|
+
});
|
|
141
|
+
}
|
|
120
142
|
const zcap = await provisioner.grant({
|
|
121
143
|
to: appDid,
|
|
122
144
|
actions,
|
|
123
145
|
target: `${spaceUrl}/${id}`,
|
|
124
146
|
capability: spaceRoot
|
|
125
147
|
});
|
|
126
|
-
log(` collection "${id}": created + delegated RW to app`);
|
|
148
|
+
log(` collection "${id}": created (${visibility}) + delegated RW to app`);
|
|
127
149
|
return zcap;
|
|
128
150
|
}));
|
|
129
151
|
if (outFile !== undefined) {
|
|
@@ -141,22 +163,32 @@ actions = RW_ACTIONS, probe = false, log = () => { } }) {
|
|
|
141
163
|
if (!probe) {
|
|
142
164
|
return result;
|
|
143
165
|
}
|
|
144
|
-
// ---
|
|
166
|
+
// --- Description-write probe --------------------------------------------------
|
|
145
167
|
// Using the app's OWN delegated RW zcap (not the provisioner root key),
|
|
146
|
-
// attempt to PUT the collection description
|
|
168
|
+
// attempt to PUT the collection description. The description is read first
|
|
169
|
+
// and written back verbatim: authorization is what is probed, and a blind
|
|
170
|
+
// descriptor PUT would try to clobber the installed epoch roster (which the
|
|
171
|
+
// server refuses -- epochs are append-only -- muddying the answer).
|
|
147
172
|
const appWas = new WasClient({ serverUrl, zcapClient: appZcapClient });
|
|
148
|
-
const
|
|
173
|
+
const firstEntry = collections[0];
|
|
174
|
+
const probeCollectionId = typeof firstEntry === 'string' ? firstEntry : firstEntry.id;
|
|
149
175
|
const probeCapability = grants[0];
|
|
150
|
-
|
|
176
|
+
const probePath = collectionPath({
|
|
177
|
+
spaceId: space.id,
|
|
178
|
+
collectionId: probeCollectionId
|
|
179
|
+
});
|
|
180
|
+
log(`\nDescription-write probe on "${probeCollectionId}" (delegated RW zcap):`);
|
|
151
181
|
try {
|
|
182
|
+
const current = await appWas.request({
|
|
183
|
+
capability: probeCapability,
|
|
184
|
+
path: probePath,
|
|
185
|
+
method: 'GET'
|
|
186
|
+
});
|
|
152
187
|
const response = await appWas.request({
|
|
153
188
|
capability: probeCapability,
|
|
154
|
-
path:
|
|
155
|
-
spaceId: space.id,
|
|
156
|
-
collectionId: probeCollectionId
|
|
157
|
-
}),
|
|
189
|
+
path: probePath,
|
|
158
190
|
method: 'PUT',
|
|
159
|
-
json: { id: probeCollectionId
|
|
191
|
+
json: (current.data ?? { id: probeCollectionId })
|
|
160
192
|
});
|
|
161
193
|
log(` AUTHORIZED -- server responded ${response.status}`);
|
|
162
194
|
result.probe = { authorized: true, status: response.status };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provisionDevGrants.js","sourceRoot":"","sources":["../../src/dev/provisionDevGrants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"provisionDevGrants.js","sourceRoot":"","sources":["../../src/dev/provisionDevGrants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAoB,MAAM,qBAAqB,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,UAA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AC,oCAAoC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;QAC1D,MAAM,CAAC,KAAK,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAA;IAC9D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAA;QAC/B,MAAM,IAAI,GAAI,GAA0B,CAAC,IAAI,CAAA;QAC7C,GAAG,CAAC,8BAA8B,MAAM,IAAI,KAAK,EAAE,CAAC,CAAA;QACpD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,GAAG,CAAC,kBAAkB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC/C,CAAC;QACD,MAAM,CAAC,KAAK,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;IAC1D,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentLoader.d.ts","sourceRoot":"","sources":["../../src/identity/documentLoader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"documentLoader.d.ts","sourceRoot":"","sources":["../../src/identity/documentLoader.ts"],"names":[],"mappings":"AAuBA;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACpD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAC,CAAA;AAqBF;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,cAAc,CAErD"}
|
|
@@ -16,15 +16,22 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { createDidWebvhDriver } from '@interop/did-method-webvh/driver';
|
|
18
18
|
import { createDefaultDidResolver, securityLoader } from '@interop/security-document-loader';
|
|
19
|
+
import { contexts as byoeContexts } from 'byoe-context';
|
|
19
20
|
const didResolver = createDefaultDidResolver();
|
|
20
21
|
// The webvh driver is resolution-only (`{ method, get, resolveDID }`) by
|
|
21
22
|
// design; did-io's DidMethodDriver type also demands the key-generation
|
|
22
23
|
// surface (generate, fromKeyPair, ...), which resolution never calls.
|
|
23
24
|
didResolver.use(createDidWebvhDriver());
|
|
24
|
-
const
|
|
25
|
+
const loader = securityLoader({
|
|
25
26
|
fetchRemoteContexts: true,
|
|
26
27
|
didResolver
|
|
27
|
-
})
|
|
28
|
+
});
|
|
29
|
+
// The BYOE App Connect context is registered here, not bundled in the security
|
|
30
|
+
// loader, so vocabulary additions ship with a `byoe-context` bump alone.
|
|
31
|
+
for (const [url, context] of byoeContexts) {
|
|
32
|
+
loader.addStatic(url, context);
|
|
33
|
+
}
|
|
34
|
+
const baseLoader = loader.build();
|
|
28
35
|
/**
|
|
29
36
|
* Builds the JSON-LD document loader handed to `@interop/vc` issuance and
|
|
30
37
|
* verifier-core verification.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentLoader.js","sourceRoot":"","sources":["../../src/identity/documentLoader.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,EACL,wBAAwB,EACxB,cAAc,EACf,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"documentLoader.js","sourceRoot":"","sources":["../../src/identity/documentLoader.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,EACL,wBAAwB,EACxB,cAAc,EACf,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,cAAc,CAAA;AAWvD,MAAM,WAAW,GAAG,wBAAwB,EAAE,CAAA;AAC9C,yEAAyE;AACzE,wEAAwE;AACxE,sEAAsE;AACtE,WAAW,CAAC,GAAG,CACb,oBAAoB,EAAsD,CAC3E,CAAA;AAED,MAAM,MAAM,GAAG,cAAc,CAAC;IAC5B,mBAAmB,EAAE,IAAI;IACzB,WAAW;CACZ,CAAC,CAAA;AACF,+EAA+E;AAC/E,yEAAyE;AACzE,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,YAAY,EAAE,CAAC;IAC1C,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;AAChC,CAAC;AACD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;AAEjC;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,UAA4B,CAAA;AACrC,CAAC"}
|
|
@@ -20,9 +20,10 @@ export interface SeedStore {
|
|
|
20
20
|
*/
|
|
21
21
|
loadRecord(): Promise<unknown | null>;
|
|
22
22
|
/**
|
|
23
|
-
* Persists the collection-encryption descriptor cache (keyed by
|
|
24
|
-
* id
|
|
25
|
-
*
|
|
23
|
+
* Persists the collection-encryption descriptor cache (descriptors keyed by
|
|
24
|
+
* WAS collection id, stamped with the controller DID they belong to), so an
|
|
25
|
+
* offline / hot-restore session can rebuild its epoch-aware ciphers without
|
|
26
|
+
* a live description read.
|
|
26
27
|
*/
|
|
27
28
|
saveDescriptors(descriptors: unknown): Promise<void>;
|
|
28
29
|
/**
|
|
@@ -53,6 +54,13 @@ export declare function createSeedStore({ dbName, idb }: {
|
|
|
53
54
|
* acquires through: per-collection get/put over the single stored blob, already
|
|
54
55
|
* scoped to one session's Space by the store it is bound to.
|
|
55
56
|
*
|
|
57
|
+
* The blob is stamped with the `controller` DID whose descriptors it holds, and
|
|
58
|
+
* a cache bound to a different controller reads it as empty (and overwrites the
|
|
59
|
+
* stamp on its first write). Descriptors name key-epoch rosters a specific
|
|
60
|
+
* identity is a recipient of, so a login under a different controller than the
|
|
61
|
+
* one that cached them must never trust them: a stale hit would build ciphers
|
|
62
|
+
* the new identity cannot unwrap.
|
|
63
|
+
*
|
|
56
64
|
* The blob is read-modify-written on every put. That is fine at this scale (an
|
|
57
65
|
* app registers a handful of collections) and it is the only shape the existing
|
|
58
66
|
* one-record persistence allows; concurrent puts are serialized through a
|
|
@@ -60,9 +68,12 @@ export declare function createSeedStore({ dbName, idb }: {
|
|
|
60
68
|
*
|
|
61
69
|
* @param options {object}
|
|
62
70
|
* @param options.store {SeedStore} the session seed store to persist through
|
|
71
|
+
* @param options.controller {string} the controller DID the cached
|
|
72
|
+
* descriptors belong to
|
|
63
73
|
* @returns {EncryptionDescriptorCache}
|
|
64
74
|
*/
|
|
65
|
-
export declare function createDescriptorCache({ store }: {
|
|
75
|
+
export declare function createDescriptorCache({ store, controller }: {
|
|
66
76
|
store: SeedStore;
|
|
77
|
+
controller: string;
|
|
67
78
|
}): EncryptionDescriptorCache;
|
|
68
79
|
//# sourceMappingURL=seedStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seedStore.d.ts","sourceRoot":"","sources":["../../src/identity/seedStore.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAA;AAOjF;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAA;IACtC;;OAEG;IACH,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1C;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAA;IACrC
|
|
1
|
+
{"version":3,"file":"seedStore.d.ts","sourceRoot":"","sources":["../../src/identity/seedStore.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAA;AAOjF;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAA;IACtC;;OAEG;IACH,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1C;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAA;IACrC;;;;;OAKG;IACH,eAAe,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD;;OAEG;IACH,eAAe,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAA;IAC1C;;OAEG;IACH,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAChC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,GAAe,EAChB,EAAE;IACD,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,UAAU,CAAA;CACjB,GAAG,SAAS,CAyEZ;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,UAAU,EACX,EAAE;IACD,KAAK,EAAE,SAAS,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;CACnB,GAAG,yBAAyB,CA2C5B"}
|
|
@@ -73,6 +73,13 @@ export function createSeedStore({ dbName, idb = indexedDB }) {
|
|
|
73
73
|
* acquires through: per-collection get/put over the single stored blob, already
|
|
74
74
|
* scoped to one session's Space by the store it is bound to.
|
|
75
75
|
*
|
|
76
|
+
* The blob is stamped with the `controller` DID whose descriptors it holds, and
|
|
77
|
+
* a cache bound to a different controller reads it as empty (and overwrites the
|
|
78
|
+
* stamp on its first write). Descriptors name key-epoch rosters a specific
|
|
79
|
+
* identity is a recipient of, so a login under a different controller than the
|
|
80
|
+
* one that cached them must never trust them: a stale hit would build ciphers
|
|
81
|
+
* the new identity cannot unwrap.
|
|
82
|
+
*
|
|
76
83
|
* The blob is read-modify-written on every put. That is fine at this scale (an
|
|
77
84
|
* app registers a handful of collections) and it is the only shape the existing
|
|
78
85
|
* one-record persistence allows; concurrent puts are serialized through a
|
|
@@ -80,13 +87,18 @@ export function createSeedStore({ dbName, idb = indexedDB }) {
|
|
|
80
87
|
*
|
|
81
88
|
* @param options {object}
|
|
82
89
|
* @param options.store {SeedStore} the session seed store to persist through
|
|
90
|
+
* @param options.controller {string} the controller DID the cached
|
|
91
|
+
* descriptors belong to
|
|
83
92
|
* @returns {EncryptionDescriptorCache}
|
|
84
93
|
*/
|
|
85
|
-
export function createDescriptorCache({ store }) {
|
|
94
|
+
export function createDescriptorCache({ store, controller }) {
|
|
86
95
|
async function readAll() {
|
|
87
|
-
const stored = await store.loadDescriptors();
|
|
88
|
-
if (stored
|
|
89
|
-
|
|
96
|
+
const stored = (await store.loadDescriptors());
|
|
97
|
+
if (stored?.controller === controller &&
|
|
98
|
+
stored.descriptors &&
|
|
99
|
+
typeof stored.descriptors === 'object' &&
|
|
100
|
+
!Array.isArray(stored.descriptors)) {
|
|
101
|
+
return { ...stored.descriptors };
|
|
90
102
|
}
|
|
91
103
|
return {};
|
|
92
104
|
}
|
|
@@ -100,7 +112,7 @@ export function createDescriptorCache({ store }) {
|
|
|
100
112
|
const next = writes.then(async () => {
|
|
101
113
|
const descriptors = await readAll();
|
|
102
114
|
descriptors[collectionId] = descriptor;
|
|
103
|
-
await store.saveDescriptors(descriptors);
|
|
115
|
+
await store.saveDescriptors({ controller, descriptors });
|
|
104
116
|
});
|
|
105
117
|
writes = next.then(() => { }, () => { });
|
|
106
118
|
return next;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seedStore.js","sourceRoot":"","sources":["../../src/identity/seedStore.ts"],"names":[],"mappings":"AAqBA,MAAM,aAAa,GAAG,SAAS,CAAA;AAC/B,MAAM,WAAW,GAAG,MAAM,CAAA;AAC1B,MAAM,cAAc,GAAG,QAAQ,CAAA;AAC/B,MAAM,kBAAkB,GAAG,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"seedStore.js","sourceRoot":"","sources":["../../src/identity/seedStore.ts"],"names":[],"mappings":"AAqBA,MAAM,aAAa,GAAG,SAAS,CAAA;AAC/B,MAAM,WAAW,GAAG,MAAM,CAAA;AAC1B,MAAM,cAAc,GAAG,QAAQ,CAAA;AAC/B,MAAM,kBAAkB,GAAG,aAAa,CAAA;AAuCxC;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,MAAM,EACN,GAAG,GAAG,SAAS,EAIhB;IACC,KAAK,UAAU,aAAa;QAC1B,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC3C,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;YACnC,OAAO,CAAC,eAAe,GAAG,GAAG,EAAE;gBAC7B,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAA;YACjD,CAAC,CAAA;YACD,OAAO,CAAC,SAAS,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YACjD,OAAO,CAAC,OAAO,GAAG,GAAG,EAAE,CACrB,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAA;QAChE,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,UAAU,gBAAgB,CAC7B,IAAwB,EACxB,SAAgD;QAEhD,MAAM,EAAE,GAAG,MAAM,aAAa,EAAE,CAAA;QAChC,IAAI,CA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