-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1385 from wireapp/release_2021_02_25
## Bug fixes and other updates * Pin kubectl image in sftd chart (#1383) * Remove imagePullPolicy: Always for reaper chart (#1387) ## Internal changes * Use mu-haskell to implement one initial federation request across backends (#1319) * Add migrate-external-ids tool (#1384)
- Loading branch information
Showing
79 changed files
with
3,075 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,3 +87,5 @@ turnStatic: | |
v2: | ||
- turn:localhost:3478 | ||
- turn:localhost:3478?transport=tcp | ||
tests: | ||
enableFederationTests: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Federation | ||
|
||
This folder contains some developer reference documentation on federation. It's early days, and more documentation may be added here, or elsewhere as time goes on. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
docs/reference/federation/img/remote_user_handle_lookup.swimlanes.io.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// copy the following to use with https://swimlanes.io | ||
|
||
title: PR #1319: remote user handle lookup | ||
|
||
Wire client -> brig@A: handle=alice domain=example.com | ||
|
||
brig@A -> federator@A: Outward.call(FederatedRequest(example.com, Request(..))) | ||
|
||
note federator@A,federator@B: In the future, requests between backends here should be using some server2server authentication and also make use of an authorization strategy (open federation, allow list, ...). | ||
|
||
federator@A -> federator@B: Inward.call(Request(brig, "/handle/alice")) | ||
|
||
federator@B -> brig@B: Request(/handle/alice) | ||
|
||
brig@B -> federator@B: Response | ||
|
||
federator@B -> federator@A: Response | ||
|
||
federator@A -> brig@A: Response | ||
|
||
brig@A -> Wire client: userId=1234 domain=example.com |
30 changes: 30 additions & 0 deletions
30
...nce/federation/pull-requests/1319_initial_federation_request_across_backends.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
This PR #1319 is one small piece in the context of Federation, namely code for the first few bytes to travel from one backend to another backend. The example implemented here is exact handle search as per https://wearezeta.atlassian.net/browse/SQCORE-108 | ||
|
||
For general context about federation design, see (sorry non-Wire employees, this documentation will eventually be made available) https://github.com/wearezeta/documentation/blob/master/topics/federation/federation-design.md | ||
|
||
This introduces the [mu-haskell](https://higherkindness.io/mu-haskell/) set of libraries as a new stack dependency to gain support in wire-server for http2 / GRPC (based on protobuf). | ||
|
||
We make use of GRPC as a protocol as a new intra-service call internally from `brig` to `federator` (for the reverse flow from `federator` to `brig` we still use a REST API for the time being to not change too much at once), and also as a protocol between backends. | ||
|
||
The following networking flow is implemented: | ||
|
||
(to modify this diagram, see the swimlanes.io [source](../img/remote_user_handle_lookup.swimlanes.io.txt)) | ||
|
||
![remote_user_handle_lookup](../img/remote_user_handle_lookup.png) | ||
|
||
1. A component (e.g. 'brig') will send some data of type 'FederatedRequest' to | ||
the 'federator' server (more precisely: the 'Outward' service part of the federator) within a same private network. | ||
2. The federator will use the domain from the 'FederatedRequest' to discover | ||
where to send some data of type 'Request' to. | ||
3. On the other side, a publicly exposed 'Inward' service (also co-hosted on the | ||
federator) will turn the received 'Request' into a 'Response' by making a call to a | ||
component (e.g. brig) on its private network. | ||
|
||
See also [wire-api-federation/proto/router.proto](../../../../libs/wire-api-federation/proto/router.proto) for details of the grpc protocol. | ||
|
||
Note: Server-server authentication is not yet implemented, so this code uses plain TCP between different backends at this point. This should be okay for the time being, since: | ||
- the federator component is disabled by default in the wire-server helm chart and won't be "accidentally" installed | ||
- we do not, and do not plan to run the federator in staging or production for the time being until much more of federation has been implemented: any request from brig to federator thus always fails with a 404 or other error client-side at this point. | ||
- (instead we will have separate federation playground servers) | ||
|
||
The core types allowing an easy extension of this code to support other requests and endpoints than the handle lookup can be found in libs/wire-server-api (notably the `proto/router.proto` file). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
export NAMESPACE=${NAMESPACE:-test-integration} | ||
|
||
$DIR/integration-teardown.sh | ||
|
||
# The suffix '-fed2' must be kept in sync with configuration inside | ||
# charts/brig/templates/tests/configmap.yaml and | ||
# hack/bin/integration-setup-federation.sh | ||
export NAMESPACE=${NAMESPACE}-fed2 | ||
|
||
$DIR/integration-teardown.sh |
Oops, something went wrong.