-
Notifications
You must be signed in to change notification settings - Fork 6
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 during login and client creation (WPB-5851) #2403
feat(e2ei): respect E2EI during login and client creation (WPB-5851) #2403
Conversation
…/e2ei/respect-e2ei-creating-mls-client
…/e2ei/respect-e2ei-creating-mls-client
…/e2ei/respect-e2ei-creating-mls-client
* feat: use case to send button action confirmations (WPB-2633) * Fixed issue with domain of button sender
* fix: preserve Original Author in Cherry-Picked Commits * add conflicted files Co-authored-by: Mohamad Jaara <[email protected]>
…ad (#2387) (#2391) Co-authored-by: Mohamad Jaara <[email protected]> Co-authored-by: Yamil Medina <[email protected]>
* release: feat: Add API v5 support * Code style fix * Review fix
…pp/kalium into feat/e2ei/respect-e2ei-creating-mls-client # Conflicts: # cryptography/src/commonJvmAndroid/kotlin/com.wire.kalium.cryptography/E2EIClientImpl.kt
…pp/kalium into feat/e2ei/respect-e2ei-creating-mls-client
…into feat/e2ei/respect-e2ei-creating-mls-client # Conflicts: # logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/user/UserScope.kt # network/src/commonMain/kotlin/com/wire/kalium/network/BackendMetaDataUtil.kt # network/src/commonMain/kotlin/com/wire/kalium/network/api/base/unbound/acme/ACMEApi.kt # network/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/networkContainer/AuthenticatedNetworkContainerV6.kt
…mls-client' into feat/e2ei/respect-e2ei-creating-mls-client
Datadog ReportAll test runs ✅ 2 Total Test Services: 0 Failed, 2 Passed Test Services
|
…into feat/e2ei/respect-e2ei-creating-mls-client # Conflicts: # logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/user/UserScope.kt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few style suggestion, that are not mandatory for the feature
mlsClientProvider.getMLSClient(clientId).flatMap { mlsClient -> | ||
userConfigRepository.getE2EISettings().fold({ | ||
Either.Right(mlsClient) | ||
}, { e2eiSettings -> | ||
if (e2eiSettings.isRequired && !mlsClient.isE2EIEnabled()) { | ||
kaliumLogger.i("MLS Client registration stopped: e2ei is required and is not enrolled!") | ||
return Either.Right(RegisterMLSClientResult.E2EICertificateRequired(mlsClient)) | ||
} else Either.Right(mlsClient) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be simpler
mlsClientProvider.getMLSClient(clientId).map { mlsClient ->
val e2eiSettings = userConfigRepository.getE2EISettings().getOrNull()
if (e2eiSettings?.isRequired == true && !mlsClient.isE2EIEnabled()) {
RegisterMLSClientResult.E2EICertificateRequired(mlsClient)
} else {
mlsClient
}
}
}.flatMap { | ||
keyPackageRepository.uploadNewKeyPackages(clientId, keyPackageLimitsProvider.refillAmount()) | ||
Either.Right(RegisterMLSClientResult.Success) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simpler:
}.map {
keyPackageRepository.uploadNewKeyPackages(clientId, keyPackageLimitsProvider.refillAmount())
RegisterMLSClientResult.Success
}
// e2EIRepository.fetchTrustAnchors().onFailure { | ||
// return E2EIEnrollmentResult.Failed(E2EIEnrollmentResult.E2EIStep.TrustAnchors, it).toEitherLeft() | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it commented temporary? Some TODO
or explanation comment would be nice, if so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in other PR after this gets merged.
logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/UserSessionScope.kt
Show resolved
Hide resolved
logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/client/ObserveIsE2EIRequiredState.kt
Show resolved
Hide resolved
...mmonMain/kotlin/com/wire/kalium/logic/feature/client/FinalizeMLSClientAfterE2EIEnrollment.kt
Show resolved
Hide resolved
testservice/src/main/kotlin/com/wire/kalium/testservice/managed/ConversationRepository.kt
Outdated
Show resolved
Hide resolved
testservice/src/main/kotlin/com/wire/kalium/testservice/managed/InstanceService.kt
Show resolved
Hide resolved
...ce/src/main/kotlin/com/wire/kalium/testservice/models/SendButtonActionConfirmationRequest.kt
Outdated
Show resolved
Hide resolved
testservice/src/main/kotlin/com/wire/kalium/testservice/models/SendButtonActionRequest.kt
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/candidate #2403 +/- ##
====================================================
Coverage ? 58.14%
Complexity ? 21
====================================================
Files ? 1164
Lines ? 44893
Branches ? 4192
====================================================
Hits ? 26101
Misses ? 16911
Partials ? 1881 Continue to review full report in Codecov by Sentry.
|
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Respecting E2EI state during MLS client registration and login.
Needs releases with:
Testing
WIP
Test Coverage (Optional)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.