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

fix: handle with scheme and domain from corecrypto [WPB-7084] #2626

Merged

Conversation

github-actions[bot]
Copy link
Contributor

Cherry pick from the original PR:


⚠️ Conflicts during cherry-pick:
cryptography/src/commonMain/kotlin/com/wire/kalium/cryptography/IDs.kt
logic/src/commonMain/kotlin/com/wire/kalium/logic/data/e2ei/MLSConversationsVerificationStatusesHandler.kt


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

When getting user identities from core crypto, field has a different format because it contains also scheme and domain.

Solutions

Provide another property that returns only the core handle without scheme, at sign and domain.

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Create a new MLS group with all users verified - it should have a badge.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. .

@github-actions github-actions bot added the cherry-pick PR is cherry-picking changes from another banch label Mar 11, 2024
@saleniuk
Copy link
Contributor

should be fixed and merged after this one: #2603

…heme_and_domain_from_corecrypto-cherry-pick

# Conflicts:
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/data/e2ei/MLSConversationsVerificationStatusesHandler.kt
Copy link
Contributor Author

github-actions bot commented Mar 15, 2024

Test Results

2 194 tests   - 789   2 131 ✔️  - 731   18s ⏱️ - 2m 15s
   392 suites  - 124        63 💤  -   58 
   392 files    - 124          0 ±    0 

Results for commit 261b87e. ± Comparison against base commit 803abb6.

This pull request removes 2983 and adds 2194 tests. Note that renamed tests count towards both.
PocIntegrationTest ‑ givenApiWhenGettingACMEDirectoriesThenReturnAsExpectedBasedOnNetworkState
PocIntegrationTest ‑ givenEmailAndPasswordWhenLoggingInThenRegisterClientAndLogout
com.wire.kalium.HttpClientConnectionSpecsTest ‑ givenOkHttpSingleton_whenBuildingClearTextTrafficOkhttpClient_thenEnsureConnectionSpecClearText[jvm]
com.wire.kalium.HttpClientConnectionSpecsTest ‑ givenTheHttpClientIsCreated_ThenEnsureOnlySupportedSpecsArePresent[jvm]
com.wire.kalium.api.base.authenticated.notification.AccessUpdateTest ‑ givenPayloadWithAccessRoleAndDeprecatedAccessRoleField_whenDecoding_thenDeprecatedFieldIsPreferred[jvm]
com.wire.kalium.api.base.authenticated.notification.AccessUpdateTest ‑ givenPayloadWithDeprecatedAccessRoleField_whenDecoding_thenSuccess[jvm]
com.wire.kalium.api.base.authenticated.notification.AccessUpdateTest ‑ givenPayload_whenDecoding_thenSuccess[jvm]
com.wire.kalium.api.common.ACMEApiTest ‑ givenNoLocationInHeader_whenCallingSendAcmeRequestApi_theResponseShouldBeConfigureCorrectly[jvm]
com.wire.kalium.api.common.ACMEApiTest ‑ givenNoNonce_whenCallingSendAcmeRequestApi_theResponseShouldBeMissingNonce[jvm]
com.wire.kalium.api.common.ACMEApiTest ‑ givingASuccessfulResponse_whenGettingACMEFederationCertificateChain_thenAllCertificatesShouldBeParsed[jvm]
…
com.wire.kalium.cryptography.CryptoUtilsTest ‑ givenDummyText_whenEncryptedAndDecryptedWithAES256_returnsOriginalText[iosX64]
com.wire.kalium.cryptography.CryptoUtilsTest ‑ givenSomeDummyFile_whenEncryptedAndDecryptedWithAES256_returnsExpectedOriginalFile[iosX64]
com.wire.kalium.cryptography.CryptoUtilsTest ‑ givenSomeDummyFile_whenEncryptedAsAFileAndDecryptedWithAES256AsData_returnsExpectedOriginalFileContent[iosX64]
com.wire.kalium.cryptography.CryptoUtilsTest ‑ givenSomeDummyFile_whenEncryptedAsDataAndDecryptedWithAES256AsAFile_returnsExpectedOriginalFileContent[iosX64]
com.wire.kalium.cryptography.CryptoUtilsTest ‑ testGivenByteArray_whenCallingCalcMd5_returnsExpectedDigest[iosX64]
com.wire.kalium.cryptography.CryptoUtilsTest ‑ testGivenByteArray_whenCallingCalcSHA256_returnsExpectedDigest[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingCertificateRequest_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingCheckOrderRequest_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingCreateDpopToken_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingFinalizeRequest_ReturnNonEmptyResult[iosX64]
…
This pull request removes 121 skipped tests and adds 63 skipped tests. Note that renamed tests count towards both.
PocIntegrationTest ‑ givenApiWhenGettingACMEDirectoriesThenReturnAsExpectedBasedOnNetworkState
PocIntegrationTest ‑ givenEmailAndPasswordWhenLoggingInThenRegisterClientAndLogout
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingGeTrustAnchorsApi_theResponseShouldBeConfigureCorrectly[jvm]
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingSendChallengeRequestApi_theResponseShouldBeConfigureCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenAValidEmail_whenActivationEmailWIthCode_theRequestShouldBeConfiguredCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenAValidEmail_whenRegisteringAccountWithEMail_theRequestShouldBeConfiguredCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenAValidEmail_whenSendingActivationEmail_theRequestShouldBeConfiguredCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenActivationCodeFail_thenErrorIsPropagated[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenRegistrationFail_whenRegisteringAccountWithEMMail_thenErrorIsPropagated[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenSendActivationCodeFail_thenErrorIsPropagated[jvm]
…
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingCertificateRequest_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingCheckOrderRequest_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingCreateDpopToken_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingFinalizeRequest_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingGetNewAccountRequest_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingGetNewAuthzRequest_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingGetNewDpopChallengeRequest_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingGetNewOidcChallengeRequest_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenCallingGetNewOrderRequest_ReturnNonEmptyResult[iosX64]
com.wire.kalium.cryptography.E2EIClientTest ‑ givenClient_whenPassingAcmeDirectoryResponse_ReturnNonEmptyResult[iosX64]
…

♻️ This comment has been updated with latest results.

@saleniuk saleniuk requested review from a team, typfel, yamilmedina, borichellow, Garzas and e-lisa and removed request for a team March 15, 2024 09:32
@saleniuk saleniuk requested review from a team, alexandreferris and vitorhugods and removed request for typfel, yamilmedina, e-lisa and a team March 15, 2024 09:46
@saleniuk saleniuk self-requested a review March 15, 2024 09:46
@datadog-wireapp
Copy link

datadog-wireapp bot commented Mar 15, 2024

Datadog Report

All test runs 2ea33fd 🔗

2 Total Test Services: 0 Failed, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Wall Time Test Service View
kalium-ios 0 0 0 2131 63 8m 30.11s Link
kalium-jvm 0 0 0 2864 121 9m 19.04s Link

@codecov-commenter
Copy link

codecov-commenter commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 58.77%. Comparing base (803abb6) to head (261b87e).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2626   +/-   ##
==========================================
  Coverage      58.76%   58.77%           
  Complexity         7        7           
==========================================
  Files           1189     1189           
  Lines          46313    46314    +1     
  Branches        4380     4380           
==========================================
+ Hits           27218    27221    +3     
  Misses         17143    17143           
+ Partials        1952     1950    -2     
Files Coverage Δ
...monMain/kotlin/com/wire/kalium/cryptography/IDs.kt 87.50% <100.00%> (+0.40%) ⬆️
...2ei/MLSConversationsVerificationStatusesHandler.kt 89.21% <0.00%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 803abb6...261b87e. Read the comment docs.

…heme_and_domain_from_corecrypto-cherry-pick

# Conflicts:
#	cryptography/src/commonMain/kotlin/com/wire/kalium/cryptography/IDs.kt
@saleniuk saleniuk enabled auto-merge March 15, 2024 11:36
@saleniuk saleniuk added this pull request to the merge queue Mar 15, 2024
Merged via the queue into develop with commit 824eb8b Mar 15, 2024
17 checks passed
@saleniuk saleniuk deleted the fix/handle_with_scheme_and_domain_from_corecrypto-cherry-pick branch March 15, 2024 12:39
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