mindoodb 0.0.94 → 0.0.96
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/appendonlystores/network/ClientNetworkContentAddressedStore.d.ts +17 -1
- package/dist/appendonlystores/network/ClientNetworkContentAddressedStore.d.ts.map +1 -1
- package/dist/appendonlystores/network/ClientNetworkContentAddressedStore.js +63 -4
- package/dist/appendonlystores/network/ClientNetworkContentAddressedStore.js.map +1 -1
- package/dist/appendonlystores/network/HttpTransport.d.ts +10 -1
- package/dist/appendonlystores/network/HttpTransport.d.ts.map +1 -1
- package/dist/appendonlystores/network/HttpTransport.js +45 -3
- package/dist/appendonlystores/network/HttpTransport.js.map +1 -1
- package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.d.ts +22 -0
- package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.d.ts.map +1 -1
- package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.js +33 -0
- package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.js.map +1 -1
- package/dist/browser/index.mjs +42 -0
- package/dist/core/BaseMindooDB.d.ts +9 -0
- package/dist/core/BaseMindooDB.d.ts.map +1 -1
- package/dist/core/BaseMindooDB.js +75 -16
- package/dist/core/BaseMindooDB.js.map +1 -1
- package/dist/core/BaseMindooTenant.d.ts +82 -1
- package/dist/core/BaseMindooTenant.d.ts.map +1 -1
- package/dist/core/BaseMindooTenant.js +263 -7
- package/dist/core/BaseMindooTenant.js.map +1 -1
- package/dist/core/BaseMindooTenantDirectory.d.ts +182 -2
- package/dist/core/BaseMindooTenantDirectory.d.ts.map +1 -1
- package/dist/core/BaseMindooTenantDirectory.js +683 -113
- package/dist/core/BaseMindooTenantDirectory.js.map +1 -1
- package/dist/core/BaseMindooTenantFactory.d.ts +30 -0
- package/dist/core/BaseMindooTenantFactory.d.ts.map +1 -1
- package/dist/core/BaseMindooTenantFactory.js +95 -0
- package/dist/core/BaseMindooTenantFactory.js.map +1 -1
- package/dist/core/accesscontrol/DirectoryStateNode.d.ts +45 -0
- package/dist/core/accesscontrol/DirectoryStateNode.d.ts.map +1 -1
- package/dist/core/accesscontrol/DirectoryStateNode.js +58 -0
- package/dist/core/accesscontrol/DirectoryStateNode.js.map +1 -1
- package/dist/core/accesscontrol/adminKeys.d.ts +130 -0
- package/dist/core/accesscontrol/adminKeys.d.ts.map +1 -0
- package/dist/core/accesscontrol/adminKeys.js +164 -0
- package/dist/core/accesscontrol/adminKeys.js.map +1 -0
- package/dist/core/accesscontrol/directoryAdminResolver.d.ts +54 -0
- package/dist/core/accesscontrol/directoryAdminResolver.d.ts.map +1 -0
- package/dist/core/accesscontrol/directoryAdminResolver.js +217 -0
- package/dist/core/accesscontrol/directoryAdminResolver.js.map +1 -0
- package/dist/core/accesscontrol/directoryProjection.d.ts.map +1 -1
- package/dist/core/accesscontrol/directoryProjection.js +25 -0
- package/dist/core/accesscontrol/directoryProjection.js.map +1 -1
- package/dist/core/accesscontrol/grantKeys.d.ts +16 -0
- package/dist/core/accesscontrol/grantKeys.d.ts.map +1 -1
- package/dist/core/accesscontrol/grantKeys.js +37 -0
- package/dist/core/accesscontrol/grantKeys.js.map +1 -1
- package/dist/core/accesscontrol/types.d.ts +11 -2
- package/dist/core/accesscontrol/types.d.ts.map +1 -1
- package/dist/core/accesscontrol/types.js +7 -0
- package/dist/core/accesscontrol/types.js.map +1 -1
- package/dist/core/appendonlystores/network/AuthenticationService.d.ts +7 -0
- package/dist/core/appendonlystores/network/AuthenticationService.d.ts.map +1 -1
- package/dist/core/appendonlystores/network/AuthenticationService.js +33 -0
- package/dist/core/appendonlystores/network/AuthenticationService.js.map +1 -1
- package/dist/core/appendonlystores/network/NetworkTransport.d.ts +16 -1
- package/dist/core/appendonlystores/network/NetworkTransport.d.ts.map +1 -1
- package/dist/core/appendonlystores/network/types.d.ts +13 -0
- package/dist/core/appendonlystores/network/types.d.ts.map +1 -1
- package/dist/core/appendonlystores/network/types.js.map +1 -1
- package/dist/core/builtinDbInvariants.d.ts +18 -2
- package/dist/core/builtinDbInvariants.d.ts.map +1 -1
- package/dist/core/builtinDbInvariants.js +41 -5
- package/dist/core/builtinDbInvariants.js.map +1 -1
- package/dist/core/errors.d.ts +23 -0
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +34 -1
- package/dist/core/errors.js.map +1 -1
- package/dist/core/index.d.ts +7 -4
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +31 -5
- package/dist/core/index.js.map +1 -1
- package/dist/core/indexing/createViewDataProvider.d.ts +10 -1
- package/dist/core/indexing/createViewDataProvider.d.ts.map +1 -1
- package/dist/core/indexing/createViewDataProvider.js +11 -0
- package/dist/core/indexing/createViewDataProvider.js.map +1 -1
- package/dist/core/indexing/summary/DocumentSummaryStore.d.ts +13 -0
- package/dist/core/indexing/summary/DocumentSummaryStore.d.ts.map +1 -1
- package/dist/core/indexing/summary/DocumentSummaryStore.js +46 -5
- package/dist/core/indexing/summary/DocumentSummaryStore.js.map +1 -1
- package/dist/core/indexing/summary/SummaryVirtualViewDataProvider.d.ts +13 -0
- package/dist/core/indexing/summary/SummaryVirtualViewDataProvider.d.ts.map +1 -1
- package/dist/core/indexing/summary/SummaryVirtualViewDataProvider.js +21 -0
- package/dist/core/indexing/summary/SummaryVirtualViewDataProvider.js.map +1 -1
- package/dist/core/indexing/summary/index.d.ts +1 -1
- package/dist/core/indexing/summary/index.d.ts.map +1 -1
- package/dist/core/indexing/summary/index.js +2 -1
- package/dist/core/indexing/summary/index.js.map +1 -1
- package/dist/core/indexing/summary/types.d.ts +28 -0
- package/dist/core/indexing/summary/types.d.ts.map +1 -1
- package/dist/core/indexing/summary/types.js +22 -0
- package/dist/core/indexing/summary/types.js.map +1 -1
- package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.d.ts +19 -0
- package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.js +34 -3
- package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.js.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewFactory.d.ts +7 -0
- package/dist/core/indexing/virtualviews/VirtualViewFactory.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewFactory.js +1 -0
- package/dist/core/indexing/virtualviews/VirtualViewFactory.js.map +1 -1
- package/dist/core/live/LiveChannel.d.ts +41 -0
- package/dist/core/live/LiveChannel.d.ts.map +1 -0
- package/dist/core/live/LiveChannel.js +151 -0
- package/dist/core/live/LiveChannel.js.map +1 -0
- package/dist/core/query/executeQuery.d.ts.map +1 -1
- package/dist/core/query/executeQuery.js +30 -17
- package/dist/core/query/executeQuery.js.map +1 -1
- package/dist/core/query/queryView.d.ts +14 -0
- package/dist/core/query/queryView.d.ts.map +1 -1
- package/dist/core/query/queryView.js +22 -12
- package/dist/core/query/queryView.js.map +1 -1
- package/dist/core/query/types.d.ts +9 -0
- package/dist/core/query/types.d.ts.map +1 -1
- package/dist/core/query/types.js.map +1 -1
- package/dist/core/types.d.ts +193 -6
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/uri/MindooURI.d.ts +1 -1
- package/dist/core/uri/MindooURI.d.ts.map +1 -1
- package/dist/core/uri/MindooURI.js +2 -0
- package/dist/core/uri/MindooURI.js.map +1 -1
- package/dist/core/uri/adminUri.d.ts +52 -0
- package/dist/core/uri/adminUri.d.ts.map +1 -0
- package/dist/core/uri/adminUri.js +100 -0
- package/dist/core/uri/adminUri.js.map +1 -0
- package/dist/core/uri/joinRequestUri.d.ts.map +1 -1
- package/dist/core/uri/joinRequestUri.js +14 -1
- package/dist/core/uri/joinRequestUri.js.map +1 -1
- package/dist/core/userid/index.d.ts +9 -0
- package/dist/core/userid/index.d.ts.map +1 -1
- package/dist/core/userkeys/UserKeyDocument.d.ts +7 -1
- package/dist/core/userkeys/UserKeyDocument.d.ts.map +1 -1
- package/dist/core/userkeys/UserKeyDocument.js +14 -3
- package/dist/core/userkeys/UserKeyDocument.js.map +1 -1
- package/dist/core/userkeys/UserKeyManager.d.ts +95 -4
- package/dist/core/userkeys/UserKeyManager.d.ts.map +1 -1
- package/dist/core/userkeys/UserKeyManager.js +606 -59
- package/dist/core/userkeys/UserKeyManager.js.map +1 -1
- package/dist/core/userkeys/deviceCertificate.d.ts +46 -0
- package/dist/core/userkeys/deviceCertificate.d.ts.map +1 -0
- package/dist/core/userkeys/deviceCertificate.js +86 -0
- package/dist/core/userkeys/deviceCertificate.js.map +1 -0
- package/dist/core/userkeys/generationSignature.d.ts +32 -0
- package/dist/core/userkeys/generationSignature.d.ts.map +1 -0
- package/dist/core/userkeys/generationSignature.js +136 -0
- package/dist/core/userkeys/generationSignature.js.map +1 -0
- package/dist/core/userkeys/generationValidity.d.ts +75 -0
- package/dist/core/userkeys/generationValidity.d.ts.map +1 -0
- package/dist/core/userkeys/generationValidity.js +175 -0
- package/dist/core/userkeys/generationValidity.js.map +1 -0
- package/dist/core/userkeys/index.d.ts +5 -2
- package/dist/core/userkeys/index.d.ts.map +1 -1
- package/dist/core/userkeys/index.js +21 -1
- package/dist/core/userkeys/index.js.map +1 -1
- package/dist/core/userkeys/resolveUserKeyDocument.d.ts +16 -0
- package/dist/core/userkeys/resolveUserKeyDocument.d.ts.map +1 -1
- package/dist/core/userkeys/resolveUserKeyDocument.js +42 -1
- package/dist/core/userkeys/resolveUserKeyDocument.js.map +1 -1
- package/dist/core/userkeys/types.d.ts +26 -0
- package/dist/core/userkeys/types.d.ts.map +1 -1
- package/dist/core/userkeys/types.js +3 -1
- package/dist/core/userkeys/types.js.map +1 -1
- package/dist/core/userkeys/validateUserKeyDocument.d.ts.map +1 -1
- package/dist/core/userkeys/validateUserKeyDocument.js +7 -0
- package/dist/core/userkeys/validateUserKeyDocument.js.map +1 -1
- package/dist/core/utils/idGeneration.d.ts +15 -0
- package/dist/core/utils/idGeneration.d.ts.map +1 -1
- package/dist/core/utils/idGeneration.js +45 -0
- package/dist/core/utils/idGeneration.js.map +1 -1
- package/dist/core/utils/index.d.ts +1 -1
- package/dist/core/utils/index.d.ts.map +1 -1
- package/dist/core/utils/index.js +3 -1
- package/dist/core/utils/index.js.map +1 -1
- package/dist/node/server/MindooDBServer.d.ts.map +1 -1
- package/dist/node/server/MindooDBServer.js +11 -0
- package/dist/node/server/MindooDBServer.js.map +1 -1
- package/dist/server/SyncEventBus.d.ts +22 -0
- package/dist/server/SyncEventBus.d.ts.map +1 -1
- package/dist/server/SyncEventBus.js +21 -0
- package/dist/server/SyncEventBus.js.map +1 -1
- package/dist/server/TenantManager.d.ts +9 -0
- package/dist/server/TenantManager.d.ts.map +1 -1
- package/dist/server/TenantManager.js +101 -1
- package/dist/server/TenantManager.js.map +1 -1
- package/dist/server/http/MindooDBServerCore.d.ts +39 -1
- package/dist/server/http/MindooDBServerCore.d.ts.map +1 -1
- package/dist/server/http/MindooDBServerCore.js +121 -2
- package/dist/server/http/MindooDBServerCore.js.map +1 -1
- package/dist/server/http/types.d.ts +10 -1
- package/dist/server/http/types.d.ts.map +1 -1
- package/dist/server/http/types.js.map +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -1
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MindooTenant, EncryptedPrivateKey, MindooDB, ContentAddressedStore, ContentAddressedStoreFactory, StoreKind, OpenDBOptions, MindooTenantFactory, MindooTenantDirectory, StoreEntryMetadata, SigningKeyPair, JoinRequest, JoinResponse, ApproveJoinRequestOptions, ConnectToServerOptions, PublishToServerOptions } from "./types";
|
|
1
|
+
import { MindooTenant, EncryptedPrivateKey, MindooDB, ContentAddressedStore, ContentAddressedStoreFactory, StoreKind, OpenDBOptions, MindooTenantFactory, MindooTenantDirectory, StoreEntryMetadata, SigningKeyPair, JoinRequest, JoinResponse, ApproveJoinRequestOptions, ApproveAdminRequestOptions, ConnectToServerOptions, PublishToServerOptions } from "./types";
|
|
2
2
|
import { PrivateUserId, PublicUserId } from "./userid";
|
|
3
3
|
import { CryptoAdapter } from "./crypto/CryptoAdapter";
|
|
4
4
|
import { KeyBag } from "./keys/KeyBag";
|
|
@@ -9,8 +9,10 @@ import type { RecipientOptions, RecipientSpec } from "./userkeys/sealedTypes";
|
|
|
9
9
|
import { type SealedValue } from "./userkeys/sealedValues";
|
|
10
10
|
import { MindooDocSigner } from "./crypto/MindooDocSigner";
|
|
11
11
|
import { Logger } from "./logging";
|
|
12
|
+
import { type AdminRequest, type AdminResponse } from "./uri/adminUri";
|
|
12
13
|
import { type LocalCacheStore } from "./cache/LocalCacheStore";
|
|
13
14
|
import { CacheManager } from "./cache/CacheManager";
|
|
15
|
+
import { DirectoryAdminKeyResolver } from "./accesscontrol/directoryAdminResolver";
|
|
14
16
|
/**
|
|
15
17
|
* BaseMindooTenant is a platform-agnostic implementation of MindooTenant
|
|
16
18
|
* that works in both browser and server environments.
|
|
@@ -143,6 +145,12 @@ export declare class BaseMindooTenant implements MindooTenant {
|
|
|
143
145
|
getCurrentPrivateUser(): PrivateUserId;
|
|
144
146
|
getCurrentUserPassword(): string;
|
|
145
147
|
getUserKeyManager(): UserKeyManager;
|
|
148
|
+
/**
|
|
149
|
+
* The document store of `dbId` without opening (materializing) the
|
|
150
|
+
* database: the open database's store, or a store handle from the factory.
|
|
151
|
+
* For readers that only scan entries, such as the device-certificate index.
|
|
152
|
+
*/
|
|
153
|
+
getDocStoreForDb(dbId: string): ContentAddressedStore;
|
|
146
154
|
isDatabaseOpen(dbId: string): boolean;
|
|
147
155
|
/** Fully initialized (not merely in-flight). See UserKeyManager.canReconcileAgainstUserDirectory. */
|
|
148
156
|
isDatabaseReady(dbId: string): boolean;
|
|
@@ -174,6 +182,20 @@ export declare class BaseMindooTenant implements MindooTenant {
|
|
|
174
182
|
declineUserKeyDevice(fingerprint: string): Promise<void>;
|
|
175
183
|
undoDeclineUserKeyDevice(fingerprint: string): Promise<void>;
|
|
176
184
|
rotateUserKey(): Promise<void>;
|
|
185
|
+
getDeviceSelfGrantPublicKey(): Promise<string | null>;
|
|
186
|
+
issueDeviceCertificate(device: {
|
|
187
|
+
signingPublicKey: string;
|
|
188
|
+
encryptionPublicKey: string;
|
|
189
|
+
}, label?: string): Promise<{
|
|
190
|
+
docId: string;
|
|
191
|
+
certificate: import("./userkeys/deviceCertificate").DeviceCertificatePayload;
|
|
192
|
+
}>;
|
|
193
|
+
revokeOwnDeviceCertificate(fingerprint: string): Promise<number>;
|
|
194
|
+
listOwnDeviceCertificates(): Promise<Array<{
|
|
195
|
+
docId: string;
|
|
196
|
+
fingerprint: string;
|
|
197
|
+
certificate: import("./userkeys/deviceCertificate").DeviceCertificatePayload;
|
|
198
|
+
}>>;
|
|
177
199
|
reconcileUserKeys(options?: {
|
|
178
200
|
allowSelfCreate?: boolean;
|
|
179
201
|
}): Promise<UserKeyEnrollmentStatus>;
|
|
@@ -250,6 +272,50 @@ export declare class BaseMindooTenant implements MindooTenant {
|
|
|
250
272
|
* @return The administration public key (Ed25519, PEM format)
|
|
251
273
|
*/
|
|
252
274
|
getAdministrationPublicKey(): string;
|
|
275
|
+
/**
|
|
276
|
+
* Signing keys this process writes with besides the current user's (e.g. a
|
|
277
|
+
* delegated admin key, docs/accesscontrol.md §6.13). Directory entries such a
|
|
278
|
+
* key wrote here count locally before a witness stamped them.
|
|
279
|
+
*/
|
|
280
|
+
private readonly localSigningKeys;
|
|
281
|
+
/** Store-level admin-key resolver of the open `directory` database (§6.13). */
|
|
282
|
+
private directoryAdminResolver;
|
|
283
|
+
/** Public keys derived from admin private keys handed to directory methods. */
|
|
284
|
+
private readonly adminPublicKeyByPrivateKey;
|
|
285
|
+
/** Remember that this process signs with `publicKey` (see {@link isLocalSigningKey}). */
|
|
286
|
+
noteLocalSigningKey(publicKey: string): void;
|
|
287
|
+
/** Whether this process signs with `publicKey`: the current user or a noted key. */
|
|
288
|
+
isLocalSigningKey(publicKey: string): boolean;
|
|
289
|
+
/**
|
|
290
|
+
* The store-level admin-key resolver for this tenant's `directory` database,
|
|
291
|
+
* created on first use for `store`. Used by the directory load path and by
|
|
292
|
+
* {@link isAdminSigningKeyAt}; it reads root-signed admin-key documents
|
|
293
|
+
* straight from the store, so it never recurses into directory materialization.
|
|
294
|
+
*/
|
|
295
|
+
getDirectoryAdminResolver(store: ContentAddressedStore): DirectoryAdminKeyResolver;
|
|
296
|
+
/**
|
|
297
|
+
* Whether `signingKey` is a tenant admin at time `T` (docs/accesscontrol.md
|
|
298
|
+
* §6.13): the root admin key always is; a delegated admin key is while its
|
|
299
|
+
* admin-key document's window covers `T`. `T` is a witness time, or "now"
|
|
300
|
+
* for live decisions.
|
|
301
|
+
*/
|
|
302
|
+
isAdminSigningKeyAt(signingKey: string, T: number): Promise<boolean>;
|
|
303
|
+
/**
|
|
304
|
+
* Whether `signingKey` has ever been a delegated admin key of this tenant (an
|
|
305
|
+
* admin-key document exists, whatever its window). Such a key holds no grant,
|
|
306
|
+
* so its trust is decided by {@link isAdminSigningKeyAt} alone.
|
|
307
|
+
*/
|
|
308
|
+
isKnownDelegatedAdminKey(signingKey: string): Promise<boolean>;
|
|
309
|
+
/**
|
|
310
|
+
* The signing key pair for an admin private key passed to a directory method.
|
|
311
|
+
* The root admin key pair is the default; for a delegated admin key
|
|
312
|
+
* (§6.13) the public key is derived from the private key once and cached.
|
|
313
|
+
* The derived key is remembered as a local signing key, so the directory
|
|
314
|
+
* entries it writes count here before a witness stamps them.
|
|
315
|
+
*/
|
|
316
|
+
resolveAdminSigningKeyPair(privateKey: EncryptedPrivateKey, password: string): Promise<SigningKeyPair>;
|
|
317
|
+
/** Ed25519 public key (SPKI PEM) of an encrypted private signing key. */
|
|
318
|
+
private derivePublicSigningKey;
|
|
253
319
|
/**
|
|
254
320
|
* Get the administration encryption public key for this tenant.
|
|
255
321
|
* Used for encrypting sensitive data in the directory that only admins can decrypt
|
|
@@ -338,6 +404,13 @@ export declare class BaseMindooTenant implements MindooTenant {
|
|
|
338
404
|
* @returns true if a wipe was applied (the tenant is now gone locally), false
|
|
339
405
|
* if this device is not targeted.
|
|
340
406
|
*/
|
|
407
|
+
/**
|
|
408
|
+
* Whether the admin revoked this device (docs/accesscontrol.md §6.5): its
|
|
409
|
+
* signing key is kept on one of the person's grants as a revoked pair, or is
|
|
410
|
+
* the target of a remote wipe. Returns null for a device that was never
|
|
411
|
+
* granted, so callers can tell the two apart.
|
|
412
|
+
*/
|
|
413
|
+
private findRevocationOfCurrentDevice;
|
|
341
414
|
checkAndApplyRemoteWipe(): Promise<boolean>;
|
|
342
415
|
/**
|
|
343
416
|
* Delete all local data for this tenant from the device (docs/accesscontrol.md
|
|
@@ -466,6 +539,14 @@ export declare class BaseMindooTenant implements MindooTenant {
|
|
|
466
539
|
format: "uri";
|
|
467
540
|
}): Promise<string>;
|
|
468
541
|
approveJoinRequest(joinRequest: JoinRequest | string, options: ApproveJoinRequestOptions): Promise<JoinResponse>;
|
|
542
|
+
/**
|
|
543
|
+
* Approve a delegated-admin request (docs/accesscontrol.md §6.13). Root admin
|
|
544
|
+
* key only: writes the admin-key document and the `tenantsetup` entry, then
|
|
545
|
+
* returns an admin response with `default` and `$publicinfos` wrapped to the
|
|
546
|
+
* new admin's encryption key. The response names the ROOT key as
|
|
547
|
+
* `adminSigningPublicKey`; the trust anchor never changes.
|
|
548
|
+
*/
|
|
549
|
+
approveAdminRequest(adminRequest: AdminRequest | string, options: ApproveAdminRequestOptions): Promise<AdminResponse | string>;
|
|
469
550
|
/**
|
|
470
551
|
* Publish (register) this tenant on a MindooDB server.
|
|
471
552
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseMindooTenant.d.ts","sourceRoot":"","sources":["../../src/core/BaseMindooTenant.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,qBAAqB,EACrB,4BAA4B,EAE5B,SA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AC;IAwBlB,8FAA8F;IACxF,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ7D;;;;;OAKG;IACG,sBAAsB,CAC1B,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,KAAK,CAAC;QAAE,KAAK,EAAE,UAAU,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAchF;;;;;;;;OAQG;IACG,wCAAwC,CAC5C,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,MAAM,CAAC;IAiClB,oEAAoE;IACpE,OAAO,CAAC,4BAA4B;IAKpC;;;;;;OAMG;cACa,eAAe,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IA8B7E;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,qCAAqC,IAAI,OAAO;IAI1D;;;;;;;;;;OAUG;IACG,wBAAwB,CAC5B,OAAO,EAAE,UAAU,EACnB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,UAAU,CAAC;IAgEtB;;;;;;;OAOG;IACG,wBAAwB,CAC5B,gBAAgB,EAAE,UAAU,EAC5B,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,UAAU,CAAC;CA2DvB"}
|
|
@@ -29,12 +29,15 @@ const errors_1 = require("./errors");
|
|
|
29
29
|
const logging_1 = require("./logging");
|
|
30
30
|
const MindooURI_1 = require("./uri/MindooURI");
|
|
31
31
|
const joinRequestUri_1 = require("./uri/joinRequestUri");
|
|
32
|
+
const adminUri_1 = require("./uri/adminUri");
|
|
32
33
|
const LocalCacheStore_1 = require("./cache/LocalCacheStore");
|
|
33
34
|
const EncryptedLocalCacheStore_1 = require("./cache/EncryptedLocalCacheStore");
|
|
34
35
|
const CacheManager_1 = require("./cache/CacheManager");
|
|
35
36
|
const databaseIdValidation_1 = require("./databaseIdValidation");
|
|
36
37
|
const BackgroundTaskTracker_1 = require("./BackgroundTaskTracker");
|
|
37
38
|
const singleFlight_1 = require("./utils/singleFlight");
|
|
39
|
+
const directoryAdminResolver_1 = require("./accesscontrol/directoryAdminResolver");
|
|
40
|
+
const DirectoryStateNode_1 = require("./accesscontrol/DirectoryStateNode");
|
|
38
41
|
const dynamicImportInterop_1 = require("./utils/dynamicImportInterop");
|
|
39
42
|
/**
|
|
40
43
|
* BaseMindooTenant is a platform-agnostic implementation of MindooTenant
|
|
@@ -133,6 +136,16 @@ class BaseMindooTenant {
|
|
|
133
136
|
this.cacheManager = null;
|
|
134
137
|
/** Imported HMAC subkeys of {@link computeKeyedHash}, keyed by key id + purpose. */
|
|
135
138
|
this.keyedHashKeyCache = new Map();
|
|
139
|
+
/**
|
|
140
|
+
* Signing keys this process writes with besides the current user's (e.g. a
|
|
141
|
+
* delegated admin key, docs/accesscontrol.md §6.13). Directory entries such a
|
|
142
|
+
* key wrote here count locally before a witness stamped them.
|
|
143
|
+
*/
|
|
144
|
+
this.localSigningKeys = new Set();
|
|
145
|
+
/** Store-level admin-key resolver of the open `directory` database (§6.13). */
|
|
146
|
+
this.directoryAdminResolver = null;
|
|
147
|
+
/** Public keys derived from admin private keys handed to directory methods. */
|
|
148
|
+
this.adminPublicKeyByPrivateKey = new WeakMap();
|
|
136
149
|
this.factory = factory;
|
|
137
150
|
this.tenantId = tenantId;
|
|
138
151
|
this.administrationPublicKey = administrationPublicKey;
|
|
@@ -287,6 +300,17 @@ class BaseMindooTenant {
|
|
|
287
300
|
getUserKeyManager() {
|
|
288
301
|
return this.userKeys;
|
|
289
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* The document store of `dbId` without opening (materializing) the
|
|
305
|
+
* database: the open database's store, or a store handle from the factory.
|
|
306
|
+
* For readers that only scan entries, such as the device-certificate index.
|
|
307
|
+
*/
|
|
308
|
+
getDocStoreForDb(dbId) {
|
|
309
|
+
const live = this.databaseCache.get(dbId);
|
|
310
|
+
if (live)
|
|
311
|
+
return live.getStore();
|
|
312
|
+
return this.storeFactory.createStore(dbId).docStore;
|
|
313
|
+
}
|
|
290
314
|
isDatabaseOpen(dbId) {
|
|
291
315
|
return this.databaseCache.has(dbId) || this.databaseOpenInFlight.has(dbId);
|
|
292
316
|
}
|
|
@@ -363,6 +387,18 @@ class BaseMindooTenant {
|
|
|
363
387
|
async rotateUserKey() {
|
|
364
388
|
return this.userKeys.rotateUserKey();
|
|
365
389
|
}
|
|
390
|
+
async getDeviceSelfGrantPublicKey() {
|
|
391
|
+
return this.userKeys.getDeviceSelfGrantPublicKey();
|
|
392
|
+
}
|
|
393
|
+
async issueDeviceCertificate(device, label) {
|
|
394
|
+
return this.userKeys.issueDeviceCertificate(device, label);
|
|
395
|
+
}
|
|
396
|
+
async revokeOwnDeviceCertificate(fingerprint) {
|
|
397
|
+
return this.userKeys.revokeOwnDeviceCertificate(fingerprint);
|
|
398
|
+
}
|
|
399
|
+
async listOwnDeviceCertificates() {
|
|
400
|
+
return this.userKeys.listOwnDeviceCertificates();
|
|
401
|
+
}
|
|
366
402
|
async reconcileUserKeys(options) {
|
|
367
403
|
return this.userKeys.reconcile(options);
|
|
368
404
|
}
|
|
@@ -582,6 +618,109 @@ class BaseMindooTenant {
|
|
|
582
618
|
getAdministrationPublicKey() {
|
|
583
619
|
return this.administrationPublicKey;
|
|
584
620
|
}
|
|
621
|
+
/** Remember that this process signs with `publicKey` (see {@link isLocalSigningKey}). */
|
|
622
|
+
noteLocalSigningKey(publicKey) {
|
|
623
|
+
this.localSigningKeys.add(publicKey.replace(/\s+/g, ""));
|
|
624
|
+
}
|
|
625
|
+
/** Whether this process signs with `publicKey`: the current user or a noted key. */
|
|
626
|
+
isLocalSigningKey(publicKey) {
|
|
627
|
+
const normalized = publicKey.replace(/\s+/g, "");
|
|
628
|
+
if (this.currentUser.userSigningKeyPair.publicKey.replace(/\s+/g, "") === normalized)
|
|
629
|
+
return true;
|
|
630
|
+
return this.localSigningKeys.has(normalized);
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* The store-level admin-key resolver for this tenant's `directory` database,
|
|
634
|
+
* created on first use for `store`. Used by the directory load path and by
|
|
635
|
+
* {@link isAdminSigningKeyAt}; it reads root-signed admin-key documents
|
|
636
|
+
* straight from the store, so it never recurses into directory materialization.
|
|
637
|
+
*/
|
|
638
|
+
getDirectoryAdminResolver(store) {
|
|
639
|
+
if (!this.directoryAdminResolver) {
|
|
640
|
+
this.directoryAdminResolver = new directoryAdminResolver_1.DirectoryAdminKeyResolver({
|
|
641
|
+
store,
|
|
642
|
+
rootAdminKey: () => this.administrationPublicKey,
|
|
643
|
+
decryptPayload: (encrypted, keyId) => this.decryptPayload(encrypted, keyId),
|
|
644
|
+
subtle: this.cryptoAdapter.getSubtle(),
|
|
645
|
+
isLocalSigningKey: (key) => this.isLocalSigningKey(key),
|
|
646
|
+
now: () => (0, timeSource_1.semanticNow)(),
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
return this.directoryAdminResolver;
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Whether `signingKey` is a tenant admin at time `T` (docs/accesscontrol.md
|
|
653
|
+
* §6.13): the root admin key always is; a delegated admin key is while its
|
|
654
|
+
* admin-key document's window covers `T`. `T` is a witness time, or "now"
|
|
655
|
+
* for live decisions.
|
|
656
|
+
*/
|
|
657
|
+
async isAdminSigningKeyAt(signingKey, T) {
|
|
658
|
+
if ((0, DirectoryStateNode_1.signingKeysEqual)(signingKey, this.administrationPublicKey))
|
|
659
|
+
return true;
|
|
660
|
+
if (!this.directoryAdminResolver) {
|
|
661
|
+
// Opening the directory registers the resolver. Never awaited from the
|
|
662
|
+
// directory's own load path: that path uses its resolver directly.
|
|
663
|
+
await this.openDB(types_1.DIRECTORY_DB_ID, { adminOnlyDb: true });
|
|
664
|
+
}
|
|
665
|
+
if (!this.directoryAdminResolver)
|
|
666
|
+
return false;
|
|
667
|
+
return this.directoryAdminResolver.isDelegatedAdminAt(signingKey, T);
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Whether `signingKey` has ever been a delegated admin key of this tenant (an
|
|
671
|
+
* admin-key document exists, whatever its window). Such a key holds no grant,
|
|
672
|
+
* so its trust is decided by {@link isAdminSigningKeyAt} alone.
|
|
673
|
+
*/
|
|
674
|
+
async isKnownDelegatedAdminKey(signingKey) {
|
|
675
|
+
if (!this.directoryAdminResolver)
|
|
676
|
+
return false;
|
|
677
|
+
return this.directoryAdminResolver.hasAdminKeyDocument(signingKey);
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* The signing key pair for an admin private key passed to a directory method.
|
|
681
|
+
* The root admin key pair is the default; for a delegated admin key
|
|
682
|
+
* (§6.13) the public key is derived from the private key once and cached.
|
|
683
|
+
* The derived key is remembered as a local signing key, so the directory
|
|
684
|
+
* entries it writes count here before a witness stamps them.
|
|
685
|
+
*/
|
|
686
|
+
async resolveAdminSigningKeyPair(privateKey, password) {
|
|
687
|
+
let publicKey = this.adminPublicKeyByPrivateKey.get(privateKey);
|
|
688
|
+
if (!publicKey) {
|
|
689
|
+
try {
|
|
690
|
+
publicKey = await this.derivePublicSigningKey(privateKey, password);
|
|
691
|
+
}
|
|
692
|
+
catch (error) {
|
|
693
|
+
this.logger.debug(`resolveAdminSigningKeyPair: could not derive public key, assuming root: ${error}`);
|
|
694
|
+
publicKey = this.administrationPublicKey;
|
|
695
|
+
}
|
|
696
|
+
this.adminPublicKeyByPrivateKey.set(privateKey, publicKey);
|
|
697
|
+
}
|
|
698
|
+
if (!(0, DirectoryStateNode_1.signingKeysEqual)(publicKey, this.administrationPublicKey)) {
|
|
699
|
+
this.noteLocalSigningKey(publicKey);
|
|
700
|
+
}
|
|
701
|
+
return { publicKey: (0, DirectoryStateNode_1.signingKeysEqual)(publicKey, this.administrationPublicKey) ? this.administrationPublicKey : publicKey, privateKey };
|
|
702
|
+
}
|
|
703
|
+
/** Ed25519 public key (SPKI PEM) of an encrypted private signing key. */
|
|
704
|
+
async derivePublicSigningKey(privateKey, password) {
|
|
705
|
+
const subtle = this.cryptoAdapter.getSubtle();
|
|
706
|
+
const pkcs8 = await this.decryptPrivateKey(privateKey, password, "signing");
|
|
707
|
+
const key = await subtle.importKey("pkcs8", pkcs8, { name: "Ed25519" }, true, ["sign"]);
|
|
708
|
+
const jwk = (await subtle.exportKey("jwk", key));
|
|
709
|
+
if (!jwk.x)
|
|
710
|
+
throw new Error("Ed25519 JWK export carries no public key");
|
|
711
|
+
const base64 = jwk.x.replace(/-/g, "+").replace(/_/g, "/");
|
|
712
|
+
const padded = base64 + "=".repeat((4 - (base64.length % 4)) % 4);
|
|
713
|
+
const raw = Uint8Array.from(atob(padded), (c) => c.charCodeAt(0));
|
|
714
|
+
const spkiPrefix = [0x30, 0x2a, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x03, 0x21, 0x00];
|
|
715
|
+
const spki = new Uint8Array(spkiPrefix.length + raw.length);
|
|
716
|
+
spki.set(spkiPrefix, 0);
|
|
717
|
+
spki.set(raw, spkiPrefix.length);
|
|
718
|
+
let binary = "";
|
|
719
|
+
for (const byte of spki)
|
|
720
|
+
binary += String.fromCharCode(byte);
|
|
721
|
+
const body = btoa(binary).match(/.{1,64}/g).join("\n");
|
|
722
|
+
return `-----BEGIN PUBLIC KEY-----\n${body}\n-----END PUBLIC KEY-----`;
|
|
723
|
+
}
|
|
585
724
|
/**
|
|
586
725
|
* Get the administration encryption public key for this tenant.
|
|
587
726
|
* Used for encrypting sensitive data in the directory that only admins can decrypt
|
|
@@ -917,7 +1056,20 @@ class BaseMindooTenant {
|
|
|
917
1056
|
async verifyEntrySignature(entry, encryptedData) {
|
|
918
1057
|
// The author key must be trusted by the tenant directory.
|
|
919
1058
|
const directory = await this.openDirectory();
|
|
920
|
-
|
|
1059
|
+
// A delegated admin key (docs/accesscontrol.md §6.13) holds no grant. It is
|
|
1060
|
+
// trusted for what it signed while it was an admin (judged at the witness
|
|
1061
|
+
// time, or now for an un-witnessed entry), also after its window ended.
|
|
1062
|
+
// Checked first for keys the trust cache does not know as grant keys: the
|
|
1063
|
+
// store-level check never waits for the directory cache pass that may be
|
|
1064
|
+
// verifying this very entry.
|
|
1065
|
+
const peek = directory.peekTrustedKey;
|
|
1066
|
+
let isTrusted = (0, DirectoryStateNode_1.signingKeysEqual)(entry.createdByPublicKey, this.administrationPublicKey) ||
|
|
1067
|
+
(typeof peek === "function" &&
|
|
1068
|
+
peek.call(directory, entry.createdByPublicKey) !== true &&
|
|
1069
|
+
(await this.isAdminSigningKeyAt(entry.createdByPublicKey, entry.receivedAt ?? (0, timeSource_1.semanticNow)())));
|
|
1070
|
+
if (!isTrusted) {
|
|
1071
|
+
isTrusted = await directory.validatePublicSigningKey(entry.createdByPublicKey);
|
|
1072
|
+
}
|
|
921
1073
|
if (!isTrusted) {
|
|
922
1074
|
this.logger.warn(`Public key not trusted: ${entry.createdByPublicKey}`);
|
|
923
1075
|
return false;
|
|
@@ -1013,6 +1165,33 @@ class BaseMindooTenant {
|
|
|
1013
1165
|
* @returns true if a wipe was applied (the tenant is now gone locally), false
|
|
1014
1166
|
* if this device is not targeted.
|
|
1015
1167
|
*/
|
|
1168
|
+
/**
|
|
1169
|
+
* Whether the admin revoked this device (docs/accesscontrol.md §6.5): its
|
|
1170
|
+
* signing key is kept on one of the person's grants as a revoked pair, or is
|
|
1171
|
+
* the target of a remote wipe. Returns null for a device that was never
|
|
1172
|
+
* granted, so callers can tell the two apart.
|
|
1173
|
+
*/
|
|
1174
|
+
async findRevocationOfCurrentDevice(username) {
|
|
1175
|
+
const directory = await this.openDirectory();
|
|
1176
|
+
const finder = directory;
|
|
1177
|
+
if (typeof finder.findGrantAccessDocuments !== "function") {
|
|
1178
|
+
return null;
|
|
1179
|
+
}
|
|
1180
|
+
const normalize = (key) => key.replace(/\s+/g, "");
|
|
1181
|
+
const myKey = normalize(this.currentUser.userSigningKeyPair.publicKey);
|
|
1182
|
+
let revoked = false;
|
|
1183
|
+
let wipeRequested = false;
|
|
1184
|
+
for (const grant of await finder.findGrantAccessDocuments(username)) {
|
|
1185
|
+
const data = grant.getData();
|
|
1186
|
+
if ((0, grantKeys_1.extractRevokedKeyPairs)(data).some((pair) => normalize(pair.signingPublicKey) === myKey)) {
|
|
1187
|
+
revoked = true;
|
|
1188
|
+
}
|
|
1189
|
+
if ((0, grantKeys_1.extractWipeRequestedSigningKeys)(data).some((key) => normalize(key) === myKey)) {
|
|
1190
|
+
wipeRequested = true;
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
return revoked || wipeRequested ? { wipeRequested } : null;
|
|
1194
|
+
}
|
|
1016
1195
|
async checkAndApplyRemoteWipe() {
|
|
1017
1196
|
const directory = await this.openDirectory();
|
|
1018
1197
|
const myKey = this.currentUser.userSigningKeyPair.publicKey;
|
|
@@ -1106,7 +1285,7 @@ class BaseMindooTenant {
|
|
|
1106
1285
|
return;
|
|
1107
1286
|
}
|
|
1108
1287
|
const currentUser = await this.getCurrentUserId();
|
|
1109
|
-
if (currentUser.userSigningPublicKey
|
|
1288
|
+
if (await this.isAdminSigningKeyAt(currentUser.userSigningPublicKey, (0, timeSource_1.semanticNow)())) {
|
|
1110
1289
|
return;
|
|
1111
1290
|
}
|
|
1112
1291
|
const directory = await this.openDirectory();
|
|
@@ -1124,7 +1303,18 @@ class BaseMindooTenant {
|
|
|
1124
1303
|
registeredUser?.signingPublicKey === currentUser.userSigningPublicKey &&
|
|
1125
1304
|
registeredUser?.encryptionPublicKey === currentUser.userEncryptionPublicKey;
|
|
1126
1305
|
}
|
|
1306
|
+
// A device its person certified (docs/userkeys.md §9.6).
|
|
1307
|
+
if (!hasMatchingGrant && typeof directory.resolveSignerToGrant === "function") {
|
|
1308
|
+
hasMatchingGrant = !!(await directory.resolveSignerToGrant(currentUser.userSigningPublicKey, Number.MAX_SAFE_INTEGER));
|
|
1309
|
+
}
|
|
1127
1310
|
if (!hasMatchingGrant) {
|
|
1311
|
+
// A revoked device (its key kept on the grant as a revoked pair, or
|
|
1312
|
+
// targeted for remote wipe) is told so, not asked to request access.
|
|
1313
|
+
const revoked = await this.findRevocationOfCurrentDevice(currentUser.username);
|
|
1314
|
+
if (revoked) {
|
|
1315
|
+
this.logger.warn(`Denied database open for revoked device of ${currentUser.username} on database ${id}`);
|
|
1316
|
+
throw new errors_1.DeviceAccessRevokedError(currentUser.username, revoked.wipeRequested);
|
|
1317
|
+
}
|
|
1128
1318
|
this.logger.warn(`Denied database open for ungranted user ${currentUser.username} on database ${id}`);
|
|
1129
1319
|
throw new Error(`User "${currentUser.username}" does not have tenant access yet; the tenant admin must grant access first.`);
|
|
1130
1320
|
}
|
|
@@ -1562,6 +1752,9 @@ class BaseMindooTenant {
|
|
|
1562
1752
|
}
|
|
1563
1753
|
console.log(`[approveJoinRequest] Approving join request for user "${username}"`);
|
|
1564
1754
|
this.logger.info(`Approving join request for user: ${username}`);
|
|
1755
|
+
// The approving admin: the root, or a delegated admin (§6.13).
|
|
1756
|
+
const approverKeyPair = await this.resolveAdminSigningKeyPair(options.adminSigningKey, options.adminPassword);
|
|
1757
|
+
const approverIsRoot = (0, DirectoryStateNode_1.signingKeysEqual)(approverKeyPair.publicKey, this.administrationPublicKey);
|
|
1565
1758
|
// 1. Register the user in the directory
|
|
1566
1759
|
const directory = await this.openDirectory();
|
|
1567
1760
|
const publicUserId = {
|
|
@@ -1596,10 +1789,7 @@ class BaseMindooTenant {
|
|
|
1596
1789
|
const userKeyDoc = await this.userKeys.createPendingFromJoin({
|
|
1597
1790
|
username,
|
|
1598
1791
|
userPublicKey,
|
|
1599
|
-
signingKeyPair:
|
|
1600
|
-
publicKey: this.administrationPublicKey,
|
|
1601
|
-
privateKey: options.adminSigningKey,
|
|
1602
|
-
},
|
|
1792
|
+
signingKeyPair: approverKeyPair,
|
|
1603
1793
|
signingKeyPassword: options.adminPassword,
|
|
1604
1794
|
});
|
|
1605
1795
|
const payload = (0, validateUserKeyDocument_1.asUserKeyPayload)(userKeyDoc.getData());
|
|
@@ -1613,6 +1803,15 @@ class BaseMindooTenant {
|
|
|
1613
1803
|
// (`[$publicinfos]`) must not quietly hand out the tenant key.
|
|
1614
1804
|
const wrapDefault = options.sharedDocKeyIds === undefined ||
|
|
1615
1805
|
options.sharedDocKeyIds.includes(types_1.DEFAULT_TENANT_KEY_ID);
|
|
1806
|
+
// The person's first device brings their device self-grant key. Only
|
|
1807
|
+
// then is it the person's own key; an additional device's request
|
|
1808
|
+
// carries a key nobody else holds (docs/userkeys.md §9).
|
|
1809
|
+
const selfGrantKey = typeof request.deviceSelfGrantPublicKey === "string"
|
|
1810
|
+
? request.deviceSelfGrantPublicKey.trim()
|
|
1811
|
+
: "";
|
|
1812
|
+
if (options.allowDeviceSelfGrant && selfGrantKey && publishedPublicKey === userPublicKey) {
|
|
1813
|
+
await directory.setDeviceSelfGrant(username, selfGrantKey, options.adminSigningKey, options.adminPassword);
|
|
1814
|
+
}
|
|
1616
1815
|
if (wrapDefault && publishedPublicKey === userPublicKey) {
|
|
1617
1816
|
await directory.autoDistributeKeysToUser(username, [types_1.DEFAULT_TENANT_KEY_ID], options.adminSigningKey, options.adminPassword, userPublicKey);
|
|
1618
1817
|
}
|
|
@@ -1704,7 +1903,7 @@ class BaseMindooTenant {
|
|
|
1704
1903
|
// Tenants created before `tenantsetup` recorded administrators have no
|
|
1705
1904
|
// entry, leaving members with a fingerprint instead of a name. A grant is
|
|
1706
1905
|
// where the admin supplies both its name and its keys, so heal it here.
|
|
1707
|
-
if (options.adminUsername) {
|
|
1906
|
+
if (options.adminUsername && approverIsRoot) {
|
|
1708
1907
|
try {
|
|
1709
1908
|
const directoryDb = await this.openDB("directory", { adminOnlyDb: true });
|
|
1710
1909
|
const written = await (0, tenantSetup_1.ensureTenantSetupAdministrator)(directoryDb, {
|
|
@@ -1732,6 +1931,63 @@ class BaseMindooTenant {
|
|
|
1732
1931
|
}
|
|
1733
1932
|
return joinResponse;
|
|
1734
1933
|
}
|
|
1934
|
+
/**
|
|
1935
|
+
* Approve a delegated-admin request (docs/accesscontrol.md §6.13). Root admin
|
|
1936
|
+
* key only: writes the admin-key document and the `tenantsetup` entry, then
|
|
1937
|
+
* returns an admin response with `default` and `$publicinfos` wrapped to the
|
|
1938
|
+
* new admin's encryption key. The response names the ROOT key as
|
|
1939
|
+
* `adminSigningPublicKey`; the trust anchor never changes.
|
|
1940
|
+
*/
|
|
1941
|
+
async approveAdminRequest(adminRequest, options) {
|
|
1942
|
+
const request = (0, adminUri_1.decodeAdminRequestUri)(adminRequest);
|
|
1943
|
+
if (request.tenantId && request.tenantId !== this.tenantId) {
|
|
1944
|
+
throw new Error(`This admin request is for tenant "${request.tenantId}", not "${this.tenantId}"`);
|
|
1945
|
+
}
|
|
1946
|
+
const name = (options.name ?? request.name ?? "").trim();
|
|
1947
|
+
if (!name) {
|
|
1948
|
+
throw new Error("Cannot approve admin request: no name in the request and none supplied via options.name");
|
|
1949
|
+
}
|
|
1950
|
+
const label = (options.label ?? request.label ?? "").trim();
|
|
1951
|
+
const directory = (await this.openDirectory());
|
|
1952
|
+
await directory.addAdminKey({
|
|
1953
|
+
signingPublicKey: request.signingPublicKey,
|
|
1954
|
+
encryptionPublicKey: request.encryptionPublicKey,
|
|
1955
|
+
name,
|
|
1956
|
+
...(label ? { label } : {}),
|
|
1957
|
+
...(typeof options.validFrom === "number" ? { validFrom: options.validFrom } : {}),
|
|
1958
|
+
}, options.adminSigningKey, options.adminPassword);
|
|
1959
|
+
const encryptedDocKeys = await Promise.all([types_1.DEFAULT_TENANT_KEY_ID, types_1.PUBLIC_INFOS_KEY_ID].map((keyId) => this.exportJoinResponseDocKeyVersions(keyId, request.encryptionPublicKey)));
|
|
1960
|
+
const response = {
|
|
1961
|
+
v: 1,
|
|
1962
|
+
tenantId: this.tenantId,
|
|
1963
|
+
adminSigningPublicKey: this.administrationPublicKey,
|
|
1964
|
+
adminEncryptionPublicKey: this.administrationEncryptionPublicKey,
|
|
1965
|
+
signingPublicKey: request.signingPublicKey,
|
|
1966
|
+
name,
|
|
1967
|
+
encryptedDocKeys,
|
|
1968
|
+
};
|
|
1969
|
+
if (label)
|
|
1970
|
+
response.label = label;
|
|
1971
|
+
if (options.serverUrl)
|
|
1972
|
+
response.serverUrl = options.serverUrl;
|
|
1973
|
+
const tenantLabel = options.tenantLabel?.trim();
|
|
1974
|
+
if (tenantLabel) {
|
|
1975
|
+
response.tenantLabel = tenantLabel;
|
|
1976
|
+
}
|
|
1977
|
+
else {
|
|
1978
|
+
try {
|
|
1979
|
+
const directoryDb = await this.openDB(types_1.DIRECTORY_DB_ID, { adminOnlyDb: true });
|
|
1980
|
+
const setupLabel = await (0, tenantSetup_1.readTenantSetupLabel)(directoryDb, this);
|
|
1981
|
+
if (setupLabel)
|
|
1982
|
+
response.tenantLabel = setupLabel;
|
|
1983
|
+
}
|
|
1984
|
+
catch {
|
|
1985
|
+
// Best-effort, as for join responses.
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
this.logger.info(`Admin request approved for "${name}"`);
|
|
1989
|
+
return options.format === "uri" ? (0, adminUri_1.encodeAdminResponseUri)(response) : response;
|
|
1990
|
+
}
|
|
1735
1991
|
/**
|
|
1736
1992
|
* Publish (register) this tenant on a MindooDB server.
|
|
1737
1993
|
*
|