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

refactor: Use corecrypto to get devices verification state #16220

Merged

Conversation

atomrc
Copy link
Contributor

@atomrc atomrc commented Nov 15, 2023

Description

This harmonizes the way we get devices certificates. CoreCrypto is our sole source of truth for that

Screenshots/Screencast (for UI changes)

image

Checklist

  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

@atomrc atomrc requested review from otto-the-bot and a team as code owners November 15, 2023 16:01
@atomrc atomrc changed the title Fix/simplify device verif refactor: Use corecrypto to get devices verification state Nov 15, 2023
Comment on lines +41 to +42
// @fixme: soon coreCrypto will return a `isValid` property. Use this one to check for validity
return identity ? 'verified' : 'unverified';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be improved when CoreCrypto gives us back the verification state

// TODO, soon coreCrypto will return a `isValid` property. Use this one to check for validity
setIsMLSVerified(!!identities?.length);
const verificationState = await getDeviceVerificationState(groupId, userId, device.id);
setIsMLSVerified(verificationState === 'verified');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will also be improved by CoreCrypto future releases

Comment on lines +109 to +111
{/*
TODO get the fingerprint from CoreCrypto (?)
mlsFingerprint && <MLSDeviceDetails fingerprint={mlsFingerprint} />*/}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be done in a further PR. We do not have direct access to the finger print from the network call. I'll have to figure out how to get it for other people's devices

@atomrc atomrc merged commit b818705 into feature/WPB-482-conversation-shields Nov 15, 2023
12 checks passed
@atomrc atomrc deleted the fix/simplify-device-verif branch November 15, 2023 16:56
przemvs pushed a commit that referenced this pull request Nov 30, 2023
* feat: add route for e2eIdentity Landingpage, add server redirect

* feat: add E2EI Feature flag

* feat: add info

* wip

* feat: add loading, error and done modals to the flow

* fix: update ignore

* featr: finish modal implementation and setup tests

* fix: remove yalc

* chore: rename delayTimer callbacks for clarity

* Co-authored-by: Amir Ghezelbash <[email protected]>

* feat: change redirect route from /auth/oidc to /auth to circumvent cookie problem

* fix: lockfile & types

* feat: get the certificate is working

* feat: remove unused page

* feat: change api of E2EI

* feat: Conversations shields

* feat: clear uri from redirect valuesw

* Prepare shields

* remove unused files

* update wire-web-packages and remove icons from wire-webapp

* refactor: move parts of the code out of webapp

* fix: router behaviour for oauth

* feat: add base tests

* feat: add UI functionality (redirects) to thr webapp

* chore: rebuild yarn.lock

* feat: add a new featureChangeHandler to start the E2EI flow

* feat: clear oidc progress at error

* feat: replace url param after get certificate

* fix: clean up after success or failed try.

* chore: move util functions

* fix: yarn errors

* feat: Show MLS Info on devices (#15637)

* feature: Show MLS Info on devices

* Prepare mls details in right sidebar and device details

* remove unecessary code

* feat: add mls fingerprint

* fix todos

* feat: add translations

* code review changes

* rename badges to verificationbadges

* cr fixes

* feat: Show E2E Identity certificate info (#15677)

* feature: Show MLS Info on devices

* Prepare mls details in right sidebar and device details

* remove unecessary code

* feature: Show E2E Identity certificate info

* remove unecessary code

* fix: change design for serial number

* feat: add mls fingerprint

* fix todos

* connect with core and hide serial number

* fix: rename to e2ei from e2e

* feat: See E2EI certificate details [WPB-2213] (#15745)

* feat: See E2EI certificate details

* feat: Add certificate details modal

* fix: create proper styles for modal

* fix: add comments

* fixes: remove unecessary code

* fix: codereview changes

* feat: add translations

* code review changes

* get e2ei certificate

* feat: Download E2EI certificate (#15794)

* feat: Download E2EI certificate

* cr changes

* Add certificate details

* Other devices e2ei status

* cr fixes

* CR Changes

* feat: Add expires soon badge (#15899)

* feat: Add expires soon badge

* Add comment

* fixes

* feat: manage conversation verification state for mls [WPB-482] (#15889)

* revert loadable component

* feat: Indicate client with valid certificate (#16018)

* feat: Indicate client with valid certificate

* remove unecessary code

* yarn.lock file update

* yarn.lock file update

* update yarn.locks

* lint fixes

* test fixes

* feat: Add MLS Verification Badges (#16029)

* feat: Add MLS Verification Badges

* fix:  remove yalc import

---------

Co-authored-by: Adrian Weiß <[email protected]>

* test fixes

* Add translations and fix section

* fix

* restore files from dev

* feat: Conversation shields improvements (#16163)

* feat: Conversation shields improvements

* CR fixes

* revert unnecessary changes

* feat: Prepare core e2ei service method (#16164)

* feat: Prepare core e2ei service method

* fix: core mock in e2eiHandler tests

* remove duplicated code

* fix tests

---------

Co-authored-by: Adrian Weiß <[email protected]>

* fix: Improve user verification badges computation (#16218)

* fix spelling of enroll

* refactor: Use corecrypto to get devices verification state (#16220)

* feat: rely on CoreCrypto to get device full identity (#16221)

* fix: Do not show current device proteus verification state (#16222)

* chore: Setup user verification badges (#16226)

* feat: Show E2EI Verification system message (#16224)

* feat: Show E2EI Verification system message

* Add second line message

* render e2ei verification system message

* remove unused code

* show system message

* fix for display verification message

* fix for displaying cell state description

* suggestion fix

* chore(deps): Bump crowdin/github-action from 1.15.1 to 1.15.2 (#16227)

Bumps [crowdin/github-action](https://github.com/crowdin/github-action) from 1.15.1 to 1.15.2.
- [Release notes](https://github.com/crowdin/github-action/releases)
- [Commits](crowdin/github-action@v1.15.1...v1.15.2)

---
updated-dependencies:
- dependency-name: crowdin/github-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump @wireapp/commons from 5.2.2 to 5.2.3 in /server (#16229)

Bumps [@wireapp/commons](https://github.com/wireapp/wire-web-packages) from 5.2.2 to 5.2.3.
- [Commits](https://github.com/wireapp/wire-web-packages/compare/@wireapp/[email protected]...@wireapp/[email protected])

---
updated-dependencies:
- dependency-name: "@wireapp/commons"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): Bump the eslint group with 2 updates (#16230)

Bumps the eslint group with 2 updates: [eslint](https://github.com/eslint/eslint) and [@types/eslint](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/eslint).


Updates `eslint` from 8.53.0 to 8.54.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.53.0...v8.54.0)

Updates `@types/eslint` from 8.44.4 to 8.44.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/eslint)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: "@types/eslint"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump the datadog group with 2 updates (#16231)

Bumps the datadog group with 2 updates: [@datadog/browser-logs](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/logs) and [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum).


Updates `@datadog/browser-logs` from 5.2.0 to 5.3.0
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v5.3.0/packages/logs)

Updates `@datadog/browser-rum` from 5.2.0 to 5.3.0
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v5.3.0/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-logs"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: datadog
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: datadog
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): Bump @wireapp/copy-config from 2.1.10 to 2.1.11 (#16232)

Bumps [@wireapp/copy-config](https://github.com/wireapp/wire-web-packages) from 2.1.10 to 2.1.11.
- [Commits](https://github.com/wireapp/wire-web-packages/compare/@wireapp/[email protected]...@wireapp/[email protected])

---
updated-dependencies:
- dependency-name: "@wireapp/copy-config"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump react-intl from 6.5.4 to 6.5.5 (#16233)

Bumps [react-intl](https://github.com/formatjs/formatjs) from 6.5.4 to 6.5.5.
- [Release notes](https://github.com/formatjs/formatjs/releases)
- [Commits](https://github.com/formatjs/formatjs/compare/[email protected]@6.5.5)

---
updated-dependencies:
- dependency-name: react-intl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump @lexical/react from 0.12.2 to 0.12.4 (#16235)

Bumps [@lexical/react](https://github.com/facebook/lexical/tree/HEAD/packages/lexical-react) from 0.12.2 to 0.12.4.
- [Release notes](https://github.com/facebook/lexical/releases)
- [Changelog](https://github.com/facebook/lexical/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/lexical/commits/v0.12.4/packages/lexical-react)

---
updated-dependencies:
- dependency-name: "@lexical/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump @wireapp/core from 42.19.2 to 42.20.0 (#16234)

Bumps [@wireapp/core](https://github.com/wireapp/wire-web-packages) from 42.19.2 to 42.20.0.
- [Commits](https://github.com/wireapp/wire-web-packages/compare/@wireapp/[email protected]...@wireapp/[email protected])

---
updated-dependencies:
- dependency-name: "@wireapp/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): Bump @types/node from 20.9.0 to 20.9.2 (#16239)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.9.0 to 20.9.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump react-router-dom from 6.18.0 to 6.19.0 (#16242)

Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.18.0 to 6.19.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/[email protected]/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): Bump @formatjs/cli from 6.2.3 to 6.2.4 (#16243)

Bumps [@formatjs/cli](https://github.com/formatjs/formatjs) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/formatjs/formatjs/releases)
- [Commits](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])

---
updated-dependencies:
- dependency-name: "@formatjs/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): Bump @testing-library/react from 14.1.0 to 14.1.2 (#16240)

Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 14.1.0 to 14.1.2.
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](testing-library/react-testing-library@v14.1.0...v14.1.2)

---
updated-dependencies:
- dependency-name: "@testing-library/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump @wireapp/commons from 5.2.2 to 5.2.3 (#16241)

Bumps [@wireapp/commons](https://github.com/wireapp/wire-web-packages) from 5.2.2 to 5.2.3.
- [Commits](https://github.com/wireapp/wire-web-packages/compare/@wireapp/[email protected]...@wireapp/[email protected])

---
updated-dependencies:
- dependency-name: "@wireapp/commons"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump @wireapp/react-ui-kit from 9.9.12 to 9.10.0 (#16245)

Bumps [@wireapp/react-ui-kit](https://github.com/wireapp/wire-web-packages) from 9.9.12 to 9.10.0.
- [Commits](https://github.com/wireapp/wire-web-packages/compare/@wireapp/[email protected]...@wireapp/[email protected])

---
updated-dependencies:
- dependency-name: "@wireapp/react-ui-kit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump react-router from 6.18.0 to 6.19.0 (#16236)

Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 6.18.0 to 6.19.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/[email protected]/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): Bump @faker-js/faker from 8.2.0 to 8.3.1 (#16246)

Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 8.2.0 to 8.3.1.
- [Release notes](https://github.com/faker-js/faker/releases)
- [Changelog](https://github.com/faker-js/faker/blob/next/CHANGELOG.md)
- [Commits](faker-js/faker@v8.2.0...v8.3.1)

---
updated-dependencies:
- dependency-name: "@faker-js/faker"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump @lexical/history from 0.12.2 to 0.12.4 (#16244)

Bumps [@lexical/history](https://github.com/facebook/lexical/tree/HEAD/packages/lexical-history) from 0.12.2 to 0.12.4.
- [Release notes](https://github.com/facebook/lexical/releases)
- [Changelog](https://github.com/facebook/lexical/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/lexical/commits/v0.12.4/packages/lexical-history)

---
updated-dependencies:
- dependency-name: "@lexical/history"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump lexical from 0.12.2 to 0.12.4 (#16238)

Bumps [lexical](https://github.com/facebook/lexical/tree/HEAD/packages/lexical) from 0.12.2 to 0.12.4.
- [Release notes](https://github.com/facebook/lexical/releases)
- [Changelog](https://github.com/facebook/lexical/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/lexical/commits/v0.12.4/packages/lexical)

---
updated-dependencies:
- dependency-name: lexical
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Update translations (#16228)

* fix: do not hide conversation when its content is cleared (#16247)

* fix: show confirm modal when calling a conversation from wrapper top bar menu (WPB-5445) (#16248)

* fix: show confirm modal when calling a conversation from wrapper top bar menu (WPB-5445)

* change number

* bring all implemenation to calling view model

* use MAX_USERS_TO_PING_WITHOUT_ALERT env

* change count to 4

* chore: Update translations (#16249)

* chore: cleanup applock extra observables (#16250)

* runfix: cleared conversation visible (#16252)

* runfix: do not filter removed and cleared conversations

* runfix: update cleared timestamp after clearing a conversation

* runfix: update cleared timestamp on member leave event

* runfix: clear content timestamp

* runfix: do not delete left and cleared conversations from the store

* test: update tests

* runfix: do not change active conversation if update happend in cleared convo

* feat: use backend provided idp (#16254)

* feat: use backend provided idp

* feat: Update Core

* feat: Degraded Conversation - plain indication

* remove unecessary code and change dates

* runfix: Correctly show user/devices verification state (#16253)

* upgrade core

* remove unused x509 certificate lib

* feat(E2EI): add possibility to refresh a active certificate (#16288)

* hide e2ei badges when not in an e2ei env

* fix: fix dark mode

* fix: fix mls envs

* fix types

* remove ko observable

* revert gitignore

* fix test and event mapper improvement

* feat: Degraded conversation messages (#16281)

* feat: Degraded conversation messages

* add e2ei verification messages

* add review suggestion

* add test and improvements

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Adrian Weiß <[email protected]>
Co-authored-by: Adrian Weiß <[email protected]>
Co-authored-by: Thomas Belin <[email protected]>
Co-authored-by: Thomas Belin <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Otto the Bot <[email protected]>
Co-authored-by: Patryk Górka <[email protected]>
Co-authored-by: Amir Ghezelbash <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants