Skip to content

Commit 13a6a83

Browse files
authored
Merge pull request #2080 from wireapp/release_2022_01_27
2 parents b97b966 + 0641f90 commit 13a6a83

File tree

1,275 files changed

+4630
-2415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,275 files changed

+4630
-2415
lines changed

.headroom.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ variables:
1212
organization: Wire Swiss GmbH
1313
1414
project: This file is part of the Wire Server implementation.
15-
year: '2020'
15+
year: '2022'
1616
license-headers:
1717
haskell:
1818
file-extensions: ["hs", "hsc"]

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,52 @@
11
<!-- if you're not the release manager, do your edits to changelog under CHANGELOG.d/ -->
22

3+
# [2022-01-27]
4+
5+
## Release notes
6+
7+
* The `nginz` chart now configures nginx to only allow cross-origin requests from an explicit allow list of subdomains. By default these are:
8+
9+
```yaml
10+
nginz:
11+
nginx_conf:
12+
allowlisted_origins:
13+
- webapp
14+
- teams
15+
- account
16+
```
17+
18+
If you changed the names of these services, you must adjust those names in the nginz config as well. (#1630, #2073, 116988c62732)
19+
20+
* Backend now separates conversation access control for guests and services. The old access roles are still supported but it is encouraged to upgrade clients since mapping between the old access roles and the new access roles is not isomorphic. For more details refer to the API changes below or the Swagger docs.
21+
Old clients are fully supported; if new clients and old clients are mixed, to old clients, either guests of services may appear to be enable if they are not, which may lead to error messages (confusing but harmless). (#2035)
22+
23+
## API changes
24+
25+
* Endpoints that recently have accepted `access_role` in their payload will now accept `access_role_v2` as well which will take precedence over `access_role`. See Swagger docs for how values are mapped. Endpoints that recently have returned `access_role` in their payload will now additionally return the `access_role_v2` field. (#2035)
26+
27+
## Features
28+
29+
* Conversation access roles now distinguish between guests and services. (#2035)
30+
31+
## Bug fixes and other updates
32+
33+
* There is now an explicit CORS allow list for *all* endpoints. In previous releases, all subdomains were accepted, however they must now be listed explicitly. This is a **breaking change**, as now only known Javascript applications may access the backend. (#1630, #2073, 116988c62732)
34+
* Prevent 500s when SFTs are not reachable from Backend (#2077)
35+
36+
## Internal changes
37+
38+
* Bump hsaml2 package version (#2075)
39+
* Separate Spar.Data module into smaller Cassandra interpreters (#2064)
40+
* Fix some HLint issues in libs/wire-api. (#2065)
41+
* Fix broken build process of package "old-time" for some environments (#2056)
42+
* Refresh license headers (#2062)
43+
* Rename Spar.Sem.ScimTokenStore.GetByTeam to LookupByTeam (#2068)
44+
45+
## Federation changes
46+
47+
* Tag several federation tests cases for the M2 release (#2045)
48+
49+
350
# [2022-01-18]
451

552
## Release notes

charts/nginz/templates/conf/_nginx.conf.tpl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ http {
125125

126126
map $http_origin $cors_header {
127127
default "";
128-
"~^https://([^/]+\.)?{{ .Values.nginx_conf.external_env_domain | replace "." "\\." }}(:[0-9]{2,5})?$" "$http_origin";
128+
{{ range $origin := .Values.nginx_conf.allowlisted_origins }}
129+
"https://{{ $origin }}.{{ $.Values.nginx_conf.external_env_domain}}" "$http_origin";
130+
{{ end }}
129131
}
130132

131133

@@ -293,11 +295,7 @@ http {
293295
more_set_headers 'Access-Control-Allow-Credentials: true';
294296
{{ end -}}
295297

296-
{{ if ($location.restrict_whitelisted_origin) -}}
297298
more_set_headers 'Access-Control-Allow-Origin: $cors_header';
298-
{{- else }}
299-
more_set_headers 'Access-Control-Allow-Origin: $http_origin';
300-
{{- end }}
301299

302300
more_set_headers 'Access-Control-Expose-Headers: Request-Id, Location';
303301
more_set_headers 'Request-Id: $request_id';

charts/nginz/values.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ nginx_conf:
5252
- ~* ^/conversations/([^/]*)/call/state
5353
- /search/top
5454
- /search/common
55+
# -- The origins from which we allow CORS requests. These are combined with 'external_env_domain' to form a full url
56+
allowlisted_origins:
57+
- webapp
58+
- teams
59+
- account
5560
upstreams:
5661
cargohold:
5762
- path: ~* ^/conversations/([^/]*)/assets
@@ -79,7 +84,6 @@ nginx_conf:
7984
envs:
8085
- all
8186
allow_credentials: true
82-
restrict_whitelisted_origin: true
8387
max_body_size: "0"
8488
disable_request_buffering: true
8589
brig:
@@ -149,7 +153,6 @@ nginx_conf:
149153
envs:
150154
- all
151155
allow_credentials: true
152-
restrict_whitelisted_origin: true
153156
- path: /bot/self
154157
envs:
155158
- all
@@ -170,13 +173,11 @@ nginx_conf:
170173
envs:
171174
- all
172175
allow_credentials: true
173-
restrict_whitelisted_origin: true
174176
disable_zauth: true
175177
- path: /activate
176178
envs:
177179
- all
178180
allow_credentials: true
179-
restrict_whitelisted_origin: true
180181
disable_zauth: true
181182
- path: /delete
182183
envs:
@@ -238,7 +239,6 @@ nginx_conf:
238239
- all
239240
disable_zauth: true
240241
allow_credentials: true
241-
restrict_whitelisted_origin: true
242242
unlimited_requests_endpoint: true
243243
- path: /login
244244
envs:

dev-packages.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ let
159159
export LIBRARY_PATH="${compile-deps}/lib"
160160
export PKG_CONFIG_PATH="${compile-deps}/lib/pkgconfig"
161161
export PATH="${compile-deps}/bin"
162+
export CONFIG_SHELL="${compile-deps}/bin/sh"
162163
exec "${pkgs.cabal-install}/bin/cabal" "$@"
163164
'';
164165
in

docs/reference/cassandra-schema.cql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ CREATE TABLE galley_test.conversation (
227227
conv uuid PRIMARY KEY,
228228
access set<int>,
229229
access_role int,
230+
access_roles_v2 set<int>,
230231
creator uuid,
231232
deleted boolean,
232233
message_timer bigint,

hack/helm_vars/wire-server/values.yaml.gotmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ nginz:
194194
nginx_conf:
195195
env: staging
196196
external_env_domain: zinfra.io
197+
# NOTE: Web apps are disabled by default
198+
allowlisted_origins: []
197199
secrets:
198200
basicAuth: "whatever"
199201
zAuth:

libs/api-bot/src/Network/Wire/Bot.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- This file is part of the Wire Server implementation.
22
--
3-
-- Copyright (C) 2020 Wire Swiss GmbH <[email protected]>
3+
-- Copyright (C) 2022 Wire Swiss GmbH <[email protected]>
44
--
55
-- This program is free software: you can redistribute it and/or modify it under
66
-- the terms of the GNU Affero General Public License as published by the Free

libs/api-bot/src/Network/Wire/Bot/Assert.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
-- This file is part of the Wire Server implementation.
55
--
6-
-- Copyright (C) 2020 Wire Swiss GmbH <[email protected]>
6+
-- Copyright (C) 2022 Wire Swiss GmbH <[email protected]>
77
--
88
-- This program is free software: you can redistribute it and/or modify it under
99
-- the terms of the GNU Affero General Public License as published by the Free

libs/api-bot/src/Network/Wire/Bot/Cache.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
-- This file is part of the Wire Server implementation.
44
--
5-
-- Copyright (C) 2020 Wire Swiss GmbH <[email protected]>
5+
-- Copyright (C) 2022 Wire Swiss GmbH <[email protected]>
66
--
77
-- This program is free software: you can redistribute it and/or modify it under
88
-- the terms of the GNU Affero General Public License as published by the Free

0 commit comments

Comments
 (0)