@webex/plugin-meetings 3.13.0-next.16 → 3.13.0-next.18
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/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/events/typed-events-scope.js +135 -0
- package/dist/common/events/typed-events-scope.js.map +1 -0
- package/dist/common/types.js +7 -0
- package/dist/common/types.js.map +1 -0
- package/dist/config.js +1 -1
- package/dist/constants.js +5 -0
- package/dist/constants.js.map +1 -1
- package/dist/e2ee/E2eeController.js +609 -0
- package/dist/e2ee/E2eeController.js.map +1 -0
- package/dist/e2ee/E2eeManager.js +50 -31
- package/dist/e2ee/E2eeManager.js.map +1 -1
- package/dist/e2ee/E2eeSignaling.js +18 -21
- package/dist/e2ee/E2eeSignaling.js.map +1 -1
- package/dist/e2ee/MediaEncryptionService.js +2 -5
- package/dist/e2ee/MediaEncryptionService.js.map +1 -1
- package/dist/e2ee/MemberMLSReconciler.js +194 -0
- package/dist/e2ee/MemberMLSReconciler.js.map +1 -0
- package/dist/e2ee/constants.js +28 -0
- package/dist/e2ee/constants.js.map +1 -0
- package/dist/e2ee/mls.js +86 -68
- package/dist/e2ee/mls.js.map +1 -1
- package/dist/e2ee/types.js +66 -11
- package/dist/e2ee/types.js.map +1 -1
- package/dist/e2ee/wasm.d.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +394 -249
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +69 -58
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +4 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +87 -61
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +10 -0
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +159 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/members/collection.js +84 -1
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +58 -1
- package/dist/members/index.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/types/common/events/typed-events-scope.d.ts +73 -0
- package/dist/types/common/types.d.ts +9 -0
- package/dist/types/constants.d.ts +5 -0
- package/dist/types/e2ee/E2eeController.d.ts +131 -0
- package/dist/types/e2ee/E2eeManager.d.ts +26 -6
- package/dist/types/e2ee/E2eeSignaling.d.ts +1 -7
- package/dist/types/e2ee/MediaEncryptionService.d.ts +1 -3
- package/dist/types/e2ee/MemberMLSReconciler.d.ts +76 -0
- package/dist/types/e2ee/constants.d.ts +12 -0
- package/dist/types/e2ee/mls.d.ts +16 -10
- package/dist/types/e2ee/types.d.ts +117 -36
- package/dist/types/hashTree/hashTreeParser.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/meeting/index.d.ts +34 -0
- package/dist/types/meeting/util.d.ts +1 -1
- package/dist/types/member/index.d.ts +62 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/members/collection.d.ts +30 -0
- package/dist/types/members/index.d.ts +73 -0
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +21 -21
- package/src/common/events/typed-events-scope.ts +110 -0
- package/src/common/types.ts +10 -0
- package/src/constants.ts +6 -0
- package/src/e2ee/DESIGN.md +363 -0
- package/src/e2ee/E2eeController.ts +513 -0
- package/src/e2ee/E2eeManager.ts +48 -27
- package/src/e2ee/E2eeSignaling.ts +13 -28
- package/src/e2ee/MediaEncryptionService.ts +2 -4
- package/src/e2ee/MemberMLSReconciler.ts +175 -0
- package/src/e2ee/constants.ts +34 -0
- package/src/e2ee/mls.ts +63 -33
- package/src/e2ee/types.ts +129 -35
- package/src/e2ee/wasm.d.ts +18 -14
- package/src/hashTree/hashTreeParser.ts +1 -1
- package/src/index.ts +1 -0
- package/src/meeting/index.ts +155 -0
- package/src/meeting/request.ts +16 -0
- package/src/meeting/util.ts +2 -1
- package/src/meetings/index.ts +30 -5
- package/src/meetings/util.ts +8 -0
- package/src/member/index.ts +169 -0
- package/src/member/types.ts +1 -0
- package/src/members/collection.ts +67 -1
- package/src/members/index.ts +59 -1
- package/src/metrics/constants.ts +1 -0
- package/test/unit/spec/common/events/typed-events-scope.ts +88 -0
- package/test/unit/spec/e2ee/E2eeController.ts +753 -0
- package/test/unit/spec/e2ee/E2eeManager.ts +53 -29
- package/test/unit/spec/e2ee/E2eeSignaling.ts +19 -10
- package/test/unit/spec/e2ee/MemberMLSReconciler.ts +353 -0
- package/test/unit/spec/e2ee/mls.ts +86 -34
- package/test/unit/spec/meeting/index.js +662 -0
- package/test/unit/spec/meeting/request.js +35 -0
- package/test/unit/spec/meeting/utils.js +4 -0
- package/test/unit/spec/meetings/index.js +36 -1
- package/test/unit/spec/meetings/utils.js +15 -0
- package/test/unit/spec/member/index.js +292 -0
- package/test/unit/spec/members/collection.js +50 -0
- package/test/unit/spec/members/index.js +71 -0
- package/test/utils/webex-config.js +1 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
import type { IdentityProvider } from '@webex/internal-plugin-identity';
|
|
5
|
+
import TypedEventsScope from '../common/events/typed-events-scope';
|
|
6
|
+
import type WasmLoader from '../common/wasm-loader';
|
|
7
|
+
import { E2eeState } from './types';
|
|
8
|
+
import type { E2eeControllerEventMap, E2eeMeetingContext } from './types';
|
|
9
|
+
/**
|
|
10
|
+
* Per-meeting E2EE controller (owned by Meeting as `this.e2ee`). It orchestrates the MLS engine, the
|
|
11
|
+
* signaling adapter and the HTTP transport for one meeting, exposes the security code, media-service
|
|
12
|
+
* presence and lifecycle state, and re-emits E2EE events on the meeting. Its start() is a no-op
|
|
13
|
+
* unless the meeting requires E2EE (a V2/zero-trust meeting) and E2EE is enabled and supported.
|
|
14
|
+
*/
|
|
15
|
+
export default class E2eeController extends TypedEventsScope<E2eeControllerEventMap> {
|
|
16
|
+
private readonly context;
|
|
17
|
+
private readonly webex;
|
|
18
|
+
private readonly wasmLoader;
|
|
19
|
+
private readonly wasmUrl;
|
|
20
|
+
private readonly identityProvider;
|
|
21
|
+
private mlsSession?;
|
|
22
|
+
private signaling?;
|
|
23
|
+
private reconciler?;
|
|
24
|
+
private sessionUnsubscribers;
|
|
25
|
+
private currentState;
|
|
26
|
+
private securityCode?;
|
|
27
|
+
private readonly mediaServiceUrls;
|
|
28
|
+
private startAttempt;
|
|
29
|
+
/**
|
|
30
|
+
* @param {Object} deps
|
|
31
|
+
* @param {E2eeMeetingContext} deps.context - The meeting data and operations used by E2EE.
|
|
32
|
+
* @param {Object} deps.webex - The parent webex instance.
|
|
33
|
+
* @param {WasmLoader} deps.wasmLoader - Shared (pre-warmed) WASM loader.
|
|
34
|
+
* @param {string} deps.wasmUrl - URL of the E2EE WASM module.
|
|
35
|
+
* @param {IdentityProvider} deps.identityProvider - Shared identity/credential provider.
|
|
36
|
+
*/
|
|
37
|
+
constructor({ context, webex, wasmLoader, wasmUrl, identityProvider, }: {
|
|
38
|
+
context: E2eeMeetingContext;
|
|
39
|
+
webex: any;
|
|
40
|
+
wasmLoader: WasmLoader;
|
|
41
|
+
wasmUrl: string;
|
|
42
|
+
identityProvider: IdentityProvider;
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* @returns {E2eeState} the current E2EE lifecycle state.
|
|
46
|
+
*/
|
|
47
|
+
get state(): E2eeState;
|
|
48
|
+
/**
|
|
49
|
+
* @returns {boolean} whether the MLS roster contains a media service currently considered untrusted.
|
|
50
|
+
*/
|
|
51
|
+
get hasUntrustedMediaServices(): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @returns {string|undefined} the meeting security code, once available.
|
|
54
|
+
*/
|
|
55
|
+
getSecurityCode(): string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Refreshes the LLM channel used for MLS signaling after Meeting changes its channel.
|
|
58
|
+
* @returns {void}
|
|
59
|
+
*/
|
|
60
|
+
llmChannelChanged(): void;
|
|
61
|
+
/**
|
|
62
|
+
* @returns {boolean} whether this meeting requires an MLS join (V2/zero-trust) and E2EE is enabled.
|
|
63
|
+
*/
|
|
64
|
+
private required;
|
|
65
|
+
/**
|
|
66
|
+
* Starts the MLS session for this meeting. Idempotent and self-guarded: a no-op unless the
|
|
67
|
+
* meeting requires E2EE, and while a session is already starting or running. Never rejects —
|
|
68
|
+
* failures transition to the `failed` state and emit an E2EE failure event. Calling it again
|
|
69
|
+
* from `failed` or `evicted` retries with a fresh MLS session.
|
|
70
|
+
* @returns {Promise<void>}
|
|
71
|
+
*/
|
|
72
|
+
start(): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Tears down the MLS session and resets state, cancelling a start() that is still in progress.
|
|
75
|
+
* Idempotent.
|
|
76
|
+
* @returns {Promise<void>}
|
|
77
|
+
*/
|
|
78
|
+
stop(): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* @param {MLS} session
|
|
81
|
+
* @returns {void}
|
|
82
|
+
*/
|
|
83
|
+
private setupMlsSessionListeners;
|
|
84
|
+
/**
|
|
85
|
+
* Defers teardown until the WASM callback that emitted the event has returned.
|
|
86
|
+
* @param {MLS} session
|
|
87
|
+
* @param {E2eeState.Failed|E2eeState.Evicted} state
|
|
88
|
+
* @param {string} reason
|
|
89
|
+
* @param {Object} [details]
|
|
90
|
+
* @returns {void}
|
|
91
|
+
*/
|
|
92
|
+
private deferFatal;
|
|
93
|
+
/**
|
|
94
|
+
* Updates media-service presence and MLS-join completion from roster changes. MLS join is
|
|
95
|
+
* complete only once our own device URL appears in the roster.
|
|
96
|
+
* @param {Object} rosterChanges
|
|
97
|
+
* @param {E2eeRosterMember[]} rosterChanges.added
|
|
98
|
+
* @param {string[]} rosterChanges.removed
|
|
99
|
+
* @returns {void}
|
|
100
|
+
*/
|
|
101
|
+
private updateFromRoster;
|
|
102
|
+
/**
|
|
103
|
+
* @param {E2eeState.Failed|E2eeState.Evicted} state
|
|
104
|
+
* @param {string} reason
|
|
105
|
+
* @param {Object} [details] - Extra diagnostics included only in the behavioral metric.
|
|
106
|
+
* @param {number} [details.errorCode] - Media-encryption service error code.
|
|
107
|
+
* @param {string} [details.error] - Error message.
|
|
108
|
+
* @returns {void}
|
|
109
|
+
*/
|
|
110
|
+
private handleFatal;
|
|
111
|
+
/**
|
|
112
|
+
* Stops signaling, detaches session listeners, leaves the MLS group, and resets roster state.
|
|
113
|
+
* @returns {void}
|
|
114
|
+
*/
|
|
115
|
+
private cleanupSession;
|
|
116
|
+
/**
|
|
117
|
+
* Clears a security code that is no longer valid for the current MLS session.
|
|
118
|
+
* @returns {void}
|
|
119
|
+
*/
|
|
120
|
+
private clearSecurityCode;
|
|
121
|
+
/**
|
|
122
|
+
* @returns {string} the self participant's display name, or '' if unavailable.
|
|
123
|
+
*/
|
|
124
|
+
private getSelfDisplayName;
|
|
125
|
+
/**
|
|
126
|
+
* @param {E2eeState} state
|
|
127
|
+
* @returns {void}
|
|
128
|
+
*/
|
|
129
|
+
private setState;
|
|
130
|
+
private emitE2eeEvent;
|
|
131
|
+
}
|
|
@@ -2,22 +2,42 @@
|
|
|
2
2
|
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
3
|
*/
|
|
4
4
|
import WasmLoader from '../common/wasm-loader';
|
|
5
|
+
import E2eeController from './E2eeController';
|
|
6
|
+
import type { E2eeMeetingContext } from './types';
|
|
5
7
|
/**
|
|
6
|
-
* Owns E2EE resource preloading for a Meetings plugin session
|
|
7
|
-
*
|
|
8
|
+
* Owns E2EE resource preloading for a Meetings plugin session and creates its per-meeting
|
|
9
|
+
* controllers. Meetings supplies the shared WASM loader and resolved module URL.
|
|
8
10
|
*/
|
|
9
11
|
export default class E2eeManager {
|
|
10
12
|
private readonly webex;
|
|
11
13
|
private readonly wasmLoader;
|
|
12
|
-
private readonly
|
|
13
|
-
|
|
14
|
+
private readonly wasmUrl;
|
|
15
|
+
/**
|
|
16
|
+
* @param {Object} deps
|
|
17
|
+
* @param {Object} deps.webex - The parent webex instance.
|
|
18
|
+
* @param {WasmLoader} deps.wasmLoader - Shared WASM loader, owned by Meetings.
|
|
19
|
+
* @param {string} deps.wasmUrl - URL of the E2EE WASM module, resolved by Meetings.
|
|
20
|
+
*/
|
|
21
|
+
constructor({ webex, wasmLoader, wasmUrl }: {
|
|
14
22
|
webex: any;
|
|
15
23
|
wasmLoader: WasmLoader;
|
|
24
|
+
wasmUrl: string;
|
|
16
25
|
});
|
|
17
26
|
/**
|
|
18
|
-
*
|
|
19
|
-
|
|
27
|
+
* @returns {boolean} whether E2EE is enabled via config.
|
|
28
|
+
*/
|
|
29
|
+
get isEnabled(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Warms the shared E2EE resources (WASM module) when enabled. No-op when disabled. Rejection is
|
|
32
|
+
* handled by the caller (register wires this fire-and-forget so it can never fail registration).
|
|
20
33
|
* @returns {Promise<void>}
|
|
21
34
|
*/
|
|
22
35
|
preload(): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Creates the per-meeting E2EE controller, injecting the shared loader, module URL, identity provider and config.
|
|
38
|
+
* The returned controller's start() is a no-op unless the meeting requires E2EE and E2EE is enabled.
|
|
39
|
+
* @param {E2eeMeetingContext} context - The meeting data and operations used by E2EE.
|
|
40
|
+
* @returns {E2eeController}
|
|
41
|
+
*/
|
|
42
|
+
createE2eeController(context: E2eeMeetingContext): E2eeController;
|
|
23
43
|
}
|
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
3
|
*/
|
|
4
4
|
import type LLMChannel from '@webex/internal-plugin-llm';
|
|
5
|
-
|
|
6
|
-
type E2eeSignalingSource = 'llm' | 'mercury';
|
|
7
|
-
/** LLM event carrying the channel's connection state. */
|
|
8
|
-
export declare const LLM_ONLINE_EVENT = "online";
|
|
9
|
-
/** Mercury events carrying MLS protocol messages. */
|
|
10
|
-
export declare const MEDIA_ENCRYPTION_MERCURY_EVENTS: string[];
|
|
5
|
+
import type { E2eeSignalingSource } from './types';
|
|
11
6
|
/** The subset of the MLS engine the signaling adapter drives. */
|
|
12
7
|
export interface IMlsSignalingTarget {
|
|
13
8
|
handleEvent(bytes: Uint8Array, source: E2eeSignalingSource): void;
|
|
@@ -91,4 +86,3 @@ export default class E2eeSignaling {
|
|
|
91
86
|
*/
|
|
92
87
|
private isLlmOnlineForThisSession;
|
|
93
88
|
}
|
|
94
|
-
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
type WebexRequestMethod = (options: Record<string, any>) => Promise<any>;
|
|
4
|
+
import type { WebexRequestMethod } from '../common/types';
|
|
6
5
|
/**
|
|
7
6
|
* Routes the MLS engine's protocol HTTP requests to the media-encryption service via
|
|
8
7
|
* webex.request. Bodies are plain JS objects; MLS owns the conversion to/from the engine's bytes.
|
|
@@ -24,4 +23,3 @@ export default class MediaEncryptionService {
|
|
|
24
23
|
*/
|
|
25
24
|
request(url: string, body: unknown): Promise<unknown>;
|
|
26
25
|
}
|
|
27
|
-
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
import type Member from '../member';
|
|
5
|
+
import type MembersCollection from '../members/collection';
|
|
6
|
+
import type { MembersUpdatePayload } from '../members';
|
|
7
|
+
import type { E2eeRosterMember } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* Reconciles the MLS roster (keyed by device URL) against the meeting's `Members`, stamping a
|
|
10
|
+
* per-device verification onto each `Member` and deriving an aggregate verification state.
|
|
11
|
+
*
|
|
12
|
+
* It holds only the MLS roster; the device-URL -> member lookup lives in `MembersCollection`, and
|
|
13
|
+
* verification lives on each `Member`. Every path iterates its argument exactly once:
|
|
14
|
+
* - Member changes are fed in via `processMembersUpdate` (from the Members pre-emit processor),
|
|
15
|
+
* which stamps the (recreated) members' verification before `members:update` is emitted.
|
|
16
|
+
* - Roster changes update only the members owning the affected device URLs (via the collection's
|
|
17
|
+
* reverse index); members whose verification actually changed are handed to
|
|
18
|
+
* `reportMembersUpdated` so Members emits a `members:update` for them.
|
|
19
|
+
*/
|
|
20
|
+
export default class MemberMLSReconciler {
|
|
21
|
+
private readonly membersCollection;
|
|
22
|
+
private readonly reportMembersUpdated;
|
|
23
|
+
private readonly rosterByDeviceUrl;
|
|
24
|
+
/**
|
|
25
|
+
* @param {Object} deps
|
|
26
|
+
* @param {MembersCollection} deps.membersCollection - The meeting's members collection.
|
|
27
|
+
* @param {Function} deps.reportMembersUpdated - Asks Members to emit `members:update` for the
|
|
28
|
+
* given members (used for roster-driven verification changes that have no Locus update).
|
|
29
|
+
*/
|
|
30
|
+
constructor({ membersCollection, reportMembersUpdated, }: {
|
|
31
|
+
membersCollection: MembersCollection;
|
|
32
|
+
reportMembersUpdated: (updatedMembers: Member[]) => void;
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* Stamps verification onto the members changed by a Locus update, before `members:update` is
|
|
36
|
+
* emitted. Does not itself emit — Members emits the (single) event.
|
|
37
|
+
* @param {MembersUpdatePayload} payload
|
|
38
|
+
* @returns {void}
|
|
39
|
+
*/
|
|
40
|
+
processMembersUpdate(payload: MembersUpdatePayload): void;
|
|
41
|
+
/**
|
|
42
|
+
* Adds/updates MLS roster members, updating the owning member's per-device verification and
|
|
43
|
+
* reporting the members whose verification changed.
|
|
44
|
+
* @param {E2eeRosterMember[]} added
|
|
45
|
+
* @returns {void}
|
|
46
|
+
*/
|
|
47
|
+
applyRosterAdded(added: E2eeRosterMember[]): void;
|
|
48
|
+
/**
|
|
49
|
+
* Removes MLS roster members by device URL, clearing the owning member's per-device verification
|
|
50
|
+
* and reporting the members whose verification changed.
|
|
51
|
+
* @param {string[]} urls
|
|
52
|
+
* @returns {void}
|
|
53
|
+
*/
|
|
54
|
+
applyRosterRemoved(urls: string[]): void;
|
|
55
|
+
/**
|
|
56
|
+
* Clears the roster and the verification it had applied, reporting the affected members.
|
|
57
|
+
* @returns {void}
|
|
58
|
+
*/
|
|
59
|
+
reset(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Replaces a member's verification from the current roster (for a recreated member). No report.
|
|
62
|
+
* @param {any} member
|
|
63
|
+
* @returns {void}
|
|
64
|
+
*/
|
|
65
|
+
private stampMember;
|
|
66
|
+
/**
|
|
67
|
+
* @param {Set} changed
|
|
68
|
+
* @returns {void}
|
|
69
|
+
*/
|
|
70
|
+
private report;
|
|
71
|
+
/**
|
|
72
|
+
* @param {E2eeRosterMember} rosterEntry
|
|
73
|
+
* @returns {E2eeDeviceVerification}
|
|
74
|
+
*/
|
|
75
|
+
private static toDeviceVerification;
|
|
76
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
/** LLM/Mercury events carrying MLS protocol messages, forwarded to the MLS engine. */
|
|
5
|
+
export declare const MEDIA_ENCRYPTION_MERCURY_EVENTS: string[];
|
|
6
|
+
/** Webex service names resolved from the service catalog. */
|
|
7
|
+
export declare const MEDIA_ENCRYPTION_SERVICE = "media-encryption";
|
|
8
|
+
/** MLS roster device type identifying a backend media service. */
|
|
9
|
+
export declare const MEDIA_SERVICE_DEVICE_TYPE = "MEDIA_SERVICE";
|
|
10
|
+
export declare const E2EE_WASM_ASSET = "e2ee-0.0.1.wasm";
|
|
11
|
+
/** Locus join-request device capability advertising support for large (1K) E2EE meetings. */
|
|
12
|
+
export declare const E2EE_1K_SUPPORTED = "E2EE_1K_SUPPORTED";
|
package/dist/types/e2ee/mls.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface MLSEventMap {
|
|
|
14
14
|
joinFailure: {
|
|
15
15
|
reason: string;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
mediaEncryptionServiceFailure: {
|
|
18
18
|
errorCode: number;
|
|
19
19
|
message: string;
|
|
20
20
|
};
|
|
@@ -47,20 +47,21 @@ export type MLSEvent = keyof MLSEventMap;
|
|
|
47
47
|
* emitted as typed events. This keeps it unit-testable in isolation.
|
|
48
48
|
*/
|
|
49
49
|
export default class MLS {
|
|
50
|
-
private readonly
|
|
50
|
+
private readonly module;
|
|
51
51
|
private readonly httpClient;
|
|
52
52
|
private readonly emitter;
|
|
53
53
|
private readonly transactions;
|
|
54
54
|
private e2ee;
|
|
55
|
+
private readonly waitTimeouts;
|
|
55
56
|
private lastSecurityCode;
|
|
56
57
|
/**
|
|
57
58
|
* @param {Object} deps
|
|
59
|
+
* @param {ModuleInstance} deps.module - The loaded WASM module used to instantiate the engine.
|
|
58
60
|
* @param {IMlsHttpClient} deps.httpClient - Transport for the engine's protocol requests.
|
|
59
|
-
* @param {Function} deps.loadModule - Loads the WASM module instance; supplied by the integration layer.
|
|
60
61
|
*/
|
|
61
|
-
constructor({ httpClient,
|
|
62
|
+
constructor({ httpClient, module }: {
|
|
62
63
|
httpClient: IMlsHttpClient;
|
|
63
|
-
|
|
64
|
+
module: ModuleInstance;
|
|
64
65
|
});
|
|
65
66
|
/**
|
|
66
67
|
* Subscribe to an engine event.
|
|
@@ -83,12 +84,12 @@ export default class MLS {
|
|
|
83
84
|
*/
|
|
84
85
|
private emitEvent;
|
|
85
86
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
87
|
+
* Instantiates the engine, wires its callbacks, and applies credentials, trust anchors and
|
|
88
|
+
* timeouts. Must be called before {@link join}.
|
|
88
89
|
* @param {MLSConfig} config
|
|
89
|
-
* @returns {
|
|
90
|
+
* @returns {void}
|
|
90
91
|
*/
|
|
91
|
-
initialize(config: MLSConfig):
|
|
92
|
+
initialize(config: MLSConfig): void;
|
|
92
93
|
/**
|
|
93
94
|
* @returns {void}
|
|
94
95
|
*/
|
|
@@ -121,7 +122,7 @@ export default class MLS {
|
|
|
121
122
|
* `e2ee_negotiation_failure` out of this call when it can't recover from the service's error code
|
|
122
123
|
* or fails to process a successful response; this surfaces in JS as an opaque value with no
|
|
123
124
|
* message. That is unrecoverable for the in-flight operation, so it is reported as
|
|
124
|
-
* `
|
|
125
|
+
* `mediaEncryptionServiceFailure` instead of escaping as an unhandled rejection.
|
|
125
126
|
* @param {number} handlerId
|
|
126
127
|
* @param {boolean} success
|
|
127
128
|
* @param {Uint8Array} body
|
|
@@ -149,6 +150,11 @@ export default class MLS {
|
|
|
149
150
|
* @returns {void}
|
|
150
151
|
*/
|
|
151
152
|
leave(): void;
|
|
153
|
+
/**
|
|
154
|
+
* Detaches engine callbacks and releases the WASM engine and wrapper resources.
|
|
155
|
+
* @returns {void}
|
|
156
|
+
*/
|
|
157
|
+
cleanUp(): void;
|
|
152
158
|
/**
|
|
153
159
|
* Forwards an incoming MLS protocol event (from the signaling channel) to the engine.
|
|
154
160
|
* @param {Uint8Array} eventData
|
|
@@ -1,11 +1,81 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
3
|
*/
|
|
4
|
+
import type { IdentityCredentials, IdentityTrustAnchors } from '@webex/internal-plugin-identity';
|
|
5
|
+
import type LLMChannel from '@webex/internal-plugin-llm';
|
|
6
|
+
import { EVENT_TRIGGERS, type Enum } from '../constants';
|
|
7
|
+
import type { LocusDTO } from '../locus-info/types';
|
|
8
|
+
import type Members from '../members';
|
|
9
|
+
/** The Locus DTO fields consumed by E2EE, matching the shape exposed by `Meeting.locusInfo`. */
|
|
10
|
+
export type E2eeLocusInfo = Pick<LocusDTO, 'url' | 'info'>;
|
|
11
|
+
/** Per-meeting context supplied by Meetings without exposing its Meeting class to E2EE. */
|
|
12
|
+
export interface E2eeMeetingContext {
|
|
13
|
+
getCorrelationId(): string;
|
|
14
|
+
getLocusInfo(): E2eeLocusInfo | undefined;
|
|
15
|
+
getLlmChannel(): LLMChannel | undefined;
|
|
16
|
+
members: Members;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* SDK-facing E2EE types (camelCase), mapped from the raw WASM boundary shapes in wasm.d.ts.
|
|
20
|
+
*/
|
|
21
|
+
/** Lifecycle state of a per-meeting MLS session. */
|
|
22
|
+
export declare const E2eeState: {
|
|
23
|
+
readonly Disabled: "disabled";
|
|
24
|
+
readonly Initializing: "initializing";
|
|
25
|
+
readonly Joining: "joining";
|
|
26
|
+
readonly Joined: "joined";
|
|
27
|
+
readonly Failed: "failed";
|
|
28
|
+
readonly Evicted: "evicted";
|
|
29
|
+
readonly Left: "left";
|
|
30
|
+
};
|
|
31
|
+
export type E2eeState = Enum<typeof E2eeState>;
|
|
32
|
+
/** Event payloads emitted by E2eeController and forwarded through Meeting. */
|
|
33
|
+
export interface E2eeControllerEventMap {
|
|
34
|
+
[EVENT_TRIGGERS.MEETING_E2EE_SECURITY_CODE_UPDATED]: {
|
|
35
|
+
securityCode: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
[EVENT_TRIGGERS.MEETING_E2EE_STATE_CHANGED]: {
|
|
38
|
+
state: E2eeState;
|
|
39
|
+
};
|
|
40
|
+
[EVENT_TRIGGERS.MEETING_E2EE_MEDIA_SERVICES_CHANGED]: {
|
|
41
|
+
hasMediaServices: boolean;
|
|
42
|
+
};
|
|
43
|
+
[EVENT_TRIGGERS.MEETING_E2EE_FAILURE]: {
|
|
44
|
+
reason: string;
|
|
45
|
+
errorCode?: number;
|
|
46
|
+
errorMessage?: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export type E2eeControllerEvent = keyof E2eeControllerEventMap;
|
|
50
|
+
/** The meeting's overall E2EE trust state, surfaced to the app for its UI indicator. */
|
|
51
|
+
export declare const TrustState: {
|
|
52
|
+
readonly Calculating: "calculating";
|
|
53
|
+
readonly Failed: "failed";
|
|
54
|
+
readonly Strong: "strong";
|
|
55
|
+
readonly ZeroTrust: "zeroTrust";
|
|
56
|
+
readonly AdaptiveStrong: "adaptiveStrong";
|
|
57
|
+
readonly AdaptiveZeroTrust: "adaptiveZeroTrust";
|
|
58
|
+
};
|
|
59
|
+
export type TrustState = Enum<typeof TrustState>;
|
|
60
|
+
/** A media-encryption (SFrame) key for a given MLS epoch. */
|
|
61
|
+
export interface E2eeKey {
|
|
62
|
+
epoch: number;
|
|
63
|
+
baseKey: Uint8Array;
|
|
64
|
+
index: number;
|
|
65
|
+
indexBits: number;
|
|
66
|
+
canEncrypt: boolean;
|
|
67
|
+
}
|
|
68
|
+
/** SFrame parameters negotiated for the group, reported on a successful join. */
|
|
69
|
+
export interface SframeParams {
|
|
70
|
+
cipherSuite: number;
|
|
71
|
+
epochBits: number;
|
|
72
|
+
}
|
|
4
73
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
74
|
+
* Credential-validation outcome for an MLS roster member. Mirrors (by ordinal) the C++
|
|
75
|
+
* `RosterStatus::ValidationResult` enum in libe2ee (`common/include/e2ee_common/types.h`) — keep
|
|
76
|
+
* the two in sync. For MultiCredential, `PartialSuccess` means at least one credential passed and
|
|
77
|
+
* at least one failed; X.509 identity verification is derived from the individual X.509 results.
|
|
7
78
|
*/
|
|
8
|
-
/** Credential-validation outcome from the MLS roster. Keep ordinals in sync with libe2ee. */
|
|
9
79
|
export declare const E2eeValidationResult: {
|
|
10
80
|
readonly Success: 0;
|
|
11
81
|
readonly PartialSuccess: 1;
|
|
@@ -22,29 +92,19 @@ export declare const E2eeValidationResult: {
|
|
|
22
92
|
readonly UnsupportedCredentialType: 12;
|
|
23
93
|
readonly MissingDisplayNameExtension: 13;
|
|
24
94
|
};
|
|
25
|
-
export type E2eeValidationResult =
|
|
26
|
-
/**
|
|
95
|
+
export type E2eeValidationResult = Enum<typeof E2eeValidationResult>;
|
|
96
|
+
/**
|
|
97
|
+
* Identity type attached to the leaf X.509 certificate. Mirrors the C++ `IdentityType` enum in
|
|
98
|
+
* libe2ee (`common/include/e2ee_common/types.h`) — keep the ordinals in sync.
|
|
99
|
+
*/
|
|
27
100
|
export declare const E2eeIdentityType: {
|
|
28
101
|
readonly WebexAnonymousIdentity: 0;
|
|
29
102
|
readonly WebexMachineIdentity: 1;
|
|
30
103
|
readonly WebexUserIdentity: 2;
|
|
31
104
|
readonly ExternalVerifiedIdentity: 3;
|
|
32
105
|
};
|
|
33
|
-
export type E2eeIdentityType =
|
|
34
|
-
/**
|
|
35
|
-
export interface E2eeKey {
|
|
36
|
-
epoch: number;
|
|
37
|
-
baseKey: Uint8Array;
|
|
38
|
-
index: number;
|
|
39
|
-
indexBits: number;
|
|
40
|
-
canEncrypt: boolean;
|
|
41
|
-
}
|
|
42
|
-
/** SFrame parameters negotiated for an MLS group. */
|
|
43
|
-
export interface SframeParams {
|
|
44
|
-
cipherSuite: number;
|
|
45
|
-
epochBits: number;
|
|
46
|
-
}
|
|
47
|
-
/** Parsed certificate information returned with a roster member. */
|
|
106
|
+
export type E2eeIdentityType = Enum<typeof E2eeIdentityType>;
|
|
107
|
+
/** Parsed X.509 certificate details from a member's certificate chain. */
|
|
48
108
|
export interface E2eeCertificateInfo {
|
|
49
109
|
primaryName: string;
|
|
50
110
|
commonName: string;
|
|
@@ -59,36 +119,53 @@ export interface E2eeCertificateInfo {
|
|
|
59
119
|
der: Uint8Array;
|
|
60
120
|
}
|
|
61
121
|
export interface E2eeIdentityResult {
|
|
122
|
+
/** Result for this X.509 credential, which may differ from the overall MultiCredential result. */
|
|
62
123
|
result: E2eeValidationResult;
|
|
63
124
|
certificateChain: E2eeCertificateInfo[];
|
|
64
125
|
failedCertIndex?: number;
|
|
65
126
|
}
|
|
66
|
-
/** A member of the MLS roster and its credential
|
|
127
|
+
/** A member of the MLS roster and its overall libe2ee credential validation result. */
|
|
67
128
|
export interface E2eeRosterMember {
|
|
68
|
-
|
|
129
|
+
deviceUrl: string;
|
|
69
130
|
displayName: string;
|
|
70
131
|
deviceType: string;
|
|
71
132
|
validationResult: E2eeValidationResult;
|
|
72
133
|
identityResults?: E2eeIdentityResult[];
|
|
73
134
|
}
|
|
74
|
-
/**
|
|
135
|
+
/** Per-device E2EE verification result, derived from the MLS roster and applied onto a Member. */
|
|
136
|
+
export interface E2eeDeviceVerification {
|
|
137
|
+
deviceUrl: string;
|
|
138
|
+
/** Overall libe2ee result for this device's credential or MultiCredential. */
|
|
139
|
+
validationResult: E2eeValidationResult;
|
|
140
|
+
displayName?: string;
|
|
141
|
+
deviceType?: string;
|
|
142
|
+
identityResults?: E2eeIdentityResult[];
|
|
143
|
+
}
|
|
144
|
+
/** E2EE verification state of a single device, derived from its X.509 identity result. */
|
|
145
|
+
export declare const E2eeDeviceVerificationState: {
|
|
146
|
+
readonly Unknown: "unknown";
|
|
147
|
+
readonly Verified: "verified";
|
|
148
|
+
readonly Unverified: "unverified";
|
|
149
|
+
};
|
|
150
|
+
export type E2eeDeviceVerificationState = Enum<typeof E2eeDeviceVerificationState>;
|
|
151
|
+
/** A member's aggregate E2EE verification state across all of their devices. */
|
|
152
|
+
export declare const E2eeMemberVerificationState: {
|
|
153
|
+
readonly Unknown: "unknown";
|
|
154
|
+
readonly Verified: "verified";
|
|
155
|
+
readonly Unverified: "unverified";
|
|
156
|
+
readonly PartiallyVerified: "partiallyVerified";
|
|
157
|
+
};
|
|
158
|
+
export type E2eeMemberVerificationState = Enum<typeof E2eeMemberVerificationState>;
|
|
159
|
+
/** Configuration for initializing an MLS group session. */
|
|
75
160
|
export interface MLSConfig {
|
|
76
161
|
participantId: string;
|
|
77
162
|
deviceUrl: string;
|
|
78
|
-
deviceType
|
|
163
|
+
deviceType: string;
|
|
79
164
|
correlationId: string;
|
|
80
165
|
displayName: string;
|
|
81
166
|
serviceUrl: string;
|
|
82
|
-
credentials?:
|
|
83
|
-
|
|
84
|
-
certChain: Uint8Array[];
|
|
85
|
-
};
|
|
86
|
-
trustAnchors?: {
|
|
87
|
-
webexCaRoots?: string;
|
|
88
|
-
domainNameRoots?: string;
|
|
89
|
-
userIdentityRoots?: string;
|
|
90
|
-
domainNameRootsP7b?: Uint8Array;
|
|
91
|
-
};
|
|
167
|
+
credentials?: IdentityCredentials;
|
|
168
|
+
trustAnchors?: IdentityTrustAnchors;
|
|
92
169
|
joinTimeout?: number;
|
|
93
170
|
coalesceWindow?: number;
|
|
94
171
|
}
|
|
@@ -100,5 +177,9 @@ export interface MLSConfig {
|
|
|
100
177
|
export interface IMlsHttpClient {
|
|
101
178
|
request(url: string, body: unknown): Promise<unknown>;
|
|
102
179
|
}
|
|
103
|
-
/**
|
|
104
|
-
export
|
|
180
|
+
/** Which signaling channel an incoming MLS protocol event arrived on. */
|
|
181
|
+
export declare const E2eeSignalingSource: {
|
|
182
|
+
readonly Llm: "llm";
|
|
183
|
+
readonly Mercury: "mercury";
|
|
184
|
+
};
|
|
185
|
+
export type E2eeSignalingSource = Enum<typeof E2eeSignalingSource>;
|
|
@@ -3,6 +3,7 @@ import HashTree from './hashTree';
|
|
|
3
3
|
import { Enum } from '../constants';
|
|
4
4
|
import { HtMeta, HashTreeObject } from './types';
|
|
5
5
|
import { LocusDTO } from '../locus-info/types';
|
|
6
|
+
import type { WebexRequestMethod } from '../common/types';
|
|
6
7
|
export declare enum SyncAllBackoffType {
|
|
7
8
|
NONE = "none",
|
|
8
9
|
ONLY_LLM = "onlyLLM",
|
|
@@ -48,7 +49,6 @@ interface InternalDataSet extends DataSet {
|
|
|
48
49
|
heartbeatWatchdogTimer?: ReturnType<typeof setTimeout>;
|
|
49
50
|
syncAbortController?: AbortController;
|
|
50
51
|
}
|
|
51
|
-
type WebexRequestMethod = (options: Record<string, any>) => Promise<any>;
|
|
52
52
|
type GenerateTrackingId = () => string | undefined;
|
|
53
53
|
export declare const LocusInfoUpdateType: {
|
|
54
54
|
readonly OBJECTS_UPDATED: "OBJECTS_UPDATED";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { type Reaction } from './reactions/reactions.type';
|
|
|
20
20
|
export { SitePreferenceSelectOption } from './meetings/meetings.types';
|
|
21
21
|
export type { FetchSitePreferencesMeViaSiteOptions, SitePreferencesResponse, } from './meetings/meetings.types';
|
|
22
22
|
export type { Interpreter, InterpreterUsingResource } from './interpretation/interpretation.types';
|
|
23
|
+
export type { E2eeControllerEvent, E2eeControllerEventMap } from './e2ee/types';
|
|
23
24
|
export { CaptchaError, IntentToJoinError, JoinMeetingError, PasswordError, PermissionError, ReclaimHostIsHostAlreadyError, ReclaimHostNotAllowedError, ReclaimHostNotSupportedError, ReclaimHostEmptyWrongKeyError, Meeting, MeetingInfoUtil, JoinWebinarError, SdpResponseTimeoutError, };
|
|
24
25
|
export { RemoteMedia } from './multistream/remoteMedia';
|
|
25
26
|
export { default as TriggerProxy } from './common/events/trigger-proxy';
|
|
@@ -14,6 +14,8 @@ import MediaProperties from '../media/properties';
|
|
|
14
14
|
import ReconnectionManager from '../reconnection-manager';
|
|
15
15
|
import MeetingRequest from './request';
|
|
16
16
|
import Members from '../members/index';
|
|
17
|
+
import type E2eeController from '../e2ee/E2eeController';
|
|
18
|
+
import { TrustState } from '../e2ee/types';
|
|
17
19
|
import { DESTINATION_TYPE, NETWORK_STATUS } from '../constants';
|
|
18
20
|
import { ReceiveSlotManager } from '../multistream/receiveSlotManager';
|
|
19
21
|
import { MediaRequestManager } from '../multistream/mediaRequestManager';
|
|
@@ -390,6 +392,8 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
390
392
|
meetingInfo: any;
|
|
391
393
|
meetingRequest: MeetingRequest;
|
|
392
394
|
members: Members;
|
|
395
|
+
e2ee?: E2eeController;
|
|
396
|
+
private lastTrustState?;
|
|
393
397
|
options: object;
|
|
394
398
|
orgId: string;
|
|
395
399
|
owner: string;
|
|
@@ -833,6 +837,15 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
833
837
|
* @memberof Meeting
|
|
834
838
|
*/
|
|
835
839
|
private setUpLocusSelfListener;
|
|
840
|
+
/**
|
|
841
|
+
* Drives the E2EE MLS lifecycle from self-state changes for this WDM device:
|
|
842
|
+
* join once the device is JOINED, leave when it is moved back into the lobby.
|
|
843
|
+
* @param {Object} payload the LOCUS_INFO_UPDATE_SELF payload (oldSelf, newSelf)
|
|
844
|
+
* @returns {undefined}
|
|
845
|
+
* @private
|
|
846
|
+
* @memberof Meeting
|
|
847
|
+
*/
|
|
848
|
+
private updateE2eeOnSelfChange;
|
|
836
849
|
/**
|
|
837
850
|
* Notify any changes on the pstn devices
|
|
838
851
|
* @param {Object} payload
|
|
@@ -1061,6 +1074,27 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1061
1074
|
* @memberof Meeting
|
|
1062
1075
|
*/
|
|
1063
1076
|
getMembers(): Members;
|
|
1077
|
+
/**
|
|
1078
|
+
* The meeting's overall trust state, derived from the Locus E2EE flags, the MLS join state
|
|
1079
|
+
* and media-service presence. Undefined when the local device is not joined to the meeting.
|
|
1080
|
+
* @returns {TrustState | undefined}
|
|
1081
|
+
* @public
|
|
1082
|
+
* @memberof Meeting
|
|
1083
|
+
*/
|
|
1084
|
+
get trustState(): TrustState | undefined;
|
|
1085
|
+
/**
|
|
1086
|
+
* Emits when a Locus or MLS update changes the meeting's overall E2EE trust state.
|
|
1087
|
+
* @returns {void}
|
|
1088
|
+
* @private
|
|
1089
|
+
*/
|
|
1090
|
+
private updateTrustState;
|
|
1091
|
+
/**
|
|
1092
|
+
* Forwards E2EE controller events and updates the derived trust state when relevant E2EE state changes.
|
|
1093
|
+
* @param {E2eeController | undefined} e2ee
|
|
1094
|
+
* @returns {void}
|
|
1095
|
+
* @private
|
|
1096
|
+
*/
|
|
1097
|
+
private setupE2eeEventForwarding;
|
|
1064
1098
|
/**
|
|
1065
1099
|
* Sets the meeting info on the class instance
|
|
1066
1100
|
* @param {Object} meetingInfo
|