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: e2ei: Respect E2EI creating mls client fixed certificate status #2457

Conversation

borichellow
Copy link
Contributor

Just a cherry-pick of closed PR .
Some problems occurred there as original target branch was merged into RC and that one wasn't updated there are a lot of changes and conflics, so it's easier to remove that branch and cherry-pick a new one with only changes that are actually related to the commit message.

What's new in this PR?

Issues

Even when the device (client) has E2EI certificates it's displayed as not valid

Causes (Optional)

WireIdentity.clientId that CoreCrypto returns for each Client is not a usual ClientId but combination of ClientId and UserId, so when app was checking if client has a certificate -> there is no certificate for such clientId.

Solutions

Fix the GetUserE2eiCertificatesUseCase to return not just a Map, but a result that allow to get if client has a certificate by our regular ClientId.

Copy link
Contributor

github-actions bot commented Feb 6, 2024

Test Results

2 776 tests   2 647 ✔️  23s ⏱️
   482 suites     128 💤
   482 files           1

For more details on these failures, see this check.

Results for commit 481cc00.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link

datadog-wireapp bot commented Feb 6, 2024

Datadog Report

All test runs 483e830 🔗

2 Total Test Services: 2 Failed, 0 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Wall Time Test Service View
kalium-ios 1 0 0 2647 128 8m 24s Link
kalium-jvm 1 0 0 2748 70 7m 50.02s Link

❌ Failed Tests (2)

  • givenOneWireIdentityExpired_whenGetUserE2eiAllCertificateStatuses_thenResultCorrectMap[iosX64] - com.wire.kalium.logic.feature.e2ei.GetUserE2eiAllCertificateStatusesUseCaseTest - Details

    Expand for error
     kotlin.AssertionError: Expected <VALID>, actual <null>.
     
     kotlin.AssertionError: Expected <VALID>, actual <null>.
     	at kotlin.Error#<init>(/opt/buildAgent/work/f43969c6214a19e7/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:14)
     	at kotlin.AssertionError#<init>(/opt/buildAgent/work/f43969c6214a19e7/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:132)
     	at kotlin.test.DefaultAsserter#fail(/opt/buildAgent/work/f43969c6214a19e7/kotlin/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/DefaultAsserter.kt:16)
     	at kotlin.test.Asserter#assertTrue(/opt/buildAgent/work/f43969c6214a19e7/kotlin/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/Assertions.kt:652)
     	at kotlin.test.Asserter#assertEquals(/opt/buildAgent/work/f43969c6214a19e7/kotlin/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/Assertions.kt:671)
     	at kotlin.test#assertEquals(/opt/buildAgent/work/f43969c6214a19e7/kotlin/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/Assertions.kt:63)
     	at kotlin.test#assertEquals$default(/opt/buildAgent/work/f43969c6214a19e7/kotlin/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/Assertions.kt:62)
     ...
    
  • givenOneWireIdentityExpired_whenGetUserE2eiAllCertificateStatuses_thenResultCorrectMap[jvm] - com.wire.kalium.logic.feature.e2ei.GetUserE2eiAllCertificateStatusesUseCaseTest - Details

    Expand for error
     java.lang.AssertionError: expected:<VALID> but was:<null>
     
     java.lang.AssertionError: expected:<VALID> but was:<null>
     	at org.junit.Assert.fail(Assert.java:89)
     	at org.junit.Assert.failNotEquals(Assert.java:835)
     	at org.junit.Assert.assertEquals(Assert.java:120)
     	at kotlin.test.junit.JUnitAsserter.assertEquals(JUnitSupport.kt:32)
     	at kotlin.test.AssertionsKt__AssertionsKt.assertEquals(Assertions.kt:63)
     	at kotlin.test.AssertionsKt.assertEquals(Unknown Source)
     	at kotlin.test.AssertionsKt__AssertionsKt.assertEquals$default(Assertions.kt:62)
     ...
    

@borichellow
Copy link
Contributor Author

The issues was fixed in other place by other solution, so no needed anymore :)

@borichellow borichellow closed this Feb 7, 2024
@yamilmedina yamilmedina deleted the feat/e2ei/respect_e2ei_creating_mls_client_fixed_certificate_status branch April 12, 2024 21:56
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.

1 participant