@interop/wallet-core 0.65.0 → 0.67.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 +12 -8
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +5 -4
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +32 -50
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
- package/dist/clientAnnex/establish.d.ts +112 -21
- package/dist/clientAnnex/establish.d.ts.map +1 -1
- package/dist/clientAnnex/establish.js +248 -180
- package/dist/clientAnnex/establish.js.map +1 -1
- package/dist/clientAnnex/forget.d.ts +2 -6
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +31 -61
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +48 -132
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +88 -221
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/gc.d.ts.map +1 -1
- package/dist/clientAnnex/gc.js +9 -0
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/heal.d.ts +97 -13
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +108 -174
- package/dist/clientAnnex/heal.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +8 -8
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +6 -6
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladder.d.ts +51 -4
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +310 -55
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +37 -3
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +69 -34
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +148 -72
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +211 -137
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/mend.d.ts.map +1 -1
- package/dist/clientAnnex/mend.js +63 -81
- package/dist/clientAnnex/mend.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +20 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +77 -294
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/rosterDeliveredEpochs.d.ts +13 -5
- package/dist/clientAnnex/rosterDeliveredEpochs.d.ts.map +1 -1
- package/dist/clientAnnex/rosterDeliveredEpochs.js +18 -9
- package/dist/clientAnnex/rosterDeliveredEpochs.js.map +1 -1
- package/dist/clientAnnex/selfEnroll.js +1 -1
- package/dist/clientAnnex/selfEnroll.js.map +1 -1
- package/dist/clientAnnex/zcap.d.ts +19 -0
- package/dist/clientAnnex/zcap.d.ts.map +1 -1
- package/dist/clientAnnex/zcap.js +80 -12
- package/dist/clientAnnex/zcap.js.map +1 -1
- package/dist/clients/index.d.ts +3 -2
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +3 -2
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js +33 -15
- package/dist/clients/listing.js.map +1 -1
- package/dist/clients/policy.d.ts +18 -0
- package/dist/clients/policy.d.ts.map +1 -1
- package/dist/clients/policy.js +22 -8
- package/dist/clients/policy.js.map +1 -1
- package/dist/clients/revocation.d.ts +18 -30
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +12 -27
- package/dist/clients/revocation.js.map +1 -1
- package/dist/clients/rosterPolicy.d.ts +6 -1
- package/dist/clients/rosterPolicy.d.ts.map +1 -1
- package/dist/clients/rosterPolicy.js +27 -30
- package/dist/clients/rosterPolicy.js.map +1 -1
- package/dist/descriptors/errors.d.ts +6 -5
- package/dist/descriptors/errors.d.ts.map +1 -1
- package/dist/descriptors/errors.js +6 -5
- package/dist/descriptors/errors.js.map +1 -1
- package/dist/descriptors/index.d.ts +7 -3
- package/dist/descriptors/index.d.ts.map +1 -1
- package/dist/descriptors/index.js +7 -3
- package/dist/descriptors/index.js.map +1 -1
- package/dist/descriptors/logSource.d.ts +28 -6
- package/dist/descriptors/logSource.d.ts.map +1 -1
- package/dist/descriptors/logSource.js +33 -7
- package/dist/descriptors/logSource.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +3 -7
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +8 -10
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +39 -41
- package/dist/genesis/accountGenesis.js.map +1 -1
- package/dist/genesis/kmsAuthentication.d.ts +50 -0
- package/dist/genesis/kmsAuthentication.d.ts.map +1 -0
- package/dist/genesis/kmsAuthentication.js +49 -0
- package/dist/genesis/kmsAuthentication.js.map +1 -0
- package/dist/keyring/kdf.d.ts +16 -20
- package/dist/keyring/kdf.d.ts.map +1 -1
- package/dist/keyring/kdf.js +2 -2
- package/dist/keyring/kdf.js.map +1 -1
- package/dist/keyring/unlockSpace.d.ts +8 -30
- package/dist/keyring/unlockSpace.d.ts.map +1 -1
- package/dist/keyring/unlockSpace.js +8 -31
- package/dist/keyring/unlockSpace.js.map +1 -1
- package/dist/keys/clientKeyRecord.d.ts +2 -1
- package/dist/keys/clientKeyRecord.d.ts.map +1 -1
- package/dist/keys/clientKeyRecord.js +28 -11
- package/dist/keys/clientKeyRecord.js.map +1 -1
- package/dist/keys/index.d.ts +19 -5
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +17 -3
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts +3 -1
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +20 -8
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts +92 -3
- package/dist/keys/spaceEpochs.d.ts.map +1 -1
- package/dist/keys/spaceEpochs.js +110 -4
- package/dist/keys/spaceEpochs.js.map +1 -1
- package/dist/keys/userKeyCascade.d.ts +8 -5
- package/dist/keys/userKeyCascade.d.ts.map +1 -1
- package/dist/keys/userKeyCascade.js +7 -6
- package/dist/keys/userKeyCascade.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +68 -4
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +146 -33
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/keys/userKeyRosterCascade.d.ts +110 -10
- package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
- package/dist/keys/userKeyRosterCascade.js +184 -40
- package/dist/keys/userKeyRosterCascade.js.map +1 -1
- package/dist/recovery/continuation.d.ts +255 -0
- package/dist/recovery/continuation.d.ts.map +1 -0
- package/dist/recovery/continuation.js +471 -0
- package/dist/recovery/continuation.js.map +1 -0
- package/dist/recovery/index.d.ts +12 -8
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +11 -7
- package/dist/recovery/index.js.map +1 -1
- package/dist/recovery/recoveryDelegation.d.ts +40 -120
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +36 -268
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +42 -83
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +44 -380
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/request/appKey.d.ts +35 -1
- package/dist/request/appKey.d.ts.map +1 -1
- package/dist/request/appKey.js +29 -10
- package/dist/request/appKey.js.map +1 -1
- package/dist/request/classify.d.ts +3 -14
- package/dist/request/classify.d.ts.map +1 -1
- package/dist/request/classify.js +19 -40
- package/dist/request/classify.js.map +1 -1
- package/dist/request/index.d.ts +1 -0
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +1 -0
- package/dist/request/index.js.map +1 -1
- package/dist/request/onboarding.d.ts.map +1 -1
- package/dist/request/onboarding.js +19 -27
- package/dist/request/onboarding.js.map +1 -1
- package/dist/request/parse.d.ts +5 -3
- package/dist/request/parse.d.ts.map +1 -1
- package/dist/request/parse.js +7 -6
- package/dist/request/parse.js.map +1 -1
- package/dist/request/processRequest.d.ts.map +1 -1
- package/dist/request/processRequest.js +2 -1
- package/dist/request/processRequest.js.map +1 -1
- package/dist/request/queryPredicates.d.ts +98 -0
- package/dist/request/queryPredicates.d.ts.map +1 -0
- package/dist/request/queryPredicates.js +107 -0
- package/dist/request/queryPredicates.js.map +1 -0
- package/dist/resourceLog/document.d.ts +39 -0
- package/dist/resourceLog/document.d.ts.map +1 -1
- package/dist/resourceLog/document.js +41 -0
- package/dist/resourceLog/document.js.map +1 -1
- package/dist/resourceLog/ladderRungs.d.ts.map +1 -1
- package/dist/resourceLog/ladderRungs.js +3 -2
- package/dist/resourceLog/ladderRungs.js.map +1 -1
- package/dist/sync/contactsConflict.d.ts.map +1 -1
- package/dist/sync/contactsConflict.js +8 -2
- package/dist/sync/contactsConflict.js.map +1 -1
- package/dist/sync/engine.d.ts +38 -23
- package/dist/sync/engine.d.ts.map +1 -1
- package/dist/sync/engine.js +36 -5
- package/dist/sync/engine.js.map +1 -1
- package/dist/sync/index.d.ts +9 -12
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +8 -11
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/push.d.ts.map +1 -1
- package/dist/sync/push.js +1 -2
- package/dist/sync/push.js.map +1 -1
- package/dist/sync/remint.d.ts +0 -31
- package/dist/sync/remint.d.ts.map +1 -1
- package/dist/sync/remint.js +32 -1
- package/dist/sync/remint.js.map +1 -1
- package/dist/sync/types.d.ts +4 -41
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/sync/types.js +4 -47
- package/dist/sync/types.js.map +1 -1
- package/dist/unlock/index.d.ts +1 -1
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +1 -1
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +16 -56
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +7 -76
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +20 -40
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +35 -76
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/unlock/unlockRecord.d.ts.map +1 -1
- package/dist/unlock/unlockRecord.js +69 -44
- package/dist/unlock/unlockRecord.js.map +1 -1
- package/dist/webvh/accountEntry.d.ts +63 -7
- package/dist/webvh/accountEntry.d.ts.map +1 -1
- package/dist/webvh/accountEntry.js +110 -19
- package/dist/webvh/accountEntry.js.map +1 -1
- package/dist/webvh/delegatedLogStore.d.ts +18 -12
- package/dist/webvh/delegatedLogStore.d.ts.map +1 -1
- package/dist/webvh/delegatedLogStore.js +32 -11
- package/dist/webvh/delegatedLogStore.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +39 -23
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +63 -45
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/enrollClient.d.ts.map +1 -1
- package/dist/webvh/enrollClient.js +19 -23
- package/dist/webvh/enrollClient.js.map +1 -1
- package/dist/webvh/index.d.ts +11 -7
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +9 -6
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +102 -65
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/mergeMethods.d.ts +84 -0
- package/dist/webvh/mergeMethods.d.ts.map +1 -0
- package/dist/webvh/mergeMethods.js +46 -0
- package/dist/webvh/mergeMethods.js.map +1 -0
- package/dist/webvh/revokeClient.d.ts +12 -2
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +126 -48
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts +21 -0
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +36 -14
- package/dist/webvh/verifyLog.js.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKeyCascade.d.ts","sourceRoot":"","sources":["../../src/keys/userKeyCascade.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"userKeyCascade.d.ts","sourceRoot":"","sources":["../../src/keys/userKeyCascade.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAML,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAA;AAGhC,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,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-client/edv';
|
|
2
2
|
import { isSealableDescriptorStore } from './rosterLogStore.js';
|
|
3
|
+
import { currentEpochOf } from './userKeyRoster.js';
|
|
3
4
|
import { userKeyVaultKeys } from './userKey.js';
|
|
4
5
|
/**
|
|
5
6
|
* A user key presented as an epoch-roster recipient: the kid is the
|
|
@@ -83,6 +84,8 @@ export async function unwrapUserKeyGenerations({ descriptor, clientKeyAgreementK
|
|
|
83
84
|
* @param options.generations {UserKey[]} every roster generation this client
|
|
84
85
|
* could unwrap ({@link unwrapUserKeyGenerations}), oldest first
|
|
85
86
|
* @returns {Promise<CollectionUserKeyRotationOutcome>}
|
|
87
|
+
* @throws {UserKeyRosterIntegrityError} the descriptor's `currentEpoch`
|
|
88
|
+
* names no epoch in its own list
|
|
86
89
|
*/
|
|
87
90
|
export async function rotateCollectionEpochsToUserKey({ store, userKey, generations }) {
|
|
88
91
|
const current = await store.read();
|
|
@@ -97,12 +100,10 @@ export async function rotateCollectionEpochsToUserKey({ store, userKey, generati
|
|
|
97
100
|
'epoch-less descriptor can only come from a tampering or ' +
|
|
98
101
|
'pre-provisioning host; refusing to rotate it.');
|
|
99
102
|
}
|
|
100
|
-
const currentEpoch =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
'refusing to evaluate it against any other epoch.');
|
|
105
|
-
}
|
|
103
|
+
const currentEpoch = currentEpochOf({
|
|
104
|
+
descriptor,
|
|
105
|
+
label: 'The collection descriptor'
|
|
106
|
+
});
|
|
106
107
|
const currentKids = new Set(currentEpoch.recipients.map(entry => entry.header.kid));
|
|
107
108
|
const staleKids = staleGenerations
|
|
108
109
|
.map(generation => epochKeyIdFor(generation.id))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKeyCascade.js","sourceRoot":"","sources":["../../src/keys/userKeyCascade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"userKeyCascade.js","sourceRoot":"","sources":["../../src/keys/userKeyCascade.ts"],"names":[],"mappings":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OAAO,EAQR;IACC,MAAM,WAAW,GAAG,MAAM,wBAAwB,CAAC;QACjD,UAAU,EAAE,gBAAgB;QAC5B,qBAAqB;KACtB,CAAC,CAAA;IACF,MAAM,QAAQ,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"}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* clients, against log-verified keys.
|
|
49
49
|
*/
|
|
50
50
|
import type { IKeyAgreementKey } from '@interop/data-integrity-core';
|
|
51
|
-
import type { CollectionEncryption } from '@interop/was-client';
|
|
51
|
+
import type { CollectionEncryption, CollectionEncryptionEpoch } from '@interop/was-client';
|
|
52
52
|
import { type EncryptionDescriptorStore, type RecipientPublicKey } from '@interop/was-client/edv';
|
|
53
53
|
import { type ResourceLogSigner } from '@interop/vh-resource-log';
|
|
54
54
|
import type { KeyAgreementDocument } from '../resourceLog/document.js';
|
|
@@ -63,6 +63,41 @@ import type { UserKey } from './userKey.js';
|
|
|
63
63
|
export declare class UserKeyRosterIntegrityError extends Error {
|
|
64
64
|
constructor(message: string);
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Resolves a descriptor's current epoch, refusing a descriptor whose
|
|
68
|
+
* `currentEpoch` names no epoch in its own list -- the shape no enrolled
|
|
69
|
+
* client authenticated. Every site that resolves a current epoch goes
|
|
70
|
+
* through here, so the refusal has one implementation and one class.
|
|
71
|
+
*
|
|
72
|
+
* @param options {object}
|
|
73
|
+
* @param options.descriptor {CollectionEncryption}
|
|
74
|
+
* @param options.label {string} names the descriptor in the refusal, e.g.
|
|
75
|
+
* 'The user key roster' or 'The collection descriptor'
|
|
76
|
+
* @returns {CollectionEncryptionEpoch} the current epoch
|
|
77
|
+
* @throws {UserKeyRosterIntegrityError}
|
|
78
|
+
*/
|
|
79
|
+
export declare function currentEpochOf({ descriptor, label }: {
|
|
80
|
+
descriptor: CollectionEncryption;
|
|
81
|
+
label: string;
|
|
82
|
+
}): CollectionEncryptionEpoch;
|
|
83
|
+
/**
|
|
84
|
+
* Whether a roster's CURRENT epoch wraps to the named recipient -- the probe
|
|
85
|
+
* the enrollment wrap asks before adding, and the recipient-retiring cascade
|
|
86
|
+
* tail asks before rotating (a recipient with no current-epoch wrap has
|
|
87
|
+
* nothing to rotate off). Resolves the current epoch through
|
|
88
|
+
* {@link currentEpochOf}, so a roster whose `currentEpoch` names no epoch in
|
|
89
|
+
* its own list is refused rather than read as "not wrapped".
|
|
90
|
+
*
|
|
91
|
+
* @param options {object}
|
|
92
|
+
* @param options.descriptor {CollectionEncryption} the roster descriptor
|
|
93
|
+
* @param options.recipientId {string} the roster kid
|
|
94
|
+
* @returns {boolean}
|
|
95
|
+
* @throws {UserKeyRosterIntegrityError}
|
|
96
|
+
*/
|
|
97
|
+
export declare function rosterWrapsRecipient({ descriptor, recipientId }: {
|
|
98
|
+
descriptor: CollectionEncryption;
|
|
99
|
+
recipientId: string;
|
|
100
|
+
}): boolean;
|
|
66
101
|
/**
|
|
67
102
|
* Thrown when a served roster conflicts with the locally pinned latest-seen
|
|
68
103
|
* epoch -- the epochs list no longer contains the pinned epoch, or
|
|
@@ -180,6 +215,11 @@ export declare function ensureUserKeyRoster({ store, userKey, clientKeyAgreement
|
|
|
180
215
|
userKey: UserKey;
|
|
181
216
|
clientKeyAgreementKey: IKeyAgreementKey;
|
|
182
217
|
}): Promise<CollectionEncryption>;
|
|
218
|
+
/**
|
|
219
|
+
* What a descriptor store's `read()` resolves to when the descriptor exists:
|
|
220
|
+
* the descriptor and the compare-and-swap validator it was served under.
|
|
221
|
+
*/
|
|
222
|
+
export type DescriptorStoreRead = NonNullable<Awaited<ReturnType<EncryptionDescriptorStore['read']>>>;
|
|
183
223
|
/**
|
|
184
224
|
* Wraps the user key to a client being enrolled -- the roster half of the
|
|
185
225
|
* enrollment ceremony, and deliberately its FIRST write (decryption material
|
|
@@ -205,6 +245,8 @@ export declare function ensureUserKeyRoster({ store, userKey, clientKeyAgreement
|
|
|
205
245
|
* client's own (identity) key-agreement key, unwrapping each epoch for
|
|
206
246
|
* re-wrapping
|
|
207
247
|
* @returns {Promise<CollectionEncryption>} the refreshed roster descriptor
|
|
248
|
+
* @throws {UserKeyRosterIntegrityError} the descriptor's `currentEpoch`
|
|
249
|
+
* names no epoch in its own list
|
|
208
250
|
*/
|
|
209
251
|
export declare function addUserKeyRosterRecipient({ store, recipient, ownerKeyAgreementKey }: {
|
|
210
252
|
store: EncryptionDescriptorStore;
|
|
@@ -230,12 +272,17 @@ export declare function addUserKeyRosterRecipient({ store, recipient, ownerKeyAg
|
|
|
230
272
|
* did:webvh document, AFTER the removal edit
|
|
231
273
|
* @param options.retireRecipientId {string} the removed recipient's roster
|
|
232
274
|
* kid
|
|
275
|
+
* @param [options.current] {DescriptorStoreRead} a read the caller has just
|
|
276
|
+
* performed on this same store instance, seeding the rotation's
|
|
277
|
+
* compare-and-swap so the roster is not acquired a second time; a lost
|
|
278
|
+
* compare-and-swap re-reads the store as usual
|
|
233
279
|
* @returns {Promise<CollectionEncryption>} the rotated roster descriptor
|
|
234
280
|
*/
|
|
235
|
-
export declare function rotateUserKeyRoster({ store, document, retireRecipientId }: {
|
|
281
|
+
export declare function rotateUserKeyRoster({ store, document, retireRecipientId, current }: {
|
|
236
282
|
store: EncryptionDescriptorStore;
|
|
237
283
|
document: KeyAgreementDocument;
|
|
238
284
|
retireRecipientId: string;
|
|
285
|
+
current?: DescriptorStoreRead;
|
|
239
286
|
}): Promise<CollectionEncryption>;
|
|
240
287
|
/**
|
|
241
288
|
* Rotates the roster off one or more recipients while escrowing incoming ones,
|
|
@@ -272,14 +319,18 @@ export declare function rotateUserKeyRoster({ store, document, retireRecipientId
|
|
|
272
319
|
* @param options.ownerKeyAgreementKey {IKeyAgreementKey} a key-agreement key
|
|
273
320
|
* holding a wrap in every epoch (the spent code's qualifies), unwrapping
|
|
274
321
|
* each epoch for the escrow
|
|
322
|
+
* @param [options.current] {DescriptorStoreRead} a read the caller has just
|
|
323
|
+
* performed on this same store instance, seeding the compare-and-swap (see
|
|
324
|
+
* {@link rotateUserKeyRoster})
|
|
275
325
|
* @returns {Promise<CollectionEncryption>} the rotated roster descriptor
|
|
276
326
|
*/
|
|
277
|
-
export declare function replaceUserKeyRosterRecipients({ store, document, retireRecipientIds, recipients, ownerKeyAgreementKey }: {
|
|
327
|
+
export declare function replaceUserKeyRosterRecipients({ store, document, retireRecipientIds, recipients, ownerKeyAgreementKey, current }: {
|
|
278
328
|
store: EncryptionDescriptorStore;
|
|
279
329
|
document: KeyAgreementDocument;
|
|
280
330
|
retireRecipientIds: string[];
|
|
281
331
|
recipients: RecipientPublicKey[];
|
|
282
332
|
ownerKeyAgreementKey: IKeyAgreementKey;
|
|
333
|
+
current?: DescriptorStoreRead;
|
|
283
334
|
}): Promise<CollectionEncryption>;
|
|
284
335
|
/**
|
|
285
336
|
* The current epoch's recipient kids minus the ones to keep -- what a
|
|
@@ -385,6 +436,10 @@ export declare function enrolledClientRosterRecipients({ document }: {
|
|
|
385
436
|
* @param [options.descriptor] {CollectionEncryption} a descriptor the caller
|
|
386
437
|
* has just read (a login-time roster read), to save a re-read; omitted, the
|
|
387
438
|
* roster is read fresh
|
|
439
|
+
* @param [options.etag] {string} the validator that same read was served
|
|
440
|
+
* under, when it was a read on this same store instance moments ago; with
|
|
441
|
+
* it, the write this call may make is seeded from that read rather than
|
|
442
|
+
* re-acquiring the roster
|
|
388
443
|
* @param [options.ownerKeyAgreementKey] {IKeyAgreementKey} a key-agreement
|
|
389
444
|
* key holding a wrap in every epoch, unwrapping each one for the escrow
|
|
390
445
|
* direction; omitted, only the retire direction runs
|
|
@@ -392,10 +447,11 @@ export declare function enrolledClientRosterRecipients({ document }: {
|
|
|
392
447
|
* stale recipient kids found, the kids escrowed, and the roster descriptor
|
|
393
448
|
* as it now stands (`null` when the account has no roster yet)
|
|
394
449
|
*/
|
|
395
|
-
export declare function convergeUserKeyRosterToDocument({ store, document, descriptor, ownerKeyAgreementKey }: {
|
|
450
|
+
export declare function convergeUserKeyRosterToDocument({ store, document, descriptor, etag, ownerKeyAgreementKey }: {
|
|
396
451
|
store: EncryptionDescriptorStore;
|
|
397
452
|
document: KeyAgreementDocument;
|
|
398
453
|
descriptor?: CollectionEncryption;
|
|
454
|
+
etag?: string;
|
|
399
455
|
ownerKeyAgreementKey?: IKeyAgreementKey;
|
|
400
456
|
}): Promise<{
|
|
401
457
|
rotated: boolean;
|
|
@@ -414,6 +470,14 @@ export interface UserKeyRosterReadResult {
|
|
|
414
470
|
userKey: UserKey;
|
|
415
471
|
rotated: boolean;
|
|
416
472
|
latestEpochId: string;
|
|
473
|
+
/**
|
|
474
|
+
* The validator the store served `descriptor` under, when this read
|
|
475
|
+
* fetched it itself and the store offered one: what a later write on the
|
|
476
|
+
* same store instance may seed its compare-and-swap from
|
|
477
|
+
* (`convergeUserKeyRosterToDocument`'s `etag`). Absent on a read built on a
|
|
478
|
+
* threaded descriptor.
|
|
479
|
+
*/
|
|
480
|
+
etag?: string;
|
|
417
481
|
}
|
|
418
482
|
/**
|
|
419
483
|
* Reads and authenticates the roster -- the direct read at login and on epoch
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKeyRoster.d.ts","sourceRoot":"","sources":["../../src/keys/userKeyRoster.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"userKeyRoster.d.ts","sourceRoot":"","sources":["../../src/keys/userKeyRoster.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EACV,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAOL,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAO/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C;;;;;GAKG;AACH,qBAAa,2BAA4B,SAAQ,KAAK;gBACxC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,KAAK,EACN,EAAE;IACD,UAAU,EAAE,oBAAoB,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,yBAAyB,CAU5B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC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C,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;AACpC,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,KAAK,EAAE,yBAAyB,CAAA;IAChC,UAAU,CAAC,EAAE,oBAAoB,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,qBAAqB,EAAE,gBAAgB,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAA"}
|
|
@@ -15,6 +15,46 @@ export class UserKeyRosterIntegrityError extends Error {
|
|
|
15
15
|
this.name = 'UserKeyRosterIntegrityError';
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Resolves a descriptor's current epoch, refusing a descriptor whose
|
|
20
|
+
* `currentEpoch` names no epoch in its own list -- the shape no enrolled
|
|
21
|
+
* client authenticated. Every site that resolves a current epoch goes
|
|
22
|
+
* through here, so the refusal has one implementation and one class.
|
|
23
|
+
*
|
|
24
|
+
* @param options {object}
|
|
25
|
+
* @param options.descriptor {CollectionEncryption}
|
|
26
|
+
* @param options.label {string} names the descriptor in the refusal, e.g.
|
|
27
|
+
* 'The user key roster' or 'The collection descriptor'
|
|
28
|
+
* @returns {CollectionEncryptionEpoch} the current epoch
|
|
29
|
+
* @throws {UserKeyRosterIntegrityError}
|
|
30
|
+
*/
|
|
31
|
+
export function currentEpochOf({ descriptor, label }) {
|
|
32
|
+
const currentEpoch = (descriptor.epochs ?? []).find(epoch => epoch.id === descriptor.currentEpoch);
|
|
33
|
+
if (!currentEpoch) {
|
|
34
|
+
throw new UserKeyRosterIntegrityError(`${label} names no current epoch in its own epoch list.`);
|
|
35
|
+
}
|
|
36
|
+
return currentEpoch;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Whether a roster's CURRENT epoch wraps to the named recipient -- the probe
|
|
40
|
+
* the enrollment wrap asks before adding, and the recipient-retiring cascade
|
|
41
|
+
* tail asks before rotating (a recipient with no current-epoch wrap has
|
|
42
|
+
* nothing to rotate off). Resolves the current epoch through
|
|
43
|
+
* {@link currentEpochOf}, so a roster whose `currentEpoch` names no epoch in
|
|
44
|
+
* its own list is refused rather than read as "not wrapped".
|
|
45
|
+
*
|
|
46
|
+
* @param options {object}
|
|
47
|
+
* @param options.descriptor {CollectionEncryption} the roster descriptor
|
|
48
|
+
* @param options.recipientId {string} the roster kid
|
|
49
|
+
* @returns {boolean}
|
|
50
|
+
* @throws {UserKeyRosterIntegrityError}
|
|
51
|
+
*/
|
|
52
|
+
export function rosterWrapsRecipient({ descriptor, recipientId }) {
|
|
53
|
+
return currentEpochOf({
|
|
54
|
+
descriptor,
|
|
55
|
+
label: 'The user key roster'
|
|
56
|
+
}).recipients.some(entry => entry.header.kid === recipientId);
|
|
57
|
+
}
|
|
18
58
|
/**
|
|
19
59
|
* Thrown when a served roster conflicts with the locally pinned latest-seen
|
|
20
60
|
* epoch -- the epochs list no longer contains the pinned epoch, or
|
|
@@ -180,6 +220,53 @@ export async function ensureUserKeyRoster({ store, userKey, clientKeyAgreementKe
|
|
|
180
220
|
epoch: { epochId: userKey.id, secret: userKey.secret }
|
|
181
221
|
});
|
|
182
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* A store whose FIRST read serves a read the caller already performed on the
|
|
225
|
+
* underlying store, and whose every later read goes through to it. was-client's
|
|
226
|
+
* recipient operations open with a read of their own to seed their
|
|
227
|
+
* compare-and-swap, so a caller that has just read the roster to decide --
|
|
228
|
+
* and holds the descriptor and the validator that decision was made on --
|
|
229
|
+
* would otherwise pay a second acquisition (on a log-governed store: another
|
|
230
|
+
* hash-chain walk with per-entry proof and chain-head-pin verification) for
|
|
231
|
+
* the same head. The seed is served exactly once, so a lost compare-and-swap
|
|
232
|
+
* re-reads the real store and rebases as before.
|
|
233
|
+
*
|
|
234
|
+
* The seed must come from the SAME store instance, moments ago, with no
|
|
235
|
+
* write in between: a log-governed store builds its append on the head its
|
|
236
|
+
* own last read verified, and pins it to the validator the seed carries. A
|
|
237
|
+
* seed from anywhere else either loses the compare-and-swap, costing one
|
|
238
|
+
* extra round trip, or -- where the operation finds nothing to write on it --
|
|
239
|
+
* writes nothing, which is what the caller decided on that same read; a
|
|
240
|
+
* stale seed never lands a write on a head it did not see.
|
|
241
|
+
*
|
|
242
|
+
* Only the port's three members are wrapped, so a sealable store's extra
|
|
243
|
+
* members do not travel with the seed -- the wrapper is handed to was-client's
|
|
244
|
+
* loops alone.
|
|
245
|
+
*
|
|
246
|
+
* @param options {object}
|
|
247
|
+
* @param options.store {EncryptionDescriptorStore} the real store
|
|
248
|
+
* @param options.current {DescriptorStoreRead} the read to serve first
|
|
249
|
+
* @returns {EncryptionDescriptorStore}
|
|
250
|
+
*/
|
|
251
|
+
function seededDescriptorStore({ store, current }) {
|
|
252
|
+
let seed = current;
|
|
253
|
+
return {
|
|
254
|
+
async read() {
|
|
255
|
+
if (seed !== undefined) {
|
|
256
|
+
const served = seed;
|
|
257
|
+
seed = undefined;
|
|
258
|
+
return served;
|
|
259
|
+
}
|
|
260
|
+
return store.read();
|
|
261
|
+
},
|
|
262
|
+
replace: (descriptor, options) => store.replace(descriptor, options),
|
|
263
|
+
...(store.create
|
|
264
|
+
? {
|
|
265
|
+
create: (descriptor) => store.create(descriptor)
|
|
266
|
+
}
|
|
267
|
+
: {})
|
|
268
|
+
};
|
|
269
|
+
}
|
|
183
270
|
/**
|
|
184
271
|
* Wraps the user key to a client being enrolled -- the roster half of the
|
|
185
272
|
* enrollment ceremony, and deliberately its FIRST write (decryption material
|
|
@@ -205,6 +292,8 @@ export async function ensureUserKeyRoster({ store, userKey, clientKeyAgreementKe
|
|
|
205
292
|
* client's own (identity) key-agreement key, unwrapping each epoch for
|
|
206
293
|
* re-wrapping
|
|
207
294
|
* @returns {Promise<CollectionEncryption>} the refreshed roster descriptor
|
|
295
|
+
* @throws {UserKeyRosterIntegrityError} the descriptor's `currentEpoch`
|
|
296
|
+
* names no epoch in its own list
|
|
208
297
|
*/
|
|
209
298
|
export async function addUserKeyRosterRecipient({ store, recipient, ownerKeyAgreementKey }) {
|
|
210
299
|
const current = await store.read();
|
|
@@ -213,16 +302,14 @@ export async function addUserKeyRosterRecipient({ store, recipient, ownerKeyAgre
|
|
|
213
302
|
'provisioning before a client can be enrolled.');
|
|
214
303
|
}
|
|
215
304
|
const descriptor = current.descriptor;
|
|
216
|
-
|
|
217
|
-
const wrapped = currentEpoch?.recipients.some(entry => entry.header.kid === recipient.id);
|
|
218
|
-
if (wrapped) {
|
|
305
|
+
if (rosterWrapsRecipient({ descriptor, recipientId: recipient.id })) {
|
|
219
306
|
// A completed (or torn-after-the-wrap) earlier run: addRecipient writes
|
|
220
307
|
// every epoch's wrap in one descriptor write, so the current epoch
|
|
221
308
|
// standing means the escrow set is complete.
|
|
222
309
|
return descriptor;
|
|
223
310
|
}
|
|
224
311
|
return addRecipient({
|
|
225
|
-
store,
|
|
312
|
+
store: seededDescriptorStore({ store, current }),
|
|
226
313
|
recipient,
|
|
227
314
|
owner: { keyAgreementKey: ownerKeyAgreementKey }
|
|
228
315
|
});
|
|
@@ -246,11 +333,15 @@ export async function addUserKeyRosterRecipient({ store, recipient, ownerKeyAgre
|
|
|
246
333
|
* did:webvh document, AFTER the removal edit
|
|
247
334
|
* @param options.retireRecipientId {string} the removed recipient's roster
|
|
248
335
|
* kid
|
|
336
|
+
* @param [options.current] {DescriptorStoreRead} a read the caller has just
|
|
337
|
+
* performed on this same store instance, seeding the rotation's
|
|
338
|
+
* compare-and-swap so the roster is not acquired a second time; a lost
|
|
339
|
+
* compare-and-swap re-reads the store as usual
|
|
249
340
|
* @returns {Promise<CollectionEncryption>} the rotated roster descriptor
|
|
250
341
|
*/
|
|
251
|
-
export async function rotateUserKeyRoster({ store, document, retireRecipientId }) {
|
|
342
|
+
export async function rotateUserKeyRoster({ store, document, retireRecipientId, current }) {
|
|
252
343
|
return removeRecipient({
|
|
253
|
-
store,
|
|
344
|
+
store: current ? seededDescriptorStore({ store, current }) : store,
|
|
254
345
|
recipientId: retireRecipientId,
|
|
255
346
|
resolveRecipientKey: userKeyRosterRecipientResolver({ document }),
|
|
256
347
|
pull: async () => { }
|
|
@@ -290,13 +381,16 @@ const ESCROW_CAS_ATTEMPTS = 3;
|
|
|
290
381
|
* public key-agreement keys; at least one
|
|
291
382
|
* @param options.ownerKeyAgreementKey {IKeyAgreementKey} a key-agreement
|
|
292
383
|
* key holding a wrap in every epoch, unwrapping each one for the escrow
|
|
384
|
+
* @param [options.current] {DescriptorStoreRead} a read the caller has just
|
|
385
|
+
* performed on this same store instance; the first attempt is built on it
|
|
386
|
+
* instead of a read of its own
|
|
293
387
|
* @returns {Promise<CollectionEncryption>} the roster as this write leaves
|
|
294
388
|
* it
|
|
295
389
|
*/
|
|
296
|
-
async function escrowRosterRecipients({ store, recipients, ownerKeyAgreementKey }) {
|
|
390
|
+
async function escrowRosterRecipients({ store, recipients, ownerKeyAgreementKey, current }) {
|
|
297
391
|
let lastError;
|
|
298
392
|
for (let attempt = 0; attempt < ESCROW_CAS_ATTEMPTS; attempt++) {
|
|
299
|
-
const read = await store.read();
|
|
393
|
+
const read = attempt === 0 && current ? current : await store.read();
|
|
300
394
|
if (read === null) {
|
|
301
395
|
throw new UserKeyRosterIntegrityError('The user key roster does not exist; there is nothing to escrow into.');
|
|
302
396
|
}
|
|
@@ -368,11 +462,14 @@ async function escrowRosterRecipients({ store, recipients, ownerKeyAgreementKey
|
|
|
368
462
|
* @param options.ownerKeyAgreementKey {IKeyAgreementKey} a key-agreement key
|
|
369
463
|
* holding a wrap in every epoch (the spent code's qualifies), unwrapping
|
|
370
464
|
* each epoch for the escrow
|
|
465
|
+
* @param [options.current] {DescriptorStoreRead} a read the caller has just
|
|
466
|
+
* performed on this same store instance, seeding the compare-and-swap (see
|
|
467
|
+
* {@link rotateUserKeyRoster})
|
|
371
468
|
* @returns {Promise<CollectionEncryption>} the rotated roster descriptor
|
|
372
469
|
*/
|
|
373
|
-
export async function replaceUserKeyRosterRecipients({ store, document, retireRecipientIds, recipients, ownerKeyAgreementKey }) {
|
|
470
|
+
export async function replaceUserKeyRosterRecipients({ store, document, retireRecipientIds, recipients, ownerKeyAgreementKey, current }) {
|
|
374
471
|
return replaceRecipient({
|
|
375
|
-
store,
|
|
472
|
+
store: current ? seededDescriptorStore({ store, current }) : store,
|
|
376
473
|
retire: retireRecipientIds,
|
|
377
474
|
recipient: recipients,
|
|
378
475
|
owner: { keyAgreementKey: ownerKeyAgreementKey },
|
|
@@ -402,10 +499,10 @@ export async function replaceUserKeyRosterRecipients({ store, document, retireRe
|
|
|
402
499
|
* @returns {string[]} the current epoch's other kids, in epoch order
|
|
403
500
|
*/
|
|
404
501
|
export function rosterRecipientsToRetire({ descriptor, keepRecipientIds }) {
|
|
405
|
-
const currentEpoch = (
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
}
|
|
502
|
+
const currentEpoch = currentEpochOf({
|
|
503
|
+
descriptor,
|
|
504
|
+
label: 'The user key roster'
|
|
505
|
+
});
|
|
409
506
|
const keep = new Set(keepRecipientIds);
|
|
410
507
|
return [
|
|
411
508
|
...new Set(currentEpoch.recipients
|
|
@@ -515,6 +612,10 @@ export function enrolledClientRosterRecipients({ document }) {
|
|
|
515
612
|
* @param [options.descriptor] {CollectionEncryption} a descriptor the caller
|
|
516
613
|
* has just read (a login-time roster read), to save a re-read; omitted, the
|
|
517
614
|
* roster is read fresh
|
|
615
|
+
* @param [options.etag] {string} the validator that same read was served
|
|
616
|
+
* under, when it was a read on this same store instance moments ago; with
|
|
617
|
+
* it, the write this call may make is seeded from that read rather than
|
|
618
|
+
* re-acquiring the roster
|
|
518
619
|
* @param [options.ownerKeyAgreementKey] {IKeyAgreementKey} a key-agreement
|
|
519
620
|
* key holding a wrap in every epoch, unwrapping each one for the escrow
|
|
520
621
|
* direction; omitted, only the retire direction runs
|
|
@@ -522,9 +623,16 @@ export function enrolledClientRosterRecipients({ document }) {
|
|
|
522
623
|
* stale recipient kids found, the kids escrowed, and the roster descriptor
|
|
523
624
|
* as it now stands (`null` when the account has no roster yet)
|
|
524
625
|
*/
|
|
525
|
-
export async function convergeUserKeyRosterToDocument({ store, document, descriptor, ownerKeyAgreementKey }) {
|
|
526
|
-
|
|
527
|
-
|
|
626
|
+
export async function convergeUserKeyRosterToDocument({ store, document, descriptor, etag, ownerKeyAgreementKey }) {
|
|
627
|
+
// The one read this call makes (or was handed): what the decision below is
|
|
628
|
+
// made on, and what seeds the compare-and-swap of whichever write follows,
|
|
629
|
+
// so the roster is acquired once per successful write. A threaded
|
|
630
|
+
// descriptor without its validator decides but cannot seed.
|
|
631
|
+
let current;
|
|
632
|
+
if (descriptor) {
|
|
633
|
+
current = etag !== undefined ? { descriptor, etag } : undefined;
|
|
634
|
+
}
|
|
635
|
+
else {
|
|
528
636
|
const read = await store.read();
|
|
529
637
|
if (read === null) {
|
|
530
638
|
return {
|
|
@@ -534,13 +642,13 @@ export async function convergeUserKeyRosterToDocument({ store, document, descrip
|
|
|
534
642
|
descriptor: null
|
|
535
643
|
};
|
|
536
644
|
}
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
const currentEpochId = roster.currentEpoch;
|
|
540
|
-
const currentEpoch = (roster.epochs ?? []).find(epoch => epoch.id === currentEpochId);
|
|
541
|
-
if (!currentEpoch) {
|
|
542
|
-
throw new UserKeyRosterIntegrityError('The user key roster names no current epoch in its own epoch list.');
|
|
645
|
+
current = read;
|
|
543
646
|
}
|
|
647
|
+
const roster = descriptor ?? current.descriptor;
|
|
648
|
+
const currentEpoch = currentEpochOf({
|
|
649
|
+
descriptor: roster,
|
|
650
|
+
label: 'The user key roster'
|
|
651
|
+
});
|
|
544
652
|
const resolveRecipientKey = userKeyRosterRecipientResolver({ document });
|
|
545
653
|
const staleRecipientIds = [];
|
|
546
654
|
let backed = 0;
|
|
@@ -581,7 +689,8 @@ export async function convergeUserKeyRosterToDocument({ store, document, descrip
|
|
|
581
689
|
const rotated = await rotateUserKeyRoster({
|
|
582
690
|
store,
|
|
583
691
|
document,
|
|
584
|
-
retireRecipientId: staleRecipientIds[0]
|
|
692
|
+
retireRecipientId: staleRecipientIds[0],
|
|
693
|
+
...(current ? { current } : {})
|
|
585
694
|
});
|
|
586
695
|
return {
|
|
587
696
|
rotated: true,
|
|
@@ -601,7 +710,8 @@ export async function convergeUserKeyRosterToDocument({ store, document, descrip
|
|
|
601
710
|
descriptor: await escrowRosterRecipients({
|
|
602
711
|
store,
|
|
603
712
|
recipients: escrow.recipients,
|
|
604
|
-
ownerKeyAgreementKey: escrow.ownerKeyAgreementKey
|
|
713
|
+
ownerKeyAgreementKey: escrow.ownerKeyAgreementKey,
|
|
714
|
+
...(current ? { current } : {})
|
|
605
715
|
})
|
|
606
716
|
};
|
|
607
717
|
}
|
|
@@ -610,7 +720,8 @@ export async function convergeUserKeyRosterToDocument({ store, document, descrip
|
|
|
610
720
|
document,
|
|
611
721
|
retireRecipientIds: staleRecipientIds,
|
|
612
722
|
recipients: escrow.recipients,
|
|
613
|
-
ownerKeyAgreementKey: escrow.ownerKeyAgreementKey
|
|
723
|
+
ownerKeyAgreementKey: escrow.ownerKeyAgreementKey,
|
|
724
|
+
...(current ? { current } : {})
|
|
614
725
|
});
|
|
615
726
|
return {
|
|
616
727
|
// An escrow-only convergence writes wraps without minting an epoch, so
|
|
@@ -623,20 +734,21 @@ export async function convergeUserKeyRosterToDocument({ store, document, descrip
|
|
|
623
734
|
}
|
|
624
735
|
export async function readUserKeyRoster({ store, descriptor: knownDescriptor, userKey, clientKeyAgreementKey, pinnedEpochId }) {
|
|
625
736
|
let descriptor = knownDescriptor;
|
|
737
|
+
let etag;
|
|
626
738
|
if (!descriptor) {
|
|
627
739
|
const current = await store.read();
|
|
628
740
|
if (current === null) {
|
|
629
741
|
return null;
|
|
630
742
|
}
|
|
631
743
|
descriptor = current.descriptor;
|
|
744
|
+
etag = current.etag;
|
|
632
745
|
}
|
|
746
|
+
const currentEpoch = currentEpochOf({
|
|
747
|
+
descriptor,
|
|
748
|
+
label: 'The user key roster'
|
|
749
|
+
});
|
|
633
750
|
const epochIds = (descriptor.epochs ?? []).map(epoch => epoch.id);
|
|
634
|
-
const currentIndex =
|
|
635
|
-
? epochIds.indexOf(descriptor.currentEpoch)
|
|
636
|
-
: -1;
|
|
637
|
-
if (currentIndex === -1) {
|
|
638
|
-
throw new UserKeyRosterIntegrityError('The user key roster names no current epoch in its own epoch list.');
|
|
639
|
-
}
|
|
751
|
+
const currentIndex = epochIds.indexOf(currentEpoch.id);
|
|
640
752
|
if (pinnedEpochId) {
|
|
641
753
|
const pinnedIndex = epochIds.indexOf(pinnedEpochId);
|
|
642
754
|
if (pinnedIndex === -1 || currentIndex < pinnedIndex) {
|
|
@@ -674,7 +786,8 @@ export async function readUserKeyRoster({ store, descriptor: knownDescriptor, us
|
|
|
674
786
|
descriptor,
|
|
675
787
|
userKey: currentUserKey,
|
|
676
788
|
rotated,
|
|
677
|
-
latestEpochId: descriptor.currentEpoch
|
|
789
|
+
latestEpochId: descriptor.currentEpoch,
|
|
790
|
+
...(etag !== undefined ? { etag } : {})
|
|
678
791
|
};
|
|
679
792
|
}
|
|
680
793
|
//# sourceMappingURL=userKeyRoster.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKeyRoster.js","sourceRoot":"","sources":["../../src/keys/userKeyRoster.ts"],"names":[],"mappings":"AAmDA,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EAGlB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,YAAY,EAA0B,MAAM,0BAA0B,CAAA;AAC/E,OAAO,EACL,4BAA4B,EAC5B,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA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