@interop/wallet-core 0.24.0 → 0.25.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 +18 -14
- package/dist/clients/index.d.ts +6 -4
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +5 -3
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/policy.d.ts +11 -3
- package/dist/clients/policy.d.ts.map +1 -1
- package/dist/clients/policy.js +12 -4
- package/dist/clients/policy.js.map +1 -1
- package/dist/clients/revocation.d.ts +21 -3
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +18 -1
- package/dist/clients/revocation.js.map +1 -1
- package/dist/clients/rosterPolicy.d.ts +12 -5
- package/dist/clients/rosterPolicy.d.ts.map +1 -1
- package/dist/clients/rosterPolicy.js +28 -4
- package/dist/clients/rosterPolicy.js.map +1 -1
- package/dist/descriptors/acquire.d.ts +4 -1
- package/dist/descriptors/acquire.d.ts.map +1 -1
- package/dist/descriptors/acquire.js +29 -1
- package/dist/descriptors/acquire.js.map +1 -1
- package/dist/descriptors/index.d.ts +9 -1
- package/dist/descriptors/index.d.ts.map +1 -1
- package/dist/descriptors/index.js +9 -1
- package/dist/descriptors/index.js.map +1 -1
- package/dist/descriptors/logSource.d.ts +33 -0
- package/dist/descriptors/logSource.d.ts.map +1 -0
- package/dist/descriptors/logSource.js +49 -0
- package/dist/descriptors/logSource.js.map +1 -0
- package/dist/keys/index.d.ts +6 -2
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +5 -2
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts +24 -5
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +29 -5
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/rosterStore.d.ts +3 -3
- package/dist/keys/rosterStore.d.ts.map +1 -1
- package/dist/keys/rosterStore.js +1 -1
- package/dist/keys/rosterStore.js.map +1 -1
- package/dist/keys/userKeyCascade.d.ts +13 -6
- package/dist/keys/userKeyCascade.d.ts.map +1 -1
- package/dist/keys/userKeyCascade.js +11 -2
- package/dist/keys/userKeyCascade.js.map +1 -1
- package/dist/request/appKey.d.ts +8 -7
- package/dist/request/appKey.d.ts.map +1 -1
- package/dist/request/appKey.js +17 -23
- package/dist/request/appKey.js.map +1 -1
- package/dist/request/composeVp.d.ts +6 -7
- package/dist/request/composeVp.d.ts.map +1 -1
- package/dist/request/composeVp.js +44 -55
- package/dist/request/composeVp.js.map +1 -1
- package/dist/request/processRequest.d.ts +1 -4
- package/dist/request/processRequest.d.ts.map +1 -1
- package/dist/request/processRequest.js +2 -5
- package/dist/request/processRequest.js.map +1 -1
- package/dist/resourceLog/index.d.ts +5 -2
- package/dist/resourceLog/index.d.ts.map +1 -1
- package/dist/resourceLog/index.js +5 -2
- package/dist/resourceLog/index.js.map +1 -1
- package/dist/resourceLog/seal.d.ts +86 -0
- package/dist/resourceLog/seal.d.ts.map +1 -0
- package/dist/resourceLog/seal.js +99 -0
- package/dist/resourceLog/seal.js.map +1 -0
- package/dist/resourceLog/verify.d.ts +7 -1
- package/dist/resourceLog/verify.d.ts.map +1 -1
- package/dist/resourceLog/verify.js +1 -0
- package/dist/resourceLog/verify.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ResourceLogStore } from '@interop/was-client/log';
|
|
2
|
+
import { type ResourceLogController, type ResourceLogPinStore } from '../resourceLog/index.js';
|
|
3
|
+
import type { EncryptionDescriptorSource } from './acquire.js';
|
|
4
|
+
/**
|
|
5
|
+
* The state-document schema identifier an encryption descriptor carries in a
|
|
6
|
+
* governed log entry, per WAS-EC.
|
|
7
|
+
*/
|
|
8
|
+
export declare const EPOCH_CONFIGURATION_STATE_TYPE = "WasEpochConfiguration";
|
|
9
|
+
/**
|
|
10
|
+
* Builds the {@link EncryptionDescriptorSource} over per-collection resource
|
|
11
|
+
* logs. An absent log resolves `undefined` exactly like an absent
|
|
12
|
+
* Collection Description `encryption` member (a plaintext collection, or one
|
|
13
|
+
* whose provisioning has not landed); verification failures throw through --
|
|
14
|
+
* {@link acquireDescriptor} rethrows the refusal classes rather than falling
|
|
15
|
+
* back to the cache.
|
|
16
|
+
*
|
|
17
|
+
* @param options {object}
|
|
18
|
+
* @param options.logFor {function} `(collectionId) => ResourceLogStore` --
|
|
19
|
+
* the collection's governing log's transport seam
|
|
20
|
+
* @param options.resolveController {function}
|
|
21
|
+
* `() => Promise<ResourceLogController>` -- the caller's currently verified
|
|
22
|
+
* controller view, resolved per operation
|
|
23
|
+
* @param options.pinStoreFor {function} `(collectionId) =>
|
|
24
|
+
* ResourceLogPinStore` -- this client's chain-head pin for the collection's
|
|
25
|
+
* log
|
|
26
|
+
* @returns {EncryptionDescriptorSource}
|
|
27
|
+
*/
|
|
28
|
+
export declare function logGovernedDescriptorSource({ logFor, resolveController, pinStoreFor }: {
|
|
29
|
+
logFor: (collectionId: string) => ResourceLogStore;
|
|
30
|
+
resolveController: () => Promise<ResourceLogController>;
|
|
31
|
+
pinStoreFor: (collectionId: string) => ResourceLogPinStore;
|
|
32
|
+
}): EncryptionDescriptorSource;
|
|
33
|
+
//# sourceMappingURL=logSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logSource.d.ts","sourceRoot":"","sources":["../../src/descriptors/logSource.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AAE9D;;;GAGG;AACH,eAAO,MAAM,8BAA8B,0BAA0B,CAAA;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,MAAM,EACN,iBAAiB,EACjB,WAAW,EACZ,EAAE;IACD,MAAM,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,gBAAgB,CAAA;IAClD,iBAAiB,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACvD,WAAW,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,mBAAmB,CAAA;CAC3D,GAAG,0BAA0B,CAuB7B"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { WAS_RESOURCE_LOG_METHOD } from '@interop/was-client/log';
|
|
2
|
+
import { readResourceLog, ResourceLogIntegrityError } from '../resourceLog/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* The state-document schema identifier an encryption descriptor carries in a
|
|
5
|
+
* governed log entry, per WAS-EC.
|
|
6
|
+
*/
|
|
7
|
+
export const EPOCH_CONFIGURATION_STATE_TYPE = 'WasEpochConfiguration';
|
|
8
|
+
/**
|
|
9
|
+
* Builds the {@link EncryptionDescriptorSource} over per-collection resource
|
|
10
|
+
* logs. An absent log resolves `undefined` exactly like an absent
|
|
11
|
+
* Collection Description `encryption` member (a plaintext collection, or one
|
|
12
|
+
* whose provisioning has not landed); verification failures throw through --
|
|
13
|
+
* {@link acquireDescriptor} rethrows the refusal classes rather than falling
|
|
14
|
+
* back to the cache.
|
|
15
|
+
*
|
|
16
|
+
* @param options {object}
|
|
17
|
+
* @param options.logFor {function} `(collectionId) => ResourceLogStore` --
|
|
18
|
+
* the collection's governing log's transport seam
|
|
19
|
+
* @param options.resolveController {function}
|
|
20
|
+
* `() => Promise<ResourceLogController>` -- the caller's currently verified
|
|
21
|
+
* controller view, resolved per operation
|
|
22
|
+
* @param options.pinStoreFor {function} `(collectionId) =>
|
|
23
|
+
* ResourceLogPinStore` -- this client's chain-head pin for the collection's
|
|
24
|
+
* log
|
|
25
|
+
* @returns {EncryptionDescriptorSource}
|
|
26
|
+
*/
|
|
27
|
+
export function logGovernedDescriptorSource({ logFor, resolveController, pinStoreFor }) {
|
|
28
|
+
return {
|
|
29
|
+
async collectionEncryption({ collectionId }) {
|
|
30
|
+
const controller = await resolveController();
|
|
31
|
+
const current = await readResourceLog({
|
|
32
|
+
store: logFor(collectionId),
|
|
33
|
+
controller,
|
|
34
|
+
expectedMethod: WAS_RESOURCE_LOG_METHOD,
|
|
35
|
+
pinStore: pinStoreFor(collectionId)
|
|
36
|
+
});
|
|
37
|
+
if (current === null) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const state = current.verified.state;
|
|
41
|
+
if (state.type !== EPOCH_CONFIGURATION_STATE_TYPE) {
|
|
42
|
+
throw new ResourceLogIntegrityError(`The governed descriptor log carries state of type ` +
|
|
43
|
+
`"${state.type}", not "${EPOCH_CONFIGURATION_STATE_TYPE}".`);
|
|
44
|
+
}
|
|
45
|
+
return state;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=logSource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logSource.js","sourceRoot":"","sources":["../../src/descriptors/logSource.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,uBAAuB,EAExB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,eAAe,EACf,yBAAyB,EAG1B,MAAM,yBAAyB,CAAA;AAGhC;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,uBAAuB,CAAA;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,2BAA2B,CAAC,EAC1C,MAAM,EACN,iBAAiB,EACjB,WAAW,EAKZ;IACC,OAAO;QACL,KAAK,CAAC,oBAAoB,CAAC,EAAE,YAAY,EAAE;YACzC,MAAM,UAAU,GAAG,MAAM,iBAAiB,EAAE,CAAA;YAC5C,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC;gBACpC,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC;gBAC3B,UAAU;gBACV,cAAc,EAAE,uBAAuB;gBACvC,QAAQ,EAAE,WAAW,CAAC,YAAY,CAAC;aACpC,CAAC,CAAA;YACF,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACrB,OAAO,SAAS,CAAA;YAClB,CAAC;YACD,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAA;YACpC,IAAI,KAAK,CAAC,IAAI,KAAK,8BAA8B,EAAE,CAAC;gBAClD,MAAM,IAAI,yBAAyB,CACjC,oDAAoD;oBAClD,IAAI,KAAK,CAAC,IAAI,WAAW,8BAA8B,IAAI,CAC9D,CAAA;YACH,CAAC;YACD,OAAO,KAA6B,CAAA;QACtC,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/keys/index.d.ts
CHANGED
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
* - `userKeyRosterDescriptorStore` / `logGovernedDescriptorStore` -- that
|
|
22
22
|
* descriptor store: reads resolve to the roster log's verified head
|
|
23
23
|
* (`key-map/user-key.jsonl`), writes append signed entries; built from a
|
|
24
|
-
* bare signing client for the login-time direct read.
|
|
24
|
+
* bare signing client for the login-time direct read. Sealable
|
|
25
|
+
* (`SealableEncryptionDescriptorStore` / `isSealableDescriptorStore`):
|
|
26
|
+
* `seal()` appends the idempotent backstop entry when the log's head still
|
|
27
|
+
* anchors before the account document's latest membership change.
|
|
25
28
|
* - `rosterRecipientKid` -- the one builder of a client's roster kid, shared by
|
|
26
29
|
* the enrollment wrap, the roster read, and the rotation that retires it.
|
|
27
30
|
* - `convergeUserKeyRosterToDocument` -- the standing detector for a revocation
|
|
@@ -51,7 +54,8 @@ export { cascadeCollectionsToUserKey, userKeyAsRecipient, rotateCollectionEpochs
|
|
|
51
54
|
export type { CollectionUserKeyRotationOutcome, UserKeyCascadeResult } from './userKeyCascade.js';
|
|
52
55
|
export type { UserKeyRosterReadResult, RosterRecipientDocument } from './userKeyRoster.js';
|
|
53
56
|
export { userKeyRosterDescriptorStore } from './rosterStore.js';
|
|
54
|
-
export { EPOCH_CONFIGURATION_STATE_TYPE, logGovernedDescriptorStore } from './rosterLogStore.js';
|
|
57
|
+
export { EPOCH_CONFIGURATION_STATE_TYPE, isSealableDescriptorStore, logGovernedDescriptorStore } from './rosterLogStore.js';
|
|
58
|
+
export type { SealableEncryptionDescriptorStore } from './rosterLogStore.js';
|
|
55
59
|
export { ensureWalletSpaceEpochs } from './spaceEpochs.js';
|
|
56
60
|
export type { WalletSpaceEpochsResult } from './spaceEpochs.js';
|
|
57
61
|
export { readClientLabels, removeClientLabel, setClientLabel } from './clientLabels.js';
|
package/dist/keys/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC5D,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,mBAAmB,EACnB,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,EACxB,sBAAsB,EACtB,8BAA8B,EAC9B,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,gCAAgC,EAChC,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAA;AAC/D,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAA;AAE5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE/D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
|
package/dist/keys/index.js
CHANGED
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
* - `userKeyRosterDescriptorStore` / `logGovernedDescriptorStore` -- that
|
|
22
22
|
* descriptor store: reads resolve to the roster log's verified head
|
|
23
23
|
* (`key-map/user-key.jsonl`), writes append signed entries; built from a
|
|
24
|
-
* bare signing client for the login-time direct read.
|
|
24
|
+
* bare signing client for the login-time direct read. Sealable
|
|
25
|
+
* (`SealableEncryptionDescriptorStore` / `isSealableDescriptorStore`):
|
|
26
|
+
* `seal()` appends the idempotent backstop entry when the log's head still
|
|
27
|
+
* anchors before the account document's latest membership change.
|
|
25
28
|
* - `rosterRecipientKid` -- the one builder of a client's roster kid, shared by
|
|
26
29
|
* the enrollment wrap, the roster read, and the rotation that retires it.
|
|
27
30
|
* - `convergeUserKeyRosterToDocument` -- the standing detector for a revocation
|
|
@@ -47,7 +50,7 @@ export { assertEnrolledClientKeyRecord, decodeClientKeyRecord, encodeClientKeyRe
|
|
|
47
50
|
export { addUserKeyRosterRecipient, convergeUserKeyRosterToDocument, ensureUserKeyRoster, UserKeyRosterContinuityError, UserKeyRosterIntegrityError, UserKeyRosterUnwrapError, userKeyRosterLogSigner, userKeyRosterRecipientResolver, readUserKeyRoster, rosterRecipientKid, rotateUserKeyRoster } from './userKeyRoster.js';
|
|
48
51
|
export { cascadeCollectionsToUserKey, userKeyAsRecipient, rotateCollectionEpochsToUserKey, unwrapUserKeyGenerations } from './userKeyCascade.js';
|
|
49
52
|
export { userKeyRosterDescriptorStore } from './rosterStore.js';
|
|
50
|
-
export { EPOCH_CONFIGURATION_STATE_TYPE, logGovernedDescriptorStore } from './rosterLogStore.js';
|
|
53
|
+
export { EPOCH_CONFIGURATION_STATE_TYPE, isSealableDescriptorStore, logGovernedDescriptorStore } from './rosterLogStore.js';
|
|
51
54
|
export { ensureWalletSpaceEpochs } from './spaceEpochs.js';
|
|
52
55
|
export { readClientLabels, removeClientLabel, setClientLabel } from './clientLabels.js';
|
|
53
56
|
export { wasClientLabelsStore } from './wasLabelsStore.js';
|
package/dist/keys/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAG5D,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAA;AAO7B,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,mBAAmB,EACnB,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,EACxB,sBAAsB,EACtB,8BAA8B,EAC9B,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,qBAAqB,CAAA;AAU5B,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAA;AAC/D,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAG1D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1,11 +1,30 @@
|
|
|
1
1
|
import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
|
|
2
2
|
import { type ResourceLogStore } from '@interop/was-client/log';
|
|
3
3
|
import { type ResourceLogController, type ResourceLogPinStore, type ResourceLogSigner } from '../resourceLog/index.js';
|
|
4
|
+
import { EPOCH_CONFIGURATION_STATE_TYPE } from '../descriptors/logSource.js';
|
|
5
|
+
export { EPOCH_CONFIGURATION_STATE_TYPE };
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
+
* An `EncryptionDescriptorStore` whose resource is governed by a resource
|
|
8
|
+
* log, and can therefore be SEALED: `seal()` runs the sealing sweep
|
|
9
|
+
* (`sealResourceLog`) against the caller's currently verified controller
|
|
10
|
+
* view, appending the idempotent no-op backstop entry when the log's head
|
|
11
|
+
* still anchors before the controller's latest membership change --
|
|
12
|
+
* `'sealed'` -- and writing nothing when the log is already sealed, absent,
|
|
13
|
+
* or has no membership change to seal against -- `'noop'`.
|
|
7
14
|
*/
|
|
8
|
-
export
|
|
15
|
+
export interface SealableEncryptionDescriptorStore extends EncryptionDescriptorStore {
|
|
16
|
+
seal(): Promise<'sealed' | 'noop'>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Whether a descriptor store is log-governed and sealable -- the guard the
|
|
20
|
+
* ceremonies and sweeps use to run the seal backstop only where a governing
|
|
21
|
+
* log exists (an ordinary Collection-Description-backed store has nothing to
|
|
22
|
+
* seal).
|
|
23
|
+
*
|
|
24
|
+
* @param store {EncryptionDescriptorStore}
|
|
25
|
+
* @returns {boolean}
|
|
26
|
+
*/
|
|
27
|
+
export declare function isSealableDescriptorStore(store: EncryptionDescriptorStore): store is SealableEncryptionDescriptorStore;
|
|
9
28
|
/**
|
|
10
29
|
* Builds the log-governed `EncryptionDescriptorStore`.
|
|
11
30
|
*
|
|
@@ -23,12 +42,12 @@ export declare const EPOCH_CONFIGURATION_STATE_TYPE = "WasEpochConfiguration";
|
|
|
23
42
|
* for this log
|
|
24
43
|
* @param options.signer {ResourceLogSigner} this client's enrolled signing
|
|
25
44
|
* key, for the appends this store writes
|
|
26
|
-
* @returns {
|
|
45
|
+
* @returns {SealableEncryptionDescriptorStore}
|
|
27
46
|
*/
|
|
28
47
|
export declare function logGovernedDescriptorStore({ log, resolveController, pinStore, signer }: {
|
|
29
48
|
log: ResourceLogStore;
|
|
30
49
|
resolveController: () => Promise<ResourceLogController>;
|
|
31
50
|
pinStore: ResourceLogPinStore;
|
|
32
51
|
signer: ResourceLogSigner;
|
|
33
|
-
}):
|
|
52
|
+
}): SealableEncryptionDescriptorStore;
|
|
34
53
|
//# sourceMappingURL=rosterLogStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterLogStore.d.ts","sourceRoot":"","sources":["../../src/keys/rosterLogStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rosterLogStore.d.ts","sourceRoot":"","sources":["../../src/keys/rosterLogStore.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAQL,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAEvB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAE,8BAA8B,EAAE,CAAA;AAEzC;;;;;;;;GAQG;AACH,MAAM,WAAW,iCAAkC,SAAQ,yBAAyB;IAClF,IAAI,IAAI,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAA;CACnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,yBAAyB,GAC/B,KAAK,IAAI,iCAAiC,CAK5C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,GAAG,EACH,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACP,EAAE;IACD,GAAG,EAAE,gBAAgB,CAAA;IACrB,iBAAiB,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACvD,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,MAAM,EAAE,iBAAiB,CAAA;CAC1B,GAAG,iCAAiC,CAoHpC"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { confirmAppend, WAS_RESOURCE_LOG_METHOD } from '@interop/was-client/log';
|
|
2
|
-
import { buildResourceLogEntry, buildResourceLogGenesis, readResourceLog, ResourceLogClosedError, ResourceLogIntegrityError, verifyResourceLog } from '../resourceLog/index.js';
|
|
2
|
+
import { buildResourceLogEntry, buildResourceLogGenesis, readResourceLog, ResourceLogClosedError, ResourceLogIntegrityError, sealResourceLog, verifyResourceLog } from '../resourceLog/index.js';
|
|
3
|
+
import { EPOCH_CONFIGURATION_STATE_TYPE } from '../descriptors/logSource.js';
|
|
4
|
+
export { EPOCH_CONFIGURATION_STATE_TYPE };
|
|
3
5
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
+
* Whether a descriptor store is log-governed and sealable -- the guard the
|
|
7
|
+
* ceremonies and sweeps use to run the seal backstop only where a governing
|
|
8
|
+
* log exists (an ordinary Collection-Description-backed store has nothing to
|
|
9
|
+
* seal).
|
|
10
|
+
*
|
|
11
|
+
* @param store {EncryptionDescriptorStore}
|
|
12
|
+
* @returns {boolean}
|
|
6
13
|
*/
|
|
7
|
-
export
|
|
14
|
+
export function isSealableDescriptorStore(store) {
|
|
15
|
+
return (typeof store.seal ===
|
|
16
|
+
'function');
|
|
17
|
+
}
|
|
8
18
|
/**
|
|
9
19
|
* Builds the log-governed `EncryptionDescriptorStore`.
|
|
10
20
|
*
|
|
@@ -22,7 +32,7 @@ export const EPOCH_CONFIGURATION_STATE_TYPE = 'WasEpochConfiguration';
|
|
|
22
32
|
* for this log
|
|
23
33
|
* @param options.signer {ResourceLogSigner} this client's enrolled signing
|
|
24
34
|
* key, for the appends this store writes
|
|
25
|
-
* @returns {
|
|
35
|
+
* @returns {SealableEncryptionDescriptorStore}
|
|
26
36
|
*/
|
|
27
37
|
export function logGovernedDescriptorStore({ log, resolveController, pinStore, signer }) {
|
|
28
38
|
// The verified log observed by the most recent read on this store instance;
|
|
@@ -104,6 +114,20 @@ export function logGovernedDescriptorStore({ log, resolveController, pinStore, s
|
|
|
104
114
|
// edv machinery re-reads and adopts the winner's descriptor.
|
|
105
115
|
await log.create(genesis);
|
|
106
116
|
await settle({ entry: genesis, controller });
|
|
117
|
+
},
|
|
118
|
+
async seal() {
|
|
119
|
+
const controller = await resolveController();
|
|
120
|
+
const { sealed, verified } = await sealResourceLog({
|
|
121
|
+
store: log,
|
|
122
|
+
controller,
|
|
123
|
+
expectedMethod: WAS_RESOURCE_LOG_METHOD,
|
|
124
|
+
pinStore,
|
|
125
|
+
signer
|
|
126
|
+
});
|
|
127
|
+
if (verified !== null) {
|
|
128
|
+
lastVerified = verified;
|
|
129
|
+
}
|
|
130
|
+
return sealed ? 'sealed' : 'noop';
|
|
107
131
|
}
|
|
108
132
|
};
|
|
109
133
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterLogStore.js","sourceRoot":"","sources":["../../src/keys/rosterLogStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rosterLogStore.js","sourceRoot":"","sources":["../../src/keys/rosterLogStore.ts"],"names":[],"mappings":"AA6BA,OAAO,EACL,aAAa,EACb,uBAAuB,EAExB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EAKlB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAE,8BAA8B,EAAE,CAAA;AAezC;;;;;;;;GAQG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAgC;IAEhC,OAAO,CACL,OAAQ,KAAoD,CAAC,IAAI;QACjE,UAAU,CACX,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,0BAA0B,CAAC,EACzC,GAAG,EACH,iBAAiB,EACjB,QAAQ,EACR,MAAM,EAMP;IACC,4EAA4E;IAC5E,2EAA2E;IAC3E,oDAAoD;IACpD,IAAI,YAAY,GAA+B,IAAI,CAAA;IAEnD,SAAS,OAAO,CACd,UAAgC;QAEhC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,CAAA;QACjD,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,8BAA8B,EAAE,CAAA;IAC1D,CAAC;IAED,KAAK,UAAU,MAAM,CAAC,EACpB,KAAK,EACL,UAAU,EAIX;QACC,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,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UAAU;gBACV,cAAc,EAAE,uBAAuB;gBACvC,QAAQ;gBACR,MAAM;aACP,CAAC,CAAA;YACF,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;gBACtB,YAAY,GAAG,QAAQ,CAAA;YACzB,CAAC;YACD,OAAO,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAA;QACnC,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ZcapClient } from '@interop/ezcap';
|
|
2
|
-
import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
|
|
3
2
|
import type { ResourceLogController, ResourceLogPinStore, ResourceLogSigner } from '../resourceLog/index.js';
|
|
3
|
+
import { type SealableEncryptionDescriptorStore } from './rosterLogStore.js';
|
|
4
4
|
/**
|
|
5
5
|
* Builds the log-governed descriptor store over the user key roster in a
|
|
6
6
|
* data Space: reads resolve to the verified head of
|
|
@@ -19,7 +19,7 @@ import type { ResourceLogController, ResourceLogPinStore, ResourceLogSigner } fr
|
|
|
19
19
|
* pin for the roster log
|
|
20
20
|
* @param options.signer {ResourceLogSigner} this client's enrolled signing
|
|
21
21
|
* key ({@link userKeyRosterLogSigner})
|
|
22
|
-
* @returns {
|
|
22
|
+
* @returns {SealableEncryptionDescriptorStore}
|
|
23
23
|
*/
|
|
24
24
|
export declare function userKeyRosterDescriptorStore({ storageServerUrl, zcapClient, spaceId, resolveController, pinStore, signer }: {
|
|
25
25
|
storageServerUrl: string;
|
|
@@ -28,5 +28,5 @@ export declare function userKeyRosterDescriptorStore({ storageServerUrl, zcapCli
|
|
|
28
28
|
resolveController: () => Promise<ResourceLogController>;
|
|
29
29
|
pinStore: ResourceLogPinStore;
|
|
30
30
|
signer: ResourceLogSigner;
|
|
31
|
-
}):
|
|
31
|
+
}): SealableEncryptionDescriptorStore;
|
|
32
32
|
//# sourceMappingURL=rosterStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterStore.d.ts","sourceRoot":"","sources":["../../src/keys/rosterStore.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"rosterStore.d.ts","sourceRoot":"","sources":["../../src/keys/rosterStore.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,yBAAyB,CAAA;AAKhC,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACP,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,iBAAiB,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACvD,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,MAAM,EAAE,iBAAiB,CAAA;CAC1B,GAAG,iCAAiC,CAapC"}
|
package/dist/keys/rosterStore.js
CHANGED
|
@@ -38,7 +38,7 @@ import { logGovernedDescriptorStore } from './rosterLogStore.js';
|
|
|
38
38
|
* pin for the roster log
|
|
39
39
|
* @param options.signer {ResourceLogSigner} this client's enrolled signing
|
|
40
40
|
* key ({@link userKeyRosterLogSigner})
|
|
41
|
-
* @returns {
|
|
41
|
+
* @returns {SealableEncryptionDescriptorStore}
|
|
42
42
|
*/
|
|
43
43
|
export function userKeyRosterDescriptorStore({ storageServerUrl, zcapClient, spaceId, resolveController, pinStore, signer }) {
|
|
44
44
|
const was = new WasClient({ serverUrl: storageServerUrl, zcapClient });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterStore.js","sourceRoot":"","sources":["../../src/keys/rosterStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"rosterStore.js","sourceRoot":"","sources":["../../src/keys/rosterStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAM1D,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,0BAA0B,EAE3B,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,4BAA4B,CAAC,EAC3C,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,QAAQ,EACR,MAAM,EAQP;IACC,MAAM,GAAG,GAAG,IAAI,SAAS,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC,CAAA;IACtE,MAAM,UAAU,GAAG,GAAG;SACnB,KAAK,CAAC,OAAO,CAAC;SACd,UAAU,CAAC,kBAAkB,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,CAAA;IACjE,OAAO,0BAA0B,CAAC;QAChC,GAAG,EAAE,gBAAgB,CAAC;YACpB,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,4BAA4B,CAAC;SAC5D,CAAC;QACF,iBAAiB;QACjB,QAAQ;QACR,MAAM;KACP,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -65,11 +65,13 @@ export declare function unwrapUserKeyGenerations({ descriptor, clientKeyAgreemen
|
|
|
65
65
|
}): Promise<UserKey[]>;
|
|
66
66
|
/**
|
|
67
67
|
* What one collection's cascade step did: `noop` (already on the current user
|
|
68
|
-
* key), `
|
|
69
|
-
*
|
|
70
|
-
* current user key
|
|
68
|
+
* key), `sealed` (already on the current user key, but the collection's
|
|
69
|
+
* governing log still anchored before the membership change -- the backstop
|
|
70
|
+
* append landed), `escrowed` (the current user key's wrap was completed into
|
|
71
|
+
* history with no stale epoch to rotate), or `rotated` (a fresh epoch sealed
|
|
72
|
+
* to the current user key, the stale generations retired).
|
|
71
73
|
*/
|
|
72
|
-
export type CollectionUserKeyRotationOutcome = 'noop' | 'escrowed' | 'rotated';
|
|
74
|
+
export type CollectionUserKeyRotationOutcome = 'noop' | 'sealed' | 'escrowed' | 'rotated';
|
|
73
75
|
/**
|
|
74
76
|
* Brings ONE encrypted collection's epoch roster onto the current user key --
|
|
75
77
|
* the per-collection op of the revocation cascade and of the completion sweep:
|
|
@@ -79,8 +81,13 @@ export type CollectionUserKeyRotationOutcome = 'noop' | 'escrowed' | 'rotated';
|
|
|
79
81
|
* a fresh epoch minted without the stale generations. Two requests per
|
|
80
82
|
* collection; app recipients and other readers ride through untouched (the
|
|
81
83
|
* default did:key resolver re-wraps them).
|
|
82
|
-
* - **Current already** and fully escrowed: no write at all, so a naive
|
|
83
|
-
* re-run after a mid-cascade crash converges with zero redundant epochs.
|
|
84
|
+
* - **Current already** and fully escrowed: no epoch write at all, so a naive
|
|
85
|
+
* re-run after a mid-cascade crash converges with zero redundant epochs. On
|
|
86
|
+
* a log-governed (sealable) store this is exactly where an unsealed log can
|
|
87
|
+
* hide -- the rotation that should have re-anchored the log never wrote --
|
|
88
|
+
* so the store's seal backstop runs here (`sealed` when it appended);
|
|
89
|
+
* rotated and escrowed writes seal by construction, anchored at the
|
|
90
|
+
* caller's current controller head.
|
|
84
91
|
* - **No epochs**: refused fail-closed (see the module doc) -- provisioning
|
|
85
92
|
* installs every encrypted collection's epoch[0], so the cascade never
|
|
86
93
|
* mints a first epoch.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKeyCascade.d.ts","sourceRoot":"","sources":["../../src/keys/userKeyCascade.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAKL,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"userKeyCascade.d.ts","sourceRoot":"","sources":["../../src/keys/userKeyCascade.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAKL,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AAE7D;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACR,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,kBAAkB,CAKrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,UAAU,EACV,qBAAqB,EACtB,EAAE;IACD,UAAU,EAAE,oBAAoB,CAAA;IAChC,qBAAqB,EAAE,gBAAgB,CAAA;CACxC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAkBrB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,gCAAgC,GAC1C,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAA;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,+BAA+B,CAAC,EACpD,KAAK,EACL,OAAO,EACP,WAAW,EACZ,EAAE;IACD,KAAK,EAAE,yBAAyB,CAAA;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,OAAO,EAAE,CAAA;CACvB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAmG5C;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,gCAAgC,CAAC,CAAA;IAC1D,MAAM,EAAE,KAAK,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CACxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,2BAA2B,CAAC,EAChD,aAAa,EACb,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACrB,OAAO,EACR,EAAE;IACD,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,yBAAyB,CAAA;IAC7D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IACxD,gBAAgB,EAAE,oBAAoB,CAAA;IACtC,qBAAqB,EAAE,gBAAgB,CAAA;IACvC,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAwBhC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { addRecipient, epochKeyIdFor, replaceRecipient, unwrapEpochSecret } from '@interop/was-client/edv';
|
|
2
|
+
import { isSealableDescriptorStore } from './rosterLogStore.js';
|
|
2
3
|
import { userKeyVaultKeys } from './userKey.js';
|
|
3
4
|
/**
|
|
4
5
|
* A user key presented as an epoch-roster recipient: the kid is the
|
|
@@ -57,8 +58,13 @@ export async function unwrapUserKeyGenerations({ descriptor, clientKeyAgreementK
|
|
|
57
58
|
* a fresh epoch minted without the stale generations. Two requests per
|
|
58
59
|
* collection; app recipients and other readers ride through untouched (the
|
|
59
60
|
* default did:key resolver re-wraps them).
|
|
60
|
-
* - **Current already** and fully escrowed: no write at all, so a naive
|
|
61
|
-
* re-run after a mid-cascade crash converges with zero redundant epochs.
|
|
61
|
+
* - **Current already** and fully escrowed: no epoch write at all, so a naive
|
|
62
|
+
* re-run after a mid-cascade crash converges with zero redundant epochs. On
|
|
63
|
+
* a log-governed (sealable) store this is exactly where an unsealed log can
|
|
64
|
+
* hide -- the rotation that should have re-anchored the log never wrote --
|
|
65
|
+
* so the store's seal backstop runs here (`sealed` when it appended);
|
|
66
|
+
* rotated and escrowed writes seal by construction, anchored at the
|
|
67
|
+
* caller's current controller head.
|
|
62
68
|
* - **No epochs**: refused fail-closed (see the module doc) -- provisioning
|
|
63
69
|
* installs every encrypted collection's epoch[0], so the cascade never
|
|
64
70
|
* mints a first epoch.
|
|
@@ -99,6 +105,9 @@ export async function rotateCollectionEpochsToUserKey({ store, userKey, generati
|
|
|
99
105
|
if (staleKids.length === 0) {
|
|
100
106
|
const escrowComplete = (descriptor.epochs ?? []).every(epoch => epoch.recipients.some(entry => entry.header.kid === userKeyKid));
|
|
101
107
|
if (currentKids.has(userKeyKid) && escrowComplete) {
|
|
108
|
+
if (isSealableDescriptorStore(store)) {
|
|
109
|
+
return (await store.seal()) === 'sealed' ? 'sealed' : 'noop';
|
|
110
|
+
}
|
|
102
111
|
return 'noop';
|
|
103
112
|
}
|
|
104
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKeyCascade.js","sourceRoot":"","sources":["../../src/keys/userKeyCascade.ts"],"names":[],"mappings":"AA+BA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAGlB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,gBAAgB,EAAgB,MAAM,cAAc,CAAA;AAE7D;;;;;;;;GAQG;AACH,MAAM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AQ,GAAqD,EAAE,CAAA;IACrE,MAAM,MAAM,GAAoD,EAAE,CAAA;IAClE,MAAM,OAAO,CAAC,GAAG,CACf,aAAa,CAAC,GAAG,CAAC,KAAK,EAAC,YAAY,EAAC,EAAE;QACrC,IAAI,CAAC;YACH,IAAI,WAAW,IAAI,CAAC,CAAC,MAAM,WAAW,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC;gBACtD,OAAM;YACR,CAAC;YACD,QAAQ,CAAC,YAAY,CAAC,GAAG,MAAM,+BAA+B,CAAC;gBAC7D,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC;gBAC7B,OAAO;gBACP,WAAW;aACZ,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;QAC3C,CAAC;IACH,CAAC,CAAC,CACH,CAAA;IACD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;AAC7B,CAAC"}
|
package/dist/request/appKey.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IVerifiableCredential } from '@interop/data-integrity-core';
|
|
2
|
+
import { CONTEXT_URL_V1 as APP_CONNECT_CONTEXT_URL } from 'byoe-context';
|
|
2
3
|
import type { IAppConnectApp } from './types.js';
|
|
3
4
|
/**
|
|
4
5
|
* The key name mixed into seed derivation. Unlike the handle this is
|
|
@@ -29,13 +30,13 @@ export declare const APP_KEY_CREDENTIAL_TYPE = "AppKeyCredential";
|
|
|
29
30
|
*/
|
|
30
31
|
export declare const APP_KEY_TYPE_ARRAY: readonly string[];
|
|
31
32
|
/**
|
|
32
|
-
* The
|
|
33
|
+
* The hosted App Connect context URL every app-key credential carries as the
|
|
33
34
|
* second entry of its `@context` array (after the VC 1.1 context URL). The
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
35
|
+
* context document defines the profile's BYOE terms; document loaders resolve
|
|
36
|
+
* it from the bundled `byoe-context` document, so no fetch happens at sign or
|
|
37
|
+
* verification time.
|
|
37
38
|
*/
|
|
38
|
-
export
|
|
39
|
+
export { APP_CONNECT_CONTEXT_URL };
|
|
39
40
|
/**
|
|
40
41
|
* Whether a credential presents as an app key -- that is, carries the
|
|
41
42
|
* {@link APP_KEY_CREDENTIAL_TYPE} marker in its `type` array. Says nothing
|
|
@@ -201,8 +202,8 @@ export declare function findLegacyAppKeyCredential({ credentials, origin }: {
|
|
|
201
202
|
* Re-issues a legacy app-key credential in place under the `appUrl` model:
|
|
202
203
|
* the same seed (so the same derived DID -- the app's identity and its
|
|
203
204
|
* encrypted-data access are preserved), the fixed two-entry type array, the
|
|
204
|
-
*
|
|
205
|
-
* the validated request value. A fresh mint would roll the seed and orphan
|
|
205
|
+
* hosted App Connect context URL, and the `credentialSubject.appUrl` claim set
|
|
206
|
+
* from the validated request value. A fresh mint would roll the seed and orphan
|
|
206
207
|
* the identity, and must never be the migration path. The fresh
|
|
207
208
|
* `issuanceDate` ranks the re-issued credential ahead of the legacy one, so
|
|
208
209
|
* subsequent connects match it directly.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appKey.d.ts","sourceRoot":"","sources":["../../src/request/appKey.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appKey.d.ts","sourceRoot":"","sources":["../../src/request/appKey.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAMzE,OAAO,EAAE,cAAc,IAAI,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAExE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAShD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,YAAY,CAAA;AAIzC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,qBAAqB,CAAA;AAEzD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,E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E,MAAM,CAAA;CACf,GAAG,OAAO,CAAC;IAAE,UAAU,EAAE,qBAAqB,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAWrE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,0BAA0B,CAAC,EAC/C,WAAW,EACX,MAAM,EACP,EAAE;IACD,WAAW,EAAE,qBAAqB,EAAE,CAAA;IACpC,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAwB7C;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,uBAAuB,CAAC,EAC5C,UAAU,EACV,GAAG,EACH,MAAM,EACP,EAAE;IACD,UAAU,EAAE,qBAAqB,CAAA;IACjC,GAAG,EAAE,cAAc,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC;IAAE,UAAU,EAAE,qBAAqB,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAwBrE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,qBAAqB,GAChC,MAAM,GAAG,SAAS,CAEpB;AA4BD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,qBAAqB,GAChC,MAAM,GAAG,SAAS,CAMpB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,qBAAqB,GAChC,MAAM,GAAG,SAAS,CAMpB"}
|
package/dist/request/appKey.js
CHANGED
|
@@ -17,17 +17,19 @@
|
|
|
17
17
|
*
|
|
18
18
|
* Ported from Freewallet's `src/lib/appKey.ts`, migrated from the
|
|
19
19
|
* `credentialType` / `vocabBase` model to the App Connect spec's `appUrl`
|
|
20
|
-
* model: the type array is a fixed two-entry list, the
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* See the App Connect spec's
|
|
24
|
-
* shape, matching, and minting
|
|
20
|
+
* model: the type array is a fixed two-entry list, the `@context` is the VC
|
|
21
|
+
* 1.1 context URL followed by the hosted App Connect context URL (identical
|
|
22
|
+
* for every application), and which application a credential belongs to is a
|
|
23
|
+
* claim (`credentialSubject.appUrl`), not a type. See the App Connect spec's
|
|
24
|
+
* App Key Credential section for the normative shape, matching, and minting
|
|
25
|
+
* rules this module implements.
|
|
25
26
|
*/
|
|
26
27
|
import * as vc from '@interop/vc';
|
|
27
28
|
import { base64urlnopad } from '@scure/base';
|
|
28
29
|
import { CapabilityAgent } from '@interop/webkms-client';
|
|
29
30
|
import { Ed25519Signature2020 } from '@interop/ed25519-signature';
|
|
30
31
|
import { issuerId, subjectId, typeArray } from '@interop/data-integrity-core/guards';
|
|
32
|
+
import { CONTEXT_URL_V1 as APP_CONNECT_CONTEXT_URL } from 'byoe-context';
|
|
31
33
|
import { documentLoader } from './composeVp.js';
|
|
32
34
|
/**
|
|
33
35
|
* The semantic `handle` mixed into seed derivation. It identifies the agent
|
|
@@ -68,21 +70,13 @@ export const APP_KEY_TYPE_ARRAY = Object.freeze([
|
|
|
68
70
|
APP_KEY_CREDENTIAL_TYPE
|
|
69
71
|
]);
|
|
70
72
|
/**
|
|
71
|
-
* The
|
|
73
|
+
* The hosted App Connect context URL every app-key credential carries as the
|
|
72
74
|
* second entry of its `@context` array (after the VC 1.1 context URL). The
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
75
|
+
* context document defines the profile's BYOE terms; document loaders resolve
|
|
76
|
+
* it from the bundled `byoe-context` document, so no fetch happens at sign or
|
|
77
|
+
* verification time.
|
|
76
78
|
*/
|
|
77
|
-
export
|
|
78
|
-
'@protected': true,
|
|
79
|
-
AppKeyCredential: 'https://w3id.org/byoe#AppKeyCredential',
|
|
80
|
-
appUrl: 'https://w3id.org/byoe#appUrl',
|
|
81
|
-
seed: 'https://w3id.org/byoe#seed',
|
|
82
|
-
origin: 'https://w3id.org/byoe#origin',
|
|
83
|
-
name: 'https://schema.org/name',
|
|
84
|
-
description: 'https://schema.org/description'
|
|
85
|
-
});
|
|
79
|
+
export { APP_CONNECT_CONTEXT_URL };
|
|
86
80
|
/**
|
|
87
81
|
* The number of random bytes in an app-key seed.
|
|
88
82
|
*/
|
|
@@ -291,8 +285,8 @@ export async function findAppKeyCredential({ credentials, appUrl, origin }) {
|
|
|
291
285
|
}
|
|
292
286
|
/**
|
|
293
287
|
* Assembles and signs an app-key credential for a seed the caller supplies:
|
|
294
|
-
* the fixed two-entry type array, the
|
|
295
|
-
* subject both the seed-derived DID, and the `seed` / `appUrl` / `origin`
|
|
288
|
+
* the fixed two-entry type array, the hosted App Connect context URL, issuer
|
|
289
|
+
* and subject both the seed-derived DID, and the `seed` / `appUrl` / `origin`
|
|
296
290
|
* claims. `vc.issue` auto-fills `issuanceDate` in the canonical UTC form the
|
|
297
291
|
* ranking expects. Shared by the fresh mint and the legacy re-issue.
|
|
298
292
|
*/
|
|
@@ -304,7 +298,7 @@ async function issueAppKeyCredential({ seedBytes, appName, appUrl, origin, descr
|
|
|
304
298
|
});
|
|
305
299
|
const controllerDid = agent.id;
|
|
306
300
|
const credential = {
|
|
307
|
-
'@context': [VC_1_CONTEXT_URL,
|
|
301
|
+
'@context': [VC_1_CONTEXT_URL, APP_CONNECT_CONTEXT_URL],
|
|
308
302
|
id: `urn:uuid:${crypto.randomUUID()}`,
|
|
309
303
|
type: [...APP_KEY_TYPE_ARRAY],
|
|
310
304
|
name: `${appName} app key`,
|
|
@@ -395,8 +389,8 @@ export async function findLegacyAppKeyCredential({ credentials, origin }) {
|
|
|
395
389
|
* Re-issues a legacy app-key credential in place under the `appUrl` model:
|
|
396
390
|
* the same seed (so the same derived DID -- the app's identity and its
|
|
397
391
|
* encrypted-data access are preserved), the fixed two-entry type array, the
|
|
398
|
-
*
|
|
399
|
-
* the validated request value. A fresh mint would roll the seed and orphan
|
|
392
|
+
* hosted App Connect context URL, and the `credentialSubject.appUrl` claim set
|
|
393
|
+
* from the validated request value. A fresh mint would roll the seed and orphan
|
|
400
394
|
* the identity, and must never be the migration path. The fresh
|
|
401
395
|
* `issuanceDate` ranks the re-issued credential ahead of the legacy one, so
|
|
402
396
|
* subsequent connects match it directly.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appKey.js","sourceRoot":"","sources":["../../src/request/appKey.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"appKey.js","sourceRoot":"","sources":["../../src/request/appKey.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,EACL,QAAQ,EACR,SAAS,EACT,SAAS,EACV,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,cAAc,IAAI,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAG/C;;;;GAIG;AACH,MAAM,cAAc,GAAG,oBAAoB,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAA;AAEzC,MAAM,gBAAgB,GAAG,wCAAwC,CAAA;AAEjE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,kBAAkB,CAAA;AAEzD;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB,MAAM,CAAC,MAAM,CAAC;IACjE,sBAAsB;IACtB,uBAAuB;CACxB,CAAC,CAAA;AAEF;;;;;;GAMG;AACH,OAAO,EAAE,uBAAuB,EAAE,CAAA;AAElC;;GAEG;AACH,MAAM,gBAAgB,GAAG,EAAE,CAAA;AAE3B;;;;;;;G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