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

merge dev into mls #3455

Merged
merged 35 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6d9b8db
SSO Faq entry on CSP.
fisx Jul 5, 2023
a113580
Edits.
fisx Jul 5, 2023
42e2ec6
Cross-link sso faq.
fisx Jul 7, 2023
7d2b560
internal fix: Add `stern` to run-services implementation for integrat…
battermann Jul 13, 2023
9dcc07b
run-services: Start binaries with AWS_ overriden environment variable…
smatting Jul 13, 2023
7efa140
Make note about poetry clearer.
arthurwolf Jul 13, 2023
9b51b21
Update version-requirements.md
arthurwolf Jul 13, 2023
aef8dd5
Update version-requirements.md
arthurwolf Jul 13, 2023
18ea792
Merge pull request #3432 from wireapp/arthurwolf-note-about-poetry
arthurwolf Jul 13, 2023
fc1f19c
fix: Local integration tests (#3430)
battermann Jul 13, 2023
3388bf0
[WPB-200] Move all notifications to RabbitMQ (#3336)
elland Jul 13, 2023
d52c822
Introduce `make ci-fast`, `make ci-safe`. (#3428)
fisx Jul 14, 2023
d7502ba
WPB 2565 remove indexed billing members feature flag (#3434)
smatting Jul 14, 2023
0020ed6
fix: ster get-meta-info (#3436)
battermann Jul 15, 2023
a601cef
Stern: reduce batch size to 50 when GetNotifications
dkovacevic Jul 17, 2023
167cdd2
Merge pull request #3437 from wireapp/dkovacevic-patch-1
dkovacevic Jul 17, 2023
2eb50c7
FS-1179/WPB-1107: Clean local state when stopping to federate with an…
lepsa Jul 17, 2023
f33f1e0
Servantify more of brig internal api (#3346)
fisx Jul 17, 2023
1dfd64f
Stern: Batch=100
dkovacevic Jul 17, 2023
56c9f32
Merge pull request #3441 from wireapp/dkovacevic-patch-1
dkovacevic Jul 17, 2023
e124b2c
Do not send member updates to all (#3431)
pcapriotti Jul 17, 2023
df4c0b9
yaml indentation: do not create ingress webhooks (#3440)
jschaul Jul 17, 2023
6db29bb
WPB-240: Generate and fan out events about stopping to federate (#3397)
lepsa Jul 18, 2023
1e7358c
formatting fixup
jschaul Jul 18, 2023
7c16777
WPB-240: Fixing tests by making defederation tests run last. (#3448)
lepsa Jul 19, 2023
1b3ad92
Merge pull request #3398 from wireapp/fisx/wpb-2994/sso-faq
mastaab Jul 19, 2023
3020095
In CI, use redis-ephemeral master mode (#3446)
jschaul Jul 19, 2023
aef205a
Revert "Do not send member updates to all (#3431)" (#3447)
pcapriotti Jul 19, 2023
286d6f4
federator: Add status endpoints and migrate to servant (#3443)
akshaymankar Jul 20, 2023
8052efb
Implement graceful termination for background-worker (#3421)
lepsa Jul 24, 2023
98cbc0a
k8ssandra-test-cluster: make namespace configurable
jschaul Jul 24, 2023
9b7ffb5
k8ssandra-test-cluster: set namespace to helm release namespace, not …
jschaul Jul 24, 2023
c299155
Adding members to conversations with offline remote backends (#3449)
elland Jul 26, 2023
4832f50
Merge remote-tracking branch 'origin/develop' into mls
battermann Jul 26, 2023
ce82b91
change status of federation-denied back to 400
battermann Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,24 @@ endif
# TASTY_PATTERN=".." make ci package=brig
#
# If you want to pass arguments to the test-suite call cabal-run-integration.sh directly.
.PHONY: ci
ci: c db-migrate
.PHONY: ci-fast
ci-fast: c db-migrate
ifeq ("$(package)", "all")
./hack/bin/cabal-run-integration.sh all
./hack/bin/cabal-run-integration.sh integration
endif
./hack/bin/cabal-run-integration.sh $(package)

# variant of `make ci-fast` that compiles the entire project even if `package` is specified.
.PHONY: ci-safe
ci-safe:
make c package=all
make ci-fast

.PHONY: ci
ci:
@echo -en "\n\n\nplease choose between goals ci-fast and ci-safe.\n\n\n"

# Compile and run services
# Usage: make crun `OR` make crun package=galley
.PHONY: cr
Expand Down
26 changes: 24 additions & 2 deletions cassandra-schema.cql
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ CREATE TABLE brig_test.connection_remote (
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';
CREATE INDEX connection_remote_right_domain_idx ON brig_test.connection_remote (right_domain);

CREATE TABLE brig_test.users_pending_activation (
user uuid PRIMARY KEY,
Expand Down Expand Up @@ -1183,14 +1184,13 @@ CREATE TABLE galley_test.team_features (
mls_e2eid_lock_status int,
mls_e2eid_status int,
mls_e2eid_ver_exp timestamp,
mls_migration_clients_threshold int,
mls_migration_finalise_regardless_after timestamp,
mls_migration_lock_status int,
mls_migration_start_time timestamp,
mls_migration_status int,
mls_migration_users_threshold int,
mls_protocol_toggle_users set<uuid>,
mls_status int,
mls_supported_protocols set<int>,
outlook_cal_integration_lock_status int,
outlook_cal_integration_status int,
search_visibility_inbound_status int,
Expand Down Expand Up @@ -1293,6 +1293,7 @@ CREATE TABLE galley_test.user_remote_conv (
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';
CREATE INDEX user_remote_conv_conv_remote_domain_idx ON galley_test.user_remote_conv (conv_remote_domain);

CREATE TABLE galley_test.legalhold_whitelisted (
team uuid PRIMARY KEY
Expand Down Expand Up @@ -1332,6 +1333,7 @@ CREATE TABLE galley_test.member_remote_user (
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';
CREATE INDEX member_remote_user_user_remote_domain_idx ON galley_test.member_remote_user (user_remote_domain);

CREATE TABLE galley_test.team_member (
team uuid,
Expand Down Expand Up @@ -1419,6 +1421,26 @@ CREATE TABLE galley_test.group_id_conv_id (
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';

CREATE TABLE galley_test.team_admin (
team uuid,
user uuid,
PRIMARY KEY (team, user)
) WITH CLUSTERING ORDER BY (user ASC)
AND bloom_filter_fp_chance = 0.1
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';

-- NOTE: this table is unused. It was replaced by mls_group_member_client
CREATE TABLE galley_test.member_client (
conv uuid,
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/1-api-changes/WPB-1085
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Adding users in Proteus will only succeed if all federated backends hosting the
users are available. Otherwise, the endpoint will fail with a Federation error,
enumerating all unavailable domains.
3 changes: 3 additions & 0 deletions changelog.d/1-api-changes/WPB-240
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Added a new notification event type, "federation.delete".
This event contains a single domain for a remote server that the local server is de-federating from.
This notification is sent twice during de-federation. Once before and once after cleaning up and removing references to the remote server from the local database.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Enable indexed billing members by default and remove the feature flag
1 change: 1 addition & 0 deletions changelog.d/3-bug-fixes/pr-3436
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`/i/user/meta-info` endpoint in backoffice/stern fixed
1 change: 1 addition & 0 deletions changelog.d/4-docs/sso-faq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SSO Faq entry on CSP
1 change: 1 addition & 0 deletions changelog.d/5-internal/ci-redis-ephemeral
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In CI integration tests, use redis-ephemeral in master mode (may be reverted in the future, see PR details)
1 change: 1 addition & 0 deletions changelog.d/5-internal/federator-status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add the status endpoint to both federator ports
2 changes: 2 additions & 0 deletions changelog.d/5-internal/fs-1179
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Adding a new internal APIs to Brig and Galley to defederate domains.
Background-Worker has been reworked to seperate AMQP channel handling from processing. This was done to allow a defederation worker to share the same connection management process with notification pusher.
1 change: 1 addition & 0 deletions changelog.d/5-internal/jsonLower
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[hscim] make `jsonLower` fail on duplicate fields
1 change: 1 addition & 0 deletions changelog.d/5-internal/pr-3346
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Servantify brig internal api: misc
1 change: 1 addition & 0 deletions changelog.d/5-internal/pr-3425
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`stern` is added to the new run-services implementation for the integration tests
1 change: 1 addition & 0 deletions changelog.d/5-internal/wpb-2986
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adding graceful shutdown handling to background-worker to allow it to finish processing its current message before the service quits.
1 change: 1 addition & 0 deletions changelog.d/6-federation/WPB-240
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
De-federating from a remote server sends a pair of notifications to clients, announcing which server will no longer be federated with.
1 change: 1 addition & 0 deletions changelog.d/6-federation/fs-1179
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removing a federation domain will now remove all conversations and users for that domain from the local database.
9 changes: 9 additions & 0 deletions charts/background-worker/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ data:
federatorInternal:
host: federator
port: 8080

galley:
host: galley
port: 8080

brig:
host: brig
port: 8080

rabbitmq:
{{toYaml .rabbitmq | indent 6 }}
backendNotificationPusher:
Expand Down
21 changes: 10 additions & 11 deletions charts/federator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,15 @@ spec:
containerPort: {{ .Values.service.internalFederatorPort }}
- name: external
containerPort: {{ .Values.service.externalFederatorPort }}
# TODO ensure to have a status endpoint!
# livenessProbe:
# httpGet:
# scheme: HTTP
# path: /i/status
# port: {{ .Values.service.internalFederatorPort }}
# readinessProbe:
# httpGet:
# scheme: HTTP
# path: /i/status
# port: {{ .Values.service.internalFederatorPort }}
livenessProbe:
httpGet:
scheme: HTTP
path: /i/status
port: {{ .Values.service.internalFederatorPort }}
readinessProbe:
httpGet:
scheme: HTTP
path: /i/status
port: {{ .Values.service.internalFederatorPort }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
3 changes: 0 additions & 3 deletions charts/galley/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ data:
exposeInvitationURLsTeamAllowlist: {{ .settings.exposeInvitationURLsTeamAllowlist }}
{{- end }}
conversationCodeURI: {{ .settings.conversationCodeURI | quote }}
{{- if .settings.enableIndexedBillingTeamMembers }}
enableIndexedBillingTeamMembers: {{ .settings.enableIndexedBillingTeamMembers }}
{{- end }}
federationDomain: {{ .settings.federationDomain }}
{{- if $.Values.secrets.mlsPrivateKeys }}
mlsPrivateKeyPaths:
Expand Down
3 changes: 0 additions & 3 deletions charts/galley/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ config:
exposeInvitationURLsTeamAllowlist: []
maxConvSize: 500
intraListing: true
# Before making indexedBillingTeamMember true while upgrading, please
# refer to notes here: https://github.com/wireapp/wire-server-deploy/releases/tag/v2020-05-15
indexedBillingTeamMember: false
# Disable one ore more API versions. Please make sure the configuration value is the same in all these charts:
# brig, cannon, cargohold, galley, gundeck, proxy, spar.
# disabledAPIVersions: [ v3 ]
Expand Down
8 changes: 8 additions & 0 deletions charts/integration/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ data:
host: backgroundWorker.{{ .Release.Namespace }}.svc.cluster.local
port: 8080

stern:
host: stern.{{ .Release.Namespace }}.svc.cluster.local
port: 8080

originDomain: federation-test-helper.{{ .Release.Namespace }}.svc.cluster.local

backendTwo:
Expand Down Expand Up @@ -99,4 +103,8 @@ data:
host: backgroundWorker.{{ .Release.Namespace }}-fed2.svc.cluster.local
port: 8080

stern:
host: stern.{{ .Release.Namespace }}-fed2.svc.cluster.local
port: 8080

originDomain: federation-test-helper.{{ .Release.Namespace }}-fed2.svc.cluster.local
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: batch/v1
kind: Job
metadata:
name: check-cluster-job
namespace: databases
namespace: {{ .Release.Namespace }}
spec:
template:
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
name: k8ssandra-cluster
namespace: databases
namespace: {{ .Release.Namespace }}
spec:
auth: false
cassandra:
Expand Down
19 changes: 0 additions & 19 deletions docs/src/developer/reference/config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,6 @@ the Wire backend services.

## Settings in galley

```
# [galley.yaml]
settings:
enableIndexedBillingTeamMembers: false
```

### Indexed Billing Team Members

Use indexed billing team members for journaling. When `enabled`,
galley would use the `billing_team_member` table to send billing
events with user ids of team owners (who have the `SetBilling`
permission). Before enabling this flag, the `billing_team_member`
table must be backfilled.

Even when the flag is `disabled`, galley will keep writing to the
`biling_team_member` table, this flag only affects the reads and has
been added in order to deploy new code and backfill data in
production.

### MLS private key paths

Note: This developer documentation. Documentation for site operators can be found here: {ref}`mls-message-layer-security`
Expand Down
4 changes: 2 additions & 2 deletions docs/src/how-to/install/version-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*Updated: 26.04.2021*

```{warning}
If you already installed Wire by using `poetry`, please refer to the
If you already installed Wire by using `poetry`, which would be the case **only** for ancient (`pre-2020`, version `0.01`) setups, please refer to the
[old version](https://docs.wire.com/versions/install-with-poetry/how-to/index.html) of
the installation guide.
the installation guide. If you have never used `poetry` to install Wire, please ignore this note.
```

## Persistence
Expand Down
1 change: 0 additions & 1 deletion docs/src/understand/federation/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ to synchronize the state of the conversations of their members.
propagate a message to local users. This is used whenever there is a
remote user in a conversation (see end-to-end flows).
- `on-mls-message-sent`: Receive a MLS message that originates in the calling backend
- `on-new-remote-conversation`: Inform the called backend about a conversation that exists on the calling backend. This request is made before the first time the backend might learn about this conversation, e.g. when its first user is added to the conversation.
- `update-typing-indicator`: Used by the calling backend (that does not own the conversation ) to inform the backend about a change of the typing indicator status of one of its users
- `on-typing-indicator-updated`: Used by the calling backend (that owns a conversation) to inform the called backend about a change of the typing indicator status of remote user
- `on-user-deleted-conversations`: When a user on calling backend this request is made for all conversations on the called backend was part of
Expand Down
4 changes: 4 additions & 0 deletions docs/src/understand/single-sign-on/generic-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ eg.
See
<https://support.wire.com/hc/en-us/articles/360000954617-Pro-How-to-log-in-with-SSO>-
on how to use this to login on wire.

## Trouble shooting

See {ref}`FAQ <trouble-shooting-faq>`.
23 changes: 23 additions & 0 deletions docs/src/understand/single-sign-on/trouble-shooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,3 +367,26 @@ clash.

Do not rely on case sensitivity of `IssuerID` or `NameID`, or on
`NameID` qualifiers for distinguishing user identifiers.

## After logging in via IdP page, the redirection to the wire app is not happening

**Problem:** when logging in using SSO, the user gets redirected to
the IdP page. After entering the credentials, IdP successfully
authenticates but is stuck at the stage where redirection needs to
happen to Wire app.

The console log may mention CSP violations.

**Possible cause and fix:** Some browsers prevent redirects if there
is a risk of leaking sensitive form data to the redirect target. In
your setup (in particular when you're using email domain-based
redirect from the wire cloud to your on-prem instance), your browser
may decide to not trust the wire app with the results of the IdP login
procedure. In order to circumvent this issue your IdP needs to be
configured to add the URL of the IdP (or 'self') to the CSP
form-action header.

See also:
[1](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/form-action),
[2](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy),
[3](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
12 changes: 0 additions & 12 deletions flaky-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,6 @@
assertBool, called at test/integration/API/OAuth.hs:473:16 in main:API.OAuth
Use -p '(!/turn/&&!/user.auth.cookies.limit/)&&/max active tokens/' to rerun this test only.

-
test_name: "send billing events to some owners in large teams (indexedBillingTeamMembers disabled)"
comments: |
Error message: create team: Expected 1 TeamActivate, got nothing

CallStack (from HasCallStack):
assertFailure, called at test/integration/API/SQS.hs:74:32 in main:API.SQS
tActivate, called at test/integration/API/SQS.hs:78:47 in main:API.SQS
assertTeamActivate, called at test/integration/API/Util.hs:191:3 in main:API.Util
createBindingTeam', called at test/integration/API/Util.hs:183:20 in main:API.Util
createBindingTeam, called at test/integration/API/Teams.hs:1546:25 in main:API.Teams

-
test_name: "delete team conversation"
comments: |
Expand Down
10 changes: 5 additions & 5 deletions hack/helm_vars/ingress-nginx-controller/values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ ingress-nginx:
# choose a random free port
https: null
http: null
# in CI, do not use ValidatingWebhooks, as these, if not properly cleaned up
# (i.e. the ingress controller was deleted in another namespace but the webhook remains)
# prevent new kind:Ingress resources to be created in the cluster.
admissionWebhooks:
enabled: false
# in CI, do not use ValidatingWebhooks, as these, if not properly cleaned up
# (i.e. the ingress controller was deleted in another namespace but the webhook remains)
# prevent new kind:Ingress resources to be created in the cluster.
admissionWebhooks:
enabled: false
5 changes: 2 additions & 3 deletions hack/helm_vars/wire-server/values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ galley:
maxFanoutSize: 18
maxConvSize: 16
conversationCodeURI: https://kube-staging-nginz-https.zinfra.io/conversation-join/
enableIndexedBillingTeamMembers: true
# See helmfile for the real value
federationDomain: integration.example.com
featureFlags:
Expand Down Expand Up @@ -232,8 +231,8 @@ gundeck:
host: cassandra-ephemeral
replicaCount: 1
redis:
host: redis-cluster
connectionMode: cluster
host: redis-ephemeral-master
connectionMode: master
aws:
account: "123456789012"
region: eu-west-1
Expand Down
12 changes: 0 additions & 12 deletions hack/helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,6 @@ releases:
namespace: '{{ .Values.namespace2 }}'
chart: '../.local/charts/databases-ephemeral'

- name: 'redis-cluster'
namespace: '{{ .Values.namespace1 }}'
chart: '../.local/charts/redis-cluster'
values:
- './helm_vars/redis-cluster/values.yaml.gotmpl'

- name: 'redis-cluster'
namespace: '{{ .Values.namespace2 }}'
chart: '../.local/charts/redis-cluster'
values:
- './helm_vars/redis-cluster/values.yaml.gotmpl'

- name: 'rabbitmq'
namespace: '{{ .Values.namespace1 }}'
chart: '../.local/charts/rabbitmq'
Expand Down
Loading
Loading