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: pass the MLS public key signature algorithm when updating MLS public keys [WPB-8592] 🍒 #2734

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 2, 2024

StoryWPB-8592 [Android] Add support for ECDSA ciphersuites

This PR was automatically cherry-picked based on the following PR:

Original PR description:



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 SQPIT-764
    • 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

pass the MLS public key signature algorithm when updating MLS public keys

Solutions

whe getting the public key form MLS client also append the cipher suite used for that key and then mapped it to a signature algorithm that is used when uploading the key to the backend

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

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. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@yamilmedina
Copy link
Contributor

Can we add the JIRA ticket here please :D

…into feat/pass-signature-algorithm-when-registring-mls-client-cherry-pick

# Conflicts:
#	cryptography/src/commonJvmAndroid/kotlin/com.wire.kalium.cryptography/MLSClientImpl.kt
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/data/mls/CipherSuite.kt
Copy link
Contributor Author

github-actions bot commented May 17, 2024

Test Results

3 041 tests   2 937 ✔️  4m 3s ⏱️
   528 suites     104 💤
   528 files           0

Results for commit 55a5a25.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link

datadog-wireapp bot commented May 17, 2024

Datadog Report

Branch report: feat/pass-signature-algorithm-when-registring-mls-client-cherry-pick
Commit report: 3e94049
Test service: kalium-jvm

❌ 1 Failed (0 Known Flaky), 2902 Passed, 52 Skipped, 12.39s Total Time

❌ Failed Tests (1)

  • givenAnAssetId_whenDownloadingPrivateAssetWithWrongAssetHash_thenShouldReturnAWrongAssetHashError[jvm] - com.wire.kalium.logic.data.asset.AssetRepositoryTest - Details

    Expand for error
     java.lang.AssertionError: Expected a Left value but got Right
     
     java.lang.AssertionError: Expected a Left value but got Right
     	at org.junit.Assert.fail(Assert.java:89)
     	at kotlin.test.junit.JUnitAsserter.fail(JUnitSupport.kt:56)
     	at kotlin.test.AssertionsKt__AssertionsKt.fail(Assertions.kt:520)
     	at kotlin.test.AssertionsKt.fail(Unknown Source)
     	at com.wire.kalium.logic.util.EitherAssertionsKt.shouldFail(EitherAssertions.kt:91)
     	at com.wire.kalium.logic.data.asset.AssetRepositoryTest$givenAnAssetId_whenDownloadingPrivateAssetWithWrongAssetHash_thenShouldReturnAWrongAssetHashError$1.invokeSuspend(AssetRepositoryTest.kt:398)
     	at com.wire.kalium.logic.data.asset.AssetRepositoryTest$givenAnAssetId_whenDownloadingPrivateAssetWithWrongAssetHash_thenShouldReturnAWrongAssetHashError$1.invoke(AssetRepositoryTest.kt)
     ...
    

Signed-off-by: MohamadJaara <[email protected]>
@codecov-commenter
Copy link

Codecov Report

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

Please upload report for BASE (release/candidate@dbc6e8f). Learn more about missing BASE report.

Additional details and impacted files
@@                 Coverage Diff                  @@
##             release/candidate    #2734   +/-   ##
====================================================
  Coverage                     ?   58.83%           
====================================================
  Files                        ?     1213           
  Lines                        ?    47158           
  Branches                     ?     4428           
====================================================
  Hits                         ?    27745           
  Misses                       ?    17406           
  Partials                     ?     2007           
Files Coverage Δ
...n/kotlin/com/wire/kalium/cryptography/MLSClient.kt 51.35% <ø> (ø)
.../wire/kalium/logic/data/client/ClientRepository.kt 46.15% <100.00%> (ø)
...m/logic/feature/client/RegisterMLSClientUseCase.kt 95.83% <100.00%> (ø)
...ork/api/base/authenticated/client/ClientRequest.kt 84.48% <100.00%> (ø)
...logic/data/client/remote/ClientRemoteRepository.kt 53.57% <20.00%> (ø)
...tlin/com/wire/kalium/logic/data/mls/CipherSuite.kt 29.16% <8.33%> (ø)

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 dbc6e8f...07b76b2. Read the comment docs.

@MohamadJaara MohamadJaara changed the title feat: pass the MLS public key signature algorithm when updating MLS public keys 🍒 feat: pass the MLS public key signature algorithm when updating MLS public keys [WPB-8592] 🍒 May 18, 2024
@MohamadJaara MohamadJaara enabled auto-merge (squash) May 21, 2024 06:10
Copy link

sonarcloud bot commented May 21, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@MohamadJaara MohamadJaara merged commit d2169c1 into release/candidate May 21, 2024
19 checks passed
@MohamadJaara MohamadJaara deleted the feat/pass-signature-algorithm-when-registring-mls-client-cherry-pick branch May 21, 2024 06:53
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.

4 participants