@wireapp/core 45.0.3 → 45.0.5
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/lib/Account.d.ts +3 -9
- package/lib/Account.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.d.ts +2 -2
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.js +9 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.test.js +41 -8
- package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.d.ts +2 -0
- package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.js +3 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts +2 -11
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.js +3 -3
- package/package.json +2 -2
package/lib/Account.d.ts
CHANGED
|
@@ -123,20 +123,14 @@ export declare class Account extends TypedEventEmitter<Events> {
|
|
|
123
123
|
displayName: string;
|
|
124
124
|
/** handle of the user (should match the identity provider) */
|
|
125
125
|
handle: string;
|
|
126
|
+
/** team of the user */
|
|
126
127
|
teamId: string;
|
|
127
128
|
discoveryUrl: string;
|
|
129
|
+
/** function called to get the oauth token */
|
|
128
130
|
getOAuthToken: getTokenCallback;
|
|
129
131
|
/** number of seconds the certificate should be valid (default 90 days) */
|
|
130
132
|
certificateTtl?: number;
|
|
131
|
-
}): Promise<
|
|
132
|
-
status: "authentication";
|
|
133
|
-
authenticationChallenge: {
|
|
134
|
-
keyAuth: string;
|
|
135
|
-
challenge: import("./messagingProtocols/mls").AcmeChallenge;
|
|
136
|
-
};
|
|
137
|
-
} | {
|
|
138
|
-
status: "successful";
|
|
139
|
-
}>;
|
|
133
|
+
}): Promise<void>;
|
|
140
134
|
get clientId(): string;
|
|
141
135
|
get userId(): string;
|
|
142
136
|
/**
|
package/lib/Account.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Account.d.ts","sourceRoot":"","sources":["../src/Account.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,YAAY,EAGZ,OAAO,EACP,MAAM,EAEN,SAAS,EAEV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAuB,UAAU,EAAE,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEnG,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AASxD,OAAO,EAAC,SAAS,EAAE,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAC,UAAU,EAAe,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,WAAW,CAAC;AACpD,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAChD,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAAC,sBAAsB,EAAC,MAAM,8DAA8D,CAAC;AACpG,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAMpD,OAAO,EAAC,mBAAmB,EAAO,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAC,gBAAgB,EAAC,MAAM,iEAAiE,CAAC;AACjG,OAAO,EAAC,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAC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OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAoF1D,OAAO,CAAC,YAAY;IAMpB;;;OAGG;IACU,MAAM,CAAC,SAAS,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAU9D;;OAEG;YACW,IAAI;IAQlB;;;;;;OAMG;IACI,MAAM,CAAC,EACZ,OAAkB,EAClB,wBAAmC,EACnC,4BAAuC,EACvC,qBAAgC,EAChC,MAAc,GACf,GAAE;QACD;;;;WAIG;QACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;QAE7E;;WAEG;QACH,4BAA4B,CAAC,EAAE,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,EAAE;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,KAAK,IAAI,CAAC;QAEtF;;WAEG;QACH,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;QAE5D;;;;;;WAMG;QACH,qBAAqB,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;QAEzD;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;KACb,GAAG,MAAM,IAAI;IAgGnB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,uBAAuB;YAIjB,UAAU;IAuBxB,OAAO,CAAC,yBAAyB,CAS/B;CACH"}
|
|
@@ -26,8 +26,8 @@ export declare class E2EIServiceExternal extends TypedEventEmitter<Events> {
|
|
|
26
26
|
clearAllProgress(): Promise<void>;
|
|
27
27
|
getConversationState(conversationId: Uint8Array): Promise<E2eiConversationState>;
|
|
28
28
|
isE2EIEnabled(): Promise<boolean>;
|
|
29
|
-
getAllGroupUsersIdentities(groupId: string): Promise<Map<string, DeviceIdentity[]
|
|
30
|
-
getUsersIdentities(groupId: string, userIds: QualifiedId[]): Promise<Map<string, DeviceIdentity[]
|
|
29
|
+
getAllGroupUsersIdentities(groupId: string): Promise<Map<string, DeviceIdentity[]> | undefined>;
|
|
30
|
+
getUsersIdentities(groupId: string, userIds: QualifiedId[]): Promise<Map<string, DeviceIdentity[]> | undefined>;
|
|
31
31
|
getDevicesIdentities(groupId: string, userClientsMap: Record<string, QualifiedId>): Promise<DeviceIdentity[]>;
|
|
32
32
|
isFreshMLSSelfClient(): Promise<boolean>;
|
|
33
33
|
private registerLocalCertificateRoot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"E2EIServiceExternal.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAIzD,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAC,UAAU,EAAE,qBAAqB,EAAE,YAAY,EAAE,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAMnG,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAKrD,OAAO,EAAC,sBAAsB,EAAC,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAEzC,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;IAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAAC;AAE/G,KAAK,MAAM,GAAG;IACZ,gBAAgB,EAAE,SAAS,CAAC;IAC5B,cAAc,EAAE,SAAS,CAAC;CAC3B,CAAC;AAGF,qBAAa,mBAAoB,SAAQ,iBAAiB,CAAC,MAAM,CAAC;IAK9D,OAAO,CAAC,QAAQ,CAAC,gBAA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1C,OAAO,CAAC,cAAc,EAAE,CAAC;IAef,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC;YAQvC,4BAA4B;IAO1C;;;;;OAKG;IACU,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW5D,OAAO,KAAK,WAAW,GAKtB;YAEa,+BAA+B;IAK7C;;;;;;;;;;;;OAYG;YACW,0BAA0B;IA6BxC,OAAO,CAAC,4BAA4B;YAStB,+BAA+B;YAQ/B,uBAAuB;YAKvB,0BAA0B;YAI1B,eAAe;YAQf,4BAA4B;YAS5B,WAAW;YAkBX,8BAA8B;CAK7C"}
|
|
@@ -56,6 +56,10 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
56
56
|
return this.coreCryptoClient.e2eiIsEnabled(this.mlsService.config.cipherSuite);
|
|
57
57
|
}
|
|
58
58
|
async getAllGroupUsersIdentities(groupId) {
|
|
59
|
+
const conversationExists = await this.mlsService.conversationExists(groupId);
|
|
60
|
+
if (!conversationExists) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
59
63
|
const allGroupClients = await this.mlsService.getClientIds(groupId);
|
|
60
64
|
const userIdsMap = allGroupClients.reduce((acc, { userId, domain }) => {
|
|
61
65
|
const qualifiedId = { id: userId, domain };
|
|
@@ -66,6 +70,10 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
66
70
|
return this.getUsersIdentities(groupId, userIds);
|
|
67
71
|
}
|
|
68
72
|
async getUsersIdentities(groupId, userIds) {
|
|
73
|
+
const conversationExists = await this.mlsService.conversationExists(groupId);
|
|
74
|
+
if (!conversationExists) {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
69
77
|
const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
|
|
70
78
|
const textDecoder = new TextDecoder();
|
|
71
79
|
// we get all the devices that have an identity (either valid, expired or revoked)
|
|
@@ -98,7 +106,7 @@ class E2EIServiceExternal extends commons_1.TypedEventEmitter {
|
|
|
98
106
|
if (!client) {
|
|
99
107
|
return true;
|
|
100
108
|
}
|
|
101
|
-
return
|
|
109
|
+
return !(0, Helper_1.isMLSDevice)(client);
|
|
102
110
|
}
|
|
103
111
|
async registerLocalCertificateRoot(acmeService) {
|
|
104
112
|
const localCertificateRoot = await acmeService.getLocalCertificateRoot();
|
|
@@ -32,6 +32,7 @@ async function buildE2EIService() {
|
|
|
32
32
|
const mockedMLSService = {
|
|
33
33
|
on: jest.fn(),
|
|
34
34
|
getClientIds: jest.fn(),
|
|
35
|
+
conversationExists: jest.fn(),
|
|
35
36
|
};
|
|
36
37
|
const recurringTaskScheduler = new RecurringTaskScheduler_1.RecurringTaskScheduler({
|
|
37
38
|
delete: key => mockedDb.delete('recurringTasks', key),
|
|
@@ -59,8 +60,18 @@ function generateCoreCryptoIdentity({ userId, status = 'Valid', deviceId = (0, P
|
|
|
59
60
|
const groupId = 'AAEAAhJrE+8TbFFUqiagedTYDUMAZWxuYS53aXJlLmxpbms=';
|
|
60
61
|
describe('E2EIServiceExternal', () => {
|
|
61
62
|
describe('getUsersIdentities', () => {
|
|
63
|
+
it('returns undefined if conversation does not exist', async () => {
|
|
64
|
+
const [service, { mlsService }] = await buildE2EIService();
|
|
65
|
+
const user1 = { domain: 'elna.wire.link', id: '48a1c3b0-4b0e-4bcd-93ad-64c7344b1534' };
|
|
66
|
+
const user2 = { domain: 'elna.wire.link', id: 'b7d287e4-7bbd-40e0-a550-6b18dcaf5f31' };
|
|
67
|
+
const userIds = [user1, user2];
|
|
68
|
+
jest.spyOn(mlsService, 'conversationExists').mockResolvedValue(false);
|
|
69
|
+
const userIdentities = await service.getUsersIdentities(groupId, userIds);
|
|
70
|
+
expect(userIdentities === null || userIdentities === void 0 ? void 0 : userIdentities.get(user1.id)).toEqual(undefined);
|
|
71
|
+
expect(userIdentities === null || userIdentities === void 0 ? void 0 : userIdentities.get(user2.id)).toEqual(undefined);
|
|
72
|
+
});
|
|
62
73
|
it('returns the user identities', async () => {
|
|
63
|
-
const [service, { coreCrypto }] = await buildE2EIService();
|
|
74
|
+
const [service, { coreCrypto, mlsService }] = await buildE2EIService();
|
|
64
75
|
const user1 = { domain: 'elna.wire.link', id: '48a1c3b0-4b0e-4bcd-93ad-64c7344b1534' };
|
|
65
76
|
const user2 = { domain: 'elna.wire.link', id: 'b7d287e4-7bbd-40e0-a550-6b18dcaf5f31' };
|
|
66
77
|
const userIds = [user1, user2];
|
|
@@ -68,12 +79,13 @@ describe('E2EIServiceExternal', () => {
|
|
|
68
79
|
[user1.id, [generateCoreCryptoIdentity({ userId: user1.id }), generateCoreCryptoIdentity({ userId: user1.id })]],
|
|
69
80
|
[user2.id, [generateCoreCryptoIdentity({ userId: user2.id })]],
|
|
70
81
|
]));
|
|
82
|
+
jest.spyOn(mlsService, 'conversationExists').mockResolvedValue(true);
|
|
71
83
|
const userIdentities = await service.getUsersIdentities(groupId, userIds);
|
|
72
|
-
expect(userIdentities.get(user1.id)).toHaveLength(2);
|
|
73
|
-
expect(userIdentities.get(user2.id)).toHaveLength(1);
|
|
84
|
+
expect(userIdentities === null || userIdentities === void 0 ? void 0 : userIdentities.get(user1.id)).toHaveLength(2);
|
|
85
|
+
expect(userIdentities === null || userIdentities === void 0 ? void 0 : userIdentities.get(user2.id)).toHaveLength(1);
|
|
74
86
|
});
|
|
75
87
|
it('returns MLS basic devices with empty identity', async () => {
|
|
76
|
-
const [service, { coreCrypto }] = await buildE2EIService();
|
|
88
|
+
const [service, { coreCrypto, mlsService }] = await buildE2EIService();
|
|
77
89
|
const user1 = { domain: 'elna.wire.link', id: '48a1c3b0-4b0e-4bcd-93ad-64c7344b1534' };
|
|
78
90
|
const user2 = { domain: 'elna.wire.link', id: 'b7d287e4-7bbd-40e0-a550-6b18dcaf5f31' };
|
|
79
91
|
const userIds = [user1, user2];
|
|
@@ -89,12 +101,32 @@ describe('E2EIServiceExternal', () => {
|
|
|
89
101
|
`${user2.id}:452cb4c65f0369a8@elna.wire.link`,
|
|
90
102
|
];
|
|
91
103
|
coreCrypto.getClientIds.mockResolvedValue(allClients.map(clientId => encoder.encode(clientId)));
|
|
104
|
+
jest.spyOn(mlsService, 'conversationExists').mockResolvedValue(true);
|
|
92
105
|
const userIdentities = await service.getUsersIdentities(groupId, userIds);
|
|
93
|
-
expect(userIdentities.get(user1.id)).toHaveLength(3);
|
|
94
|
-
expect(userIdentities.get(user2.id)).toHaveLength(1);
|
|
106
|
+
expect(userIdentities === null || userIdentities === void 0 ? void 0 : userIdentities.get(user1.id)).toHaveLength(3);
|
|
107
|
+
expect(userIdentities === null || userIdentities === void 0 ? void 0 : userIdentities.get(user2.id)).toHaveLength(1);
|
|
95
108
|
});
|
|
96
109
|
});
|
|
97
110
|
describe('getAllGroupUsersIdentities', () => {
|
|
111
|
+
it('returns undefined if mls group does not exist', async () => {
|
|
112
|
+
const [service, { mlsService }] = await buildE2EIService();
|
|
113
|
+
const user1 = {
|
|
114
|
+
domain: 'elna.wire.link',
|
|
115
|
+
userId: '48a1c3b0-4b0e-4bcd-93ad-64c7344b1534',
|
|
116
|
+
clientId: '74a50c1f4352b41f',
|
|
117
|
+
};
|
|
118
|
+
const user2 = {
|
|
119
|
+
domain: 'elna.wire.link',
|
|
120
|
+
userId: 'b7d287e4-7bbd-40e0-a550-6b18dcaf5f31',
|
|
121
|
+
clientId: '452cb4c65f0369a8',
|
|
122
|
+
};
|
|
123
|
+
const clientIds = [user1, user2];
|
|
124
|
+
jest.spyOn(mlsService, 'getClientIds').mockResolvedValue(clientIds);
|
|
125
|
+
jest.spyOn(mlsService, 'conversationExists').mockResolvedValue(false);
|
|
126
|
+
const userIdentities = await service.getAllGroupUsersIdentities(groupId);
|
|
127
|
+
expect(userIdentities === null || userIdentities === void 0 ? void 0 : userIdentities.get(user1.userId)).toEqual(undefined);
|
|
128
|
+
expect(userIdentities === null || userIdentities === void 0 ? void 0 : userIdentities.get(user2.userId)).toEqual(undefined);
|
|
129
|
+
});
|
|
98
130
|
it('returns all the user identities of a mls group', async () => {
|
|
99
131
|
const [service, { coreCrypto, mlsService }] = await buildE2EIService();
|
|
100
132
|
const user1 = {
|
|
@@ -109,6 +141,7 @@ describe('E2EIServiceExternal', () => {
|
|
|
109
141
|
};
|
|
110
142
|
const clientIds = [user1, user2];
|
|
111
143
|
jest.spyOn(mlsService, 'getClientIds').mockResolvedValue(clientIds);
|
|
144
|
+
jest.spyOn(mlsService, 'conversationExists').mockResolvedValue(true);
|
|
112
145
|
coreCrypto.getUserIdentities.mockResolvedValue(new Map([
|
|
113
146
|
[
|
|
114
147
|
user1.userId,
|
|
@@ -117,8 +150,8 @@ describe('E2EIServiceExternal', () => {
|
|
|
117
150
|
[user2.userId, [generateCoreCryptoIdentity({ userId: user2.userId })]],
|
|
118
151
|
]));
|
|
119
152
|
const userIdentities = await service.getAllGroupUsersIdentities(groupId);
|
|
120
|
-
expect(userIdentities.get(user1.userId)).toHaveLength(2);
|
|
121
|
-
expect(userIdentities.get(user2.userId)).toHaveLength(1);
|
|
153
|
+
expect(userIdentities === null || userIdentities === void 0 ? void 0 : userIdentities.get(user1.userId)).toHaveLength(2);
|
|
154
|
+
expect(userIdentities === null || userIdentities === void 0 ? void 0 : userIdentities.get(user2.userId)).toHaveLength(1);
|
|
122
155
|
});
|
|
123
156
|
});
|
|
124
157
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RegisteredClient } from '@wireapp/api-client/lib/client';
|
|
1
2
|
import { ClientIdStringType } from '../../../../util/fullyQualifiedClientIdUtils';
|
|
2
3
|
export declare const jsonToByteArray: (data: any) => Uint8Array;
|
|
3
4
|
type GetE2EIClientIdReturnType = {
|
|
@@ -5,6 +6,7 @@ type GetE2EIClientIdReturnType = {
|
|
|
5
6
|
asBytes: Uint8Array;
|
|
6
7
|
};
|
|
7
8
|
export declare const getE2EIClientId: (clientId: string, userId: string, userDomain: string) => GetE2EIClientIdReturnType;
|
|
9
|
+
export declare const isMLSDevice: ({ mls_public_keys }: RegisteredClient) => boolean;
|
|
8
10
|
export declare const isResponseStatusValid: (status: string | undefined) => boolean | "" | undefined;
|
|
9
11
|
export {};
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/mls/E2EIdentityService/Helper/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,kBAAkB,EAAkC,MAAM,8CAA8C,CAAC;AAEjH,eAAO,MAAM,eAAe,SAAU,GAAG,KAAG,UAG3C,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AACF,eAAO,MAAM,eAAe,aAAc,MAAM,UAAU,MAAM,cAAc,MAAM,KAAG,yBAOtF,CAAC;AAEF,eAAO,MAAM,qBAAqB,WAAY,MAAM,GAAG,SAAS,6BAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/mls/E2EIdentityService/Helper/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AAEhE,OAAO,EAAC,kBAAkB,EAAkC,MAAM,8CAA8C,CAAC;AAEjH,eAAO,MAAM,eAAe,SAAU,GAAG,KAAG,UAG3C,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AACF,eAAO,MAAM,eAAe,aAAc,MAAM,UAAU,MAAM,cAAc,MAAM,KAAG,yBAOtF,CAAC;AAEF,eAAO,MAAM,WAAW,wBAAuB,gBAAgB,YACoB,CAAC;AAEpF,eAAO,MAAM,qBAAqB,WAAY,MAAM,GAAG,SAAS,6BAAiC,CAAC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.isResponseStatusValid = exports.getE2EIClientId = exports.jsonToByteArray = void 0;
|
|
21
|
+
exports.isResponseStatusValid = exports.isMLSDevice = exports.getE2EIClientId = exports.jsonToByteArray = void 0;
|
|
22
22
|
const fullyQualifiedClientIdUtils_1 = require("../../../../util/fullyQualifiedClientIdUtils");
|
|
23
23
|
const jsonToByteArray = (data) => {
|
|
24
24
|
const encoder = new TextEncoder();
|
|
@@ -34,5 +34,7 @@ const getE2EIClientId = (clientId, userId, userDomain) => {
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
exports.getE2EIClientId = getE2EIClientId;
|
|
37
|
+
const isMLSDevice = ({ mls_public_keys }) => typeof mls_public_keys.ed25519 === 'string' && mls_public_keys.ed25519.length > 0;
|
|
38
|
+
exports.isMLSDevice = isMLSDevice;
|
|
37
39
|
const isResponseStatusValid = (status) => status && status === 'valid';
|
|
38
40
|
exports.isResponseStatusValid = isResponseStatusValid;
|
|
@@ -10,19 +10,10 @@ import { MLSServiceConfig } from './MLSService.types';
|
|
|
10
10
|
import { AddUsersFailure, KeyPackageClaimUser } from '../../../conversation';
|
|
11
11
|
import { CoreDatabase } from '../../../storage/CoreDB';
|
|
12
12
|
import { RecurringTaskScheduler } from '../../../util/RecurringTaskScheduler';
|
|
13
|
-
import {
|
|
13
|
+
import { User } from '../E2EIdentityService';
|
|
14
14
|
import { getTokenCallback } from '../E2EIdentityService/E2EIServiceInternal';
|
|
15
15
|
import { ClientId, HandlePendingProposalsParams } from '../types';
|
|
16
16
|
export declare const optionalToUint8Array: (array: Uint8Array | []) => Uint8Array;
|
|
17
|
-
type EnrollmentProcessState = {
|
|
18
|
-
status: 'authentication';
|
|
19
|
-
authenticationChallenge: {
|
|
20
|
-
keyAuth: string;
|
|
21
|
-
challenge: AcmeChallenge;
|
|
22
|
-
};
|
|
23
|
-
} | {
|
|
24
|
-
status: 'successful';
|
|
25
|
-
};
|
|
26
17
|
interface LocalMLSServiceConfig extends MLSServiceConfig {
|
|
27
18
|
/**
|
|
28
19
|
* minimum number of key packages client should have available (configured to half of nbKeyPackages)
|
|
@@ -233,7 +224,7 @@ export declare class MLSService extends TypedEventEmitter<Events> {
|
|
|
233
224
|
* @param oAuthIdToken The OAuth id token if the user is already authenticated
|
|
234
225
|
* @returns AcmeChallenge if the user is not authenticated, true if the user is authenticated
|
|
235
226
|
*/
|
|
236
|
-
enrollE2EI(discoveryUrl: string, user: User, client: RegisteredClient, nbPrekeys: number, certificateTtl: number, getOAuthToken: getTokenCallback): Promise<
|
|
227
|
+
enrollE2EI(discoveryUrl: string, user: User, client: RegisteredClient, nbPrekeys: number, certificateTtl: number, getOAuthToken: getTokenCallback): Promise<void>;
|
|
237
228
|
}
|
|
238
229
|
export {};
|
|
239
230
|
//# sourceMappingURL=MLSService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MLSService.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/MLSService.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAqB,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAC,sBAAsB,EAAE,kBAAkB,EAAC,MAAM,sCAAsC,CAAC;AAChG,OAAO,EAAC,8BAA8B,EAAE,2BAA2B,EAAC,MAAM,+BAA+B,CAAC;AAE1G,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAIzD,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAW,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EACL,eAAe,EAIf,cAAc,EACd,UAAU,EAEV,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAC,gBAAgB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,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;IAY9F,wBAAwB,CACnC,KAAK,EAAE,8BAA8B,EACrC,yBAAyB,EAAE,CACzB,cAAc,EAAE,WAAW,EAC3B,iBAAiB,CAAC,EAAE,kBAAkB,KACnC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAgBrB,4BAA4B,CAAC,KAAK,EAAE,2BAA2B,EAAE,QAAQ,EAAE,MAAM;IAcjF,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE;IASjF;;;;;;;;OAQG;IACU,UAAU,CACrB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,gBAAgB,EACxB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,gBAAgB,GAC9B,OAAO,CAAC,IAAI,CAAC;CAuCjB"}
|
|
@@ -47,6 +47,7 @@ const fullyQualifiedClientIdUtils_1 = require("../../../util/fullyQualifiedClien
|
|
|
47
47
|
const numberToHex_1 = require("../../../util/numberToHex");
|
|
48
48
|
const TaskScheduler_1 = require("../../../util/TaskScheduler");
|
|
49
49
|
const E2EIServiceInternal_1 = require("../E2EIdentityService/E2EIServiceInternal");
|
|
50
|
+
const Helper_1 = require("../E2EIdentityService/Helper");
|
|
50
51
|
const events_1 = require("../EventHandler/events");
|
|
51
52
|
const messageAdd_1 = require("../EventHandler/events/messageAdd");
|
|
52
53
|
const MLSId_1 = require("../utils/MLSId");
|
|
@@ -720,8 +721,8 @@ class MLSService extends commons_1.TypedEventEmitter {
|
|
|
720
721
|
const rotateBundle = await e2eiServiceInternal.generateCertificate(getOAuthToken, isCertificateRenewal);
|
|
721
722
|
this.dispatchNewCrlDistributionPoints(rotateBundle);
|
|
722
723
|
// upload the clients public keys
|
|
723
|
-
if (!
|
|
724
|
-
// we only upload public keys for the initial certification process
|
|
724
|
+
if (!(0, Helper_1.isMLSDevice)(client)) {
|
|
725
|
+
// we only upload public keys for the initial certification process if the device is not already a registered MLS device.
|
|
725
726
|
await this.uploadMLSPublicKeys(client);
|
|
726
727
|
}
|
|
727
728
|
// Remove old key packages
|
|
@@ -742,7 +743,6 @@ class MLSService extends commons_1.TypedEventEmitter {
|
|
|
742
743
|
};
|
|
743
744
|
await this.uploadCommitBundle(groupIdAsBytes, newCommitBundle);
|
|
744
745
|
}
|
|
745
|
-
return { status: 'successful' };
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
exports.MLSService = MLSService;
|
package/package.json
CHANGED