Skip to content

Backport #4224#4237

Merged
stefanwire merged 4 commits intoq1-2024from
one2one-removal-keys-q1
Sep 12, 2024
Merged

Backport #4224#4237
stefanwire merged 4 commits intoq1-2024from
one2one-removal-keys-q1

Conversation

@akshaymankar
Copy link
Member

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Sep 12, 2024
pcapriotti and others added 2 commits September 12, 2024 10:10
* Initial v1 docker-compose setup

* Update service configuration in federation-v1

* Improve run script

* Rename federation-v0 and federation-v1 services

* Make federation-v* optional

* Allow PTest to use IO

* Introduce VersionedFed

* Setup federation-v1 in integration tests

* Fix coredns network

* Use legacy backends in some of the tests

* Fix background worker config in fed-v1

* federation-v0 and -v1 configuration for integration tests

* fix linter

* fix Helm chart for integration tests

* Add CHANGELOG entry

* Enable debug log level for federator

* Disable one of the tests on legacy backends

---------

Co-authored-by: Stefan Berthold <stefan.berthold@wire.com>
@stefanwire stefanwire force-pushed the one2one-removal-keys-q1 branch from 895a864 to f6d3576 Compare September 12, 2024 10:12
@stefanwire stefanwire force-pushed the one2one-removal-keys-q1 branch from f6d3576 to cc1efa8 Compare September 12, 2024 10:46
…on (#4224)" (#4237)

* Routes.Public.Galley.Conversation: Remove version overlap in endpionts for getting one2one conversation

* integration: Verify remove propsals from the backend in group convos

Also add a test where local client is removed and the proposal is sent to remote
clients

* integration-tests: Use separate mls private keys for each env

Pending: keys for dynamic backends when running in K8s

* integration: resetClientGroup: Use MLS public keys for creator of the group instead of the conversation

This encodes the assumption that the creator's backend always owns the
conversation.

For one2one conversations, this would break, however we should use a different
function to do this setup as the keys are supposed to be returned in
getMLSOne2OneConversation endpoint from version 6 onwards.

* integration: Add tests for how the new API is supposed to work

Also add a test to ensure that proposals for removing clients can be
verified.

* wire-api{,-federation}: Add new APIs for returning MLS public keys for 1:1 convs

* galley: Implement new APIs for returning MLS public keys when getting 1:1 convs

* integration: Adjust one2one conv tests to use the new API

* galley.integration.yaml: fix path of the backend's public keys

* add golden tests

* charts/integration: Add mls private keys for dynamic backends

* integration: Fix API versions to be used for fed-v0 and v1 envs

They were hardcoded to use the dev API version, which is incorrect

* BackendNotificationPusherSpec: Fix API version test

Make it so it doesn't fail for adding new API versions

* hack/bin/gen-certs.sh: Also gen certs for federation-v1

* integration: Describe how one2one conversations should work when talking to older backends

* integration/SetupHelpers: Slightly nicer way to detect backend API version

* wire-api: Add epoch_timestamp to serialization of conv Protocol

It is necessary in older API versions, got removed as a bug.

* federation-api-galley: Use Protocol from client API V5 when returning 'RemoteConversation'

Federation API V1 expects JSON serialization similar to Client API V5.

* galley-integration: Delete test which is already covered by new integration tests

It required changes due to change in federation API

* galley: Only allow getting remote MLS 1:1 convs if the remote supports federation API v2

* galley: Do not return 1:1 conversations in federation API V1

* galley: Add query param for public key format to "get-one-to-one-mls-conversation"

* wire-api: Fix golden test JSONs

These were likely generated after refactoring so we actually did break the
API (in a small way). This is verified by seeing the results from q1-2024
release, APIs <= V5 return `epoch_timestamp` as `null` instead of omitting it.

* MLSOne2OneConversation: Add dynamic param to swagger name

* galley: Log warning when getting One2One conv and remote doesn't have MLS enabled

* wire-api-federation: Fix wrongly generated golden test

* integration/testSupportedProtocols: Don't run for federation-v0

Client API v4 doesn't support this endpoint

* galley: Move JWK key format to client APIv7

---------

Co-authored-by: Akshay Mankar <akshay@wire.com>
@stefanwire stefanwire force-pushed the one2one-removal-keys-q1 branch from cc1efa8 to 107a76c Compare September 12, 2024 12:23
@stefanwire stefanwire force-pushed the one2one-removal-keys-q1 branch from 7ea624f to 50b53e6 Compare September 12, 2024 13:45
@stefanwire stefanwire merged commit 2cc99c1 into q1-2024 Sep 12, 2024
stefanwire added a commit that referenced this pull request Sep 12, 2024
* Initial v1 docker-compose setup

* Update service configuration in federation-v1

* Improve run script

* Rename federation-v0 and federation-v1 services

* Make federation-v* optional

* Allow PTest to use IO

* Introduce VersionedFed

* Setup federation-v1 in integration tests

* Fix coredns network

* Use legacy backends in some of the tests

* Fix background worker config in fed-v1

* federation-v0 and -v1 configuration for integration tests

* fix linter

* fix Helm chart for integration tests

* Add CHANGELOG entry

* Enable debug log level for federator

* Disable one of the tests on legacy backends

---------

Co-authored-by: Stefan Berthold <stefan.berthold@wire.com>
stefanwire added a commit that referenced this pull request Sep 12, 2024
…on (#4224)" (#4237)

* Routes.Public.Galley.Conversation: Remove version overlap in endpionts for getting one2one conversation

* integration: Verify remove propsals from the backend in group convos

Also add a test where local client is removed and the proposal is sent to remote
clients

* integration-tests: Use separate mls private keys for each env

Pending: keys for dynamic backends when running in K8s

* integration: resetClientGroup: Use MLS public keys for creator of the group instead of the conversation

This encodes the assumption that the creator's backend always owns the
conversation.

For one2one conversations, this would break, however we should use a different
function to do this setup as the keys are supposed to be returned in
getMLSOne2OneConversation endpoint from version 6 onwards.

* integration: Add tests for how the new API is supposed to work

Also add a test to ensure that proposals for removing clients can be
verified.

* wire-api{,-federation}: Add new APIs for returning MLS public keys for 1:1 convs

* galley: Implement new APIs for returning MLS public keys when getting 1:1 convs

* integration: Adjust one2one conv tests to use the new API

* galley.integration.yaml: fix path of the backend's public keys

* add golden tests

* charts/integration: Add mls private keys for dynamic backends

* integration: Fix API versions to be used for fed-v0 and v1 envs

They were hardcoded to use the dev API version, which is incorrect

* BackendNotificationPusherSpec: Fix API version test

Make it so it doesn't fail for adding new API versions

* hack/bin/gen-certs.sh: Also gen certs for federation-v1

* integration: Describe how one2one conversations should work when talking to older backends

* integration/SetupHelpers: Slightly nicer way to detect backend API version

* wire-api: Add epoch_timestamp to serialization of conv Protocol

It is necessary in older API versions, got removed as a bug.

* federation-api-galley: Use Protocol from client API V5 when returning 'RemoteConversation'

Federation API V1 expects JSON serialization similar to Client API V5.

* galley-integration: Delete test which is already covered by new integration tests

It required changes due to change in federation API

* galley: Only allow getting remote MLS 1:1 convs if the remote supports federation API v2

* galley: Do not return 1:1 conversations in federation API V1

* galley: Add query param for public key format to "get-one-to-one-mls-conversation"

* wire-api: Fix golden test JSONs

These were likely generated after refactoring so we actually did break the
API (in a small way). This is verified by seeing the results from q1-2024
release, APIs <= V5 return `epoch_timestamp` as `null` instead of omitting it.

* MLSOne2OneConversation: Add dynamic param to swagger name

* galley: Log warning when getting One2One conv and remote doesn't have MLS enabled

* wire-api-federation: Fix wrongly generated golden test

* integration/testSupportedProtocols: Don't run for federation-v0

Client API v4 doesn't support this endpoint

* galley: Move JWK key format to client APIv7

---------

Co-authored-by: Akshay Mankar <akshay@wire.com>
@stefanwire stefanwire deleted the one2one-removal-keys-q1 branch September 12, 2024 14:52
@echoes-hq echoes-hq bot added the echoes: unplanned Any work item that isn’t part of the product or technical roadmap. label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

echoes: unplanned Any work item that isn’t part of the product or technical roadmap. ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants