Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Un-encrypted messages not allowed in E2EE rooms #32040

Merged
merged 56 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
7f34310
add new e2ee setting
yash-rajpal Mar 19, 2024
153dcfc
add e2ee hooks
yash-rajpal Mar 20, 2024
3eb2ea7
Warning UI
yash-rajpal Mar 20, 2024
7a4d783
integrating everything
yash-rajpal Mar 20, 2024
8d67812
add translations
yash-rajpal Mar 21, 2024
9555bab
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal Mar 26, 2024
cdc74a1
small refactor
yash-rajpal Mar 26, 2024
3eaa671
don't allow un-encrypted messages on server side
yash-rajpal Mar 26, 2024
c2b2c3a
introduce e2ee states
yash-rajpal Mar 27, 2024
8106158
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal Mar 27, 2024
f8c7072
fix TS and fix lint
yash-rajpal Mar 28, 2024
82f748c
refactor and remove unused code
yash-rajpal Mar 28, 2024
391d7b6
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal Apr 3, 2024
2f0d7e7
Merge branch 'develop' into e2e-unencrypted-setting
scuciatto Apr 5, 2024
dab85c3
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal Apr 15, 2024
8de4308
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal Apr 19, 2024
cb170dd
needle in haystack
yash-rajpal Apr 19, 2024
25737f4
fix conflicts
yash-rajpal Apr 19, 2024
0856ca2
remove memoizing
yash-rajpal May 2, 2024
77d17fd
room with e2ee setup routing
yash-rajpal May 2, 2024
4616c09
remove useIsE2EEReady hook
yash-rajpal May 2, 2024
b967e0c
update docs link to go.rocket.chat url
yash-rajpal May 2, 2024
2053ccf
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal May 2, 2024
cc3072b
avoid attaching listners multiple times
yash-rajpal May 2, 2024
4ab7f35
add e2e tests
yash-rajpal May 2, 2024
9ec6345
review (#32365)
gabriellsh May 7, 2024
8b1143b
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal May 7, 2024
e7950d3
fix review
yash-rajpal May 8, 2024
93a6b99
fix: removing commments, replacing deprecated type method with fill a…
hugocostadev May 8, 2024
788f486
Merge branch 'develop' into e2e-unencrypted-setting
hugocostadev May 8, 2024
fb40c6c
e2e tests reuse channel creation
yash-rajpal May 8, 2024
b796f6e
comment floky test
yash-rajpal May 8, 2024
bc90e28
add cs
yash-rajpal May 8, 2024
f4c0e7f
release the instance on changing the room encrypted property
yash-rajpal May 13, 2024
b3f7281
oops: TS
yash-rajpal May 13, 2024
1248e0b
fix conflicts
yash-rajpal May 13, 2024
c99e8e9
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal May 13, 2024
67e531d
fix flaky test
yash-rajpal May 14, 2024
9ed110a
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal May 14, 2024
11c3eec
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal May 15, 2024
ad46696
setting description
yash-rajpal May 15, 2024
85bb0f9
default setting value
yash-rajpal May 16, 2024
e9ecad0
api test cases
yash-rajpal May 16, 2024
b8698a6
e2e tests setting value
yash-rajpal May 16, 2024
d0b80ee
more api tests
yash-rajpal May 16, 2024
5095b35
oops
yash-rajpal May 16, 2024
a023fa0
toast messages
yash-rajpal May 16, 2024
153c68c
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal May 16, 2024
aa81aab
handle E2EE disabled case
yash-rajpal May 17, 2024
e00dbd0
handle wrong password case
yash-rajpal May 20, 2024
1eedb47
handle e2e enter password banner wrong password error state
yash-rajpal May 20, 2024
522f64d
wrong password toast
yash-rajpal May 20, 2024
4bad01e
better toasts
yash-rajpal May 20, 2024
da4a261
better change set
yash-rajpal May 24, 2024
613f935
Merge branch 'develop' into e2e-unencrypted-setting
yash-rajpal May 24, 2024
eb685e0
Merge branch 'develop' into e2e-unencrypted-setting
kodiakhq[bot] May 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/meteor/app/e2e/client/E2EEState.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export enum E2EEState {
NOT_STARTED = 'NOT_STARTED',
DISABLED = 'DISABLED',
LOADING_KEYS = 'LOADING_KEYS',
READY = 'READY',
SAVE_PASSWORD = 'SAVE_PASSWORD',
ENTER_PASSWORD = 'ENTER_PASSWORD',
ERROR = 'ERROR',
}
9 changes: 9 additions & 0 deletions apps/meteor/app/e2e/client/rocketchat.e2e.room.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ export class E2ERoom extends Emitter {
logError(`E2E ROOM { state: ${this.state}, rid: ${this.roomId} }`, ...msg);
}

getState() {
return this.state;
}

setState(requestedState) {
const currentState = this.state;
const nextState = filterMutation(currentState, requestedState);
Expand Down Expand Up @@ -208,6 +212,10 @@ export class E2ERoom extends Emitter {

// Initiates E2E Encryption
async handshake() {
if (!e2e.isReady()) {
return;
}

if (this.state !== E2ERoomState.KEYS_RECEIVED && this.state !== E2ERoomState.NOT_STARTED) {
return;
}
Expand Down Expand Up @@ -459,5 +467,6 @@ export class E2ERoom extends Emitter {
}

this.encryptKeyForOtherParticipants();
this.setState(E2ERoomState.READY);
}
}
Loading
Loading