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: Initialize mls only according to backend feature flag #WPB-10117 #3076

Closed

Conversation

m-zagorski
Copy link
Contributor

@m-zagorski m-zagorski commented Oct 25, 2024

EpicWPB-10117 Clients should initialize MLS clients according to backend feature flag

https://wearezeta.atlassian.net/browse/WPB-10119

What's new in this PR?

Issues

All clients need to align on when they register an MLS client by only doing so when the following conditions are fulfilled:

  • GET /mls/public-keys contains an entry with the key removal.
  • The mls feature config is enabled (status = enabled)
  • The configuration will indicate which cipher suite to use

Solutions

  • Add check for the key before doing update of protocols

Testing

How to Test


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.

Copy link

Comment on lines 65 to 75
val mlsKey = mlsClientProvider.getMLSClient().flatMap { mlsClient ->
val cipherSuite: CipherSuite = CipherSuite.fromTag(mlsClient.getDefaultCipherSuite())
mlsPublicKeysRepository.getKeyForCipherSuite(cipherSuite)
}

return if (!featureSupport.isMLSSupported || mlsKey.isLeft()) {
logger.d(
"Skip updating supported protocols, since MLS is not supported. " +
"Feature flag: ${featureSupport.isMLSSupported} " +
"Has mls key: ${mlsKey.isRight()}"
)
Copy link
Member

Choose a reason for hiding this comment

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

question: not sure what this changes from the code before?
Creating an object of MLS client will create some local files/db for MLS and if there is no need to create it uus better to not init mls untill it is needed

Copy link
Member

Choose a reason for hiding this comment

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

  • looking at the Jira ticket i think the app is already doing what it described in the ticket

@m-zagorski m-zagorski closed this Oct 28, 2024
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.

2 participants