Proto commits in wireapp/wire-server

These 39 commits are when the Protocol Buffers files have changed:

Commit:827f831
Author:Paolo Capriotti
Committer:GitHub

Document federation errors (#1674) * Document federation errors Co-authored-by: Marko Dimjašević <marko.dimjasevic@wire.com> * Remove `InvalidCertificate` federation error It is currently not so easy to distinguish this particular error from a generic TLS error (see #1662 for more context). Since `InvalidCertificate` is never thrown, this PR simply removes it. Note that this is a breaking change in the federation protobuf. * Remove labels from protobuf errors * Improve federation error descriptions Also suggest client behaviour in some cases. Co-authored-by: Marko Dimjašević <marko.dimjasevic@wire.com>

The documentation is generated from this commit.

Commit:19285b1
Author:Paolo Capriotti
Committer:GitHub

Server-to-server authentication (#1687) This is the final bit of logic implementing server-to-server authentication, namely validation of the domain name provided as part of the request against the certificate checked at the point of SSL termination. Interesting deatils/other changes: * Pass X-SSL-Subject header to GRPC handler * Implement domain verification from certificate * Make local integration tests work with coredns * Add originDomain configuration option for tests This is used to set the originDomain field in federated requests within federator integration tests. It cannot be set to a fixed canned value like "example.com", because federators make SRV requests to perform server-to-server authentication, so the domain must be something whose DNS server contains an appropriate SRV record, and so it needs to be set differently according to whether the test is running in the local "demo" environment (where we have a tiny DNS server for "example.com"), or in the CI integration setup, where we can rely on kubernetes DNS server for the federation ingress host. * Rename IInvalidDomain to IAuthenticationFailed * Federator/Makefile: Provide pattern to integration tests correctly Co-authored-by: Akshay Mankar <akshay@wire.com> Co-authored-by: jschaul <jschaul@users.noreply.github.com>

Commit:331000b
Author:Stefan Matting
Committer:Stefan Matting

types-common-journal: Remove expoded-modules ... by factoring out the proto files into own lib types-common-journal-proto which we can exclude from the merge

Commit:b757784
Author:jschaul
Committer:GitHub

Federation: Types for InwardErrors and federator refactoring (#1637) * Introduce a few error types in `InwardResponse` * Improve readability of ExternalServer in Federator by use of Polysemy.Error also in callLocal * This also solves an existing TODO whereby federator integration tests didn't work due to InwardResponses, whether an error or an expected return value, were parsed always as InwardResponseBody. This may have been an issue with mu-haskell when parsing (only needed in tests), since the behaviour when using `grpccurl` was correct. This is now sidestepped by using more than a simple string on errors. This PR is in preparation to sanitize request paths against path traversal attacks (separate PR https://github.com/wireapp/wire-server/pull/1646)

Commit:870511c
Author:Paolo Capriotti
Committer:GitHub

Add Galley component to federator API (#1555)

Commit:475753c
Author:jschaul
Committer:GitHub

Add originDomain to federation API (#1447) To eventually support server-to-server authentication, the first step implemented in this PR is to add an originating domain to federated requests. At the moment this domain could be arbitrarily set (i.e. server2server authentication is not yet implemented here). But in this PR, some validation logic compares this domain to the allowList for incoming requests at federator level, if configured. That domain can then in the future be used for: * authenticating the domain with DNS/SRV or other means to validate that the request indeed comes from the claimed sender * independent of authentication/authorization concerns, the domain may be useful for RPC calls that need to write data (e.g. to create a conversation). In this PR, a field `originDomain` is added to the Request object in the protobuf definition, which is then turned into a `Wire-Origin-Domain` header when sending the call to a local component via plain http, in case that other component wants to make use of that header.

Commit:2a6fbaa
Author:Akshay Mankar
Committer:GitHub

Use servant-client to make federated calls (#1445) Co-authored-by: Paolo Capriotti <paolo@capriotti.io> Co-authored-by: Stefan Matting <stefan@wire.com>

Commit:cc6509e
Author:Akshay Mankar
Committer:GitHub

Handle errors which could happen while talking to remote federator (#1408) Co-authored-by: jschaul <jschaul@users.noreply.github.com>

Commit:f683299
Author:jschaul
Committer:GitHub

Use mu-haskell to implement one initial federation request across backends (#1319) See https://github.com/wireapp/wire-server/blob/db4c2351476c713f0367cee635faaaea10f9adf5/docs/reference/federation/pull-requests/1319_initial_federation_request_across_backends.md Co-authored-by: Akshay Mankar <akshay@wire.com>

Commit:ff4183f
Author:jschaul
Committer:jschaul

rename FUTUREWORK to FUTUREWORK(federation) for easier grepping

Commit:b930cd2
Author:jschaul

Add comments

Commit:1e6efc9
Author:jschaul

delete some files WIP

Commit:9bbe617
Author:Akshay Mankar

Remove workarounds for handling enums in protobuf Fix in mu-haskell: https://github.com/higherkindness/mu-haskell/pull/285

Commit:f6676e7
Author:Akshay Mankar

Implement a federation endpoint in brig Also refine federation protocol so success isn't determined by HTTP status, the status and body are forwarded to the called as is.

Commit:c6cb1ed
Author:Akshay Mankar
Committer:jschaul

Move router types to wire-api-federation

Commit:5ba9883
Author:jschaul
Committer:jschaul

grpc client call from brig to federator

Commit:059f7fa
Author:jschaul
Committer:jschaul

move (dummy) proto files to wire-api-federation and compile

Commit:bd0e62c
Author:jschaul
Committer:jschaul

better error accumulation on validateLocalCall

Commit:737b54f
Author:Akshay Mankar
Committer:jschaul

Workaround bug in mu-protobuf https://github.com/higherkindness/mu-haskell/issues/282

Commit:65d4170
Author:jschaul
Committer:jschaul

Add comments

Commit:ea33bad
Author:Akshay Mankar
Committer:jschaul

Federator: Refine LocalCall and interpret Brig effect as AppIO

Commit:78a3e87
Author:Akshay Mankar
Committer:jschaul

[WIP] Federator: Implement basic structure of routing

Commit:89e0b0c
Author:jschaul
Committer:jschaul

delete files again moved to a mu-haskell PR

Commit:7cf4fce
Author:jschaul
Committer:jschaul

minimal-ish example for errors

Commit:6a4b78c
Author:jschaul
Committer:jschaul

add a (still failing) integration test

Commit:18d0cbf
Author:jschaul
Committer:jschaul

add another method. WIP

Commit:cc7b28e
Author:jschaul
Committer:jschaul

...

Commit:286be31
Author:jschaul
Committer:jschaul

force recompilation on changes to proto file; reorganize service; add FUTUREWORKs

Commit:4d9632a
Author:jschaul
Committer:jschaul

WIP

Commit:ba0cd83
Author:jschaul
Committer:jschaul

attempt to include quickstart into federator: doesn't yet compile

Commit:4ca49d5
Author:jschaul
Committer:jschaul

mu-haskell dependencies as per tutorial

Commit:dcc18cb
Author:Tiago Manuel Ventura Loureiro
Committer:GitHub

Richer user events (#381)

Commit:ab68354
Author:Tiago Loureiro

Merged with develop

Commit:dc83e5c
Author:Tiago Manuel Ventura Loureiro
Committer:GitHub

Journal user events (#322)

Commit:a0233f7
Author:Tiago Loureiro
Committer:Tiago Loureiro

Added galley support and fixed JSON instances

Commit:d6d0b01
Author:Tiago Loureiro
Committer:Tiago Loureiro

Journal suspended accounts and rename CREATE event

Commit:621b5fb
Author:jschaul
Committer:jschaul

Journal team events to SQS Introduces journaling via AWS SQS for team events (create, update, delete). * Team deletions become soft deletes (to allow for eventual consistency on the journal consumer side: a cassandra table scan allows for re-creating create/delete events) * types-common-journal depends on `protoc` at compile time for protobuf code generation. * Journaling in galley is optional at run time (via optional `---team-events-queue-name` and `--aws-region` params) and at integration test time (via an optional `GALLEY_SQS_TEAM_EVENTS` environment variable) to allow galley to function without SQS. * integration tests consume SQS events, making them slower (from ~90s to ~110s) (to be improved)

Commit:1e8259c
Author:Kim Altintop

Remove obsolete types-common-journal

This commit does not contain any .proto files.

Commit:be46fff
Author:Toralf Wittner
Committer:Toralf Wittner

Add `types-common` library.