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

Release 2020/07/13 #1164

Merged
merged 68 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
aafa344
First public release.
Mar 7, 2018
5d88e84
Remove redundant imports
Apr 26, 2018
3842d65
Fix warnings
Apr 26, 2018
7a92cb6
fix cabal, add TODO
jschaul Apr 26, 2018
b41a15f
hpack
fisx Apr 27, 2018
40953de
Fix directory structure.
Apr 27, 2018
9809794
Add default extensions
Apr 27, 2018
900405e
add aeson-qq
jschaul Aug 21, 2018
224827c
gitignore cabal file
jschaul Aug 21, 2018
6cfd669
Tweaks (#7)
fisx Aug 24, 2018
319933f
Okta compliance, part 1 (#8)
Aug 27, 2018
7b9bdb5
Support for basic HTTP authentication (#9)
Sep 3, 2018
5a402d3
More Okta work (#10)
Sep 10, 2018
3011a68
Pass the Okta compliance test (final PR!) (#11)
Sep 14, 2018
a33b475
Simplify the implementation and make it ready to use in wire-server (…
Oct 17, 2018
b92140a
Add 'renderFilter' (#14)
Oct 19, 2018
ff3f87d
Use newer network-uri-static (#15)
Oct 22, 2018
b56b4c5
Remove compatibility with servant-server < 0.12 (#17)
Nov 8, 2018
9bcf39b
Redo authentication (#18)
Nov 9, 2018
9abf972
Migrate from servant-generic to Servant.API.Generic (#19)
Nov 20, 2018
5306564
SCIM -> Scim (#22)
Jan 20, 2019
53db802
Don't merge fields in PUT /Users (#23)
Jan 23, 2019
24c7cc1
Support extra fields in 'User' (#24)
Feb 25, 2019
42f6018
More comments + don't sent the lowercase version to FromJSON extra (#25)
Feb 25, 2019
b2ddde0
Add 'forbidden' error helper (#26)
ChrisPenner Mar 13, 2019
6b98b89
Customizable ID types + no extra logic (#28)
Apr 2, 2019
37d4e2e
Implement PATCH (#35)
arianvp Jan 7, 2020
5b40fba
Build hscim with LTS 14.12 (#40)
arianvp Jan 27, 2020
d4cf3e3
Implement `PATCH` for the `extra` field in User
arianvp Jan 10, 2020
e8835fc
Fix TODO for consistency
akshaymankar Jan 27, 2020
3800b15
Throw error when patch is applied on NoUserExtra
akshaymankar Jan 27, 2020
da16cf9
Use parens for clarity
akshaymankar Jan 27, 2020
b11744c
Revert "Build hscim with LTS 14.12 (#40)"
fisx Jan 28, 2020
484e761
Fixup
fisx Jan 28, 2020
a05ebfd
Whitespace
fisx Jan 14, 2020
b7ac462
Path prefix for acceptance test suite.
fisx Jan 14, 2020
d095fbb
Merge pull request #38 from wireapp/fisx/acceptance-tests-prefix
fisx Feb 3, 2020
af22d89
Build hscim with LTS 14.12 (again) (#41)
fisx Feb 4, 2020
20e2ce1
Make acceptance tests flexible enough to ge called by lib user. (#42)
fisx Mar 9, 2020
a82db55
ormolu tooling.
fisx Mar 13, 2020
1baca97
run ormolu (noisy commit!)
fisx Mar 13, 2020
ebd77e6
Put stack.yaml.lock under version control.
fisx Mar 13, 2020
3db8136
update stack.yaml.lock
fisx Mar 13, 2020
e3df18a
Merge pull request #43 from wireapp/ormolu
fisx Mar 16, 2020
2909c81
Drop dependency on network-uri-static (#44)
arianvp Mar 27, 2020
6fc6ff1
Fix ormolu script. (#46)
fisx Jun 23, 2020
4878a7e
Fix ormolu script. (#1142)
fisx Jun 23, 2020
b66acf7
Test sign up with invalid email (#1141)
mheinzel Jun 24, 2020
86ffe05
add missing license headers (#1143)
mheinzel Jun 24, 2020
f5f7489
Active flag (#45)
arianvp Jun 29, 2020
3dd69bf
Add link to twilio message ID format (#1150)
jschaul Jun 29, 2020
453984c
Fix services-demo (Docker) (#1149)
mheinzel Jun 30, 2020
8710776
Fix setting team feature status in Stern/backoffice (#1146)
mheinzel Jun 30, 2020
283e4cf
Add 'libs/hscim/' from commit 'f5f7489b5fd731537617eb3b9e9e86f4327e81d3'
flokli Jul 1, 2020
5a09926
ormolu
fisx Jul 1, 2020
004148b
add missing Swagger models (#1153)
mheinzel Jul 2, 2020
fdafba7
Run backoffice locally (#1148)
mheinzel Jul 2, 2020
304de49
Cleanup
fisx Jul 1, 2020
d6383ac
Fix demo.sh on nixos. (#1156)
fisx Jul 2, 2020
c3fcda3
Merge pull request #1152 from wireapp/subtree-hscim
fisx Jul 2, 2020
b9a84f9
docs/reference/elastic-search.md: fix typos (#1154)
flokli Jul 2, 2020
9d4e6b8
Tweak cassandra container settings to get it to work on nixos. (#1155)
fisx Jul 8, 2020
d12b48b
Federation: Implement ID mapping (galley) (#1134)
mheinzel Jul 8, 2020
26f339b
Implement active flag in SCIM (#1158)
arianvp Jul 9, 2020
e570f2e
Make cargohold use amazonka instead of aws (#1157)
mheinzel Jul 13, 2020
49f414a
Restrict user creation (#1161)
fisx Jul 13, 2020
a061d4b
CHANGELOG
fisx Jul 13, 2020
a43a215
Revert "Make cargohold use amazonka instead of aws (#1157)"
fisx Jul 13, 2020
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
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# 2020-07-13

## Release Notes

* If you are self-hosting wire on the public internet, consider [changing your brig server config](https://github.com/wireapp/wire-server/blob/49f414add470f4c5e969814a37bc851e26f6d9a7/docs/reference/user/registration.md#blocking-creation-of-personal-users-new-teams-refrestrictregistration).
* Deploy all services except nginz.
* No migrations, no restrictions on deployment order.

## New Features

* Restrict user creation in on-prem installations (#1161)
* Implement active flag in SCIM for user suspension (#1158)

## Bug Fixes

* Fix setting team feature status in Stern/backoffice (#1146)
* Add missing Swagger models (#1153)
* docs/reference/elastic-search.md: fix typos (#1154)

## Internal changes

* Federation: Implement ID mapping (galley) (#1134)
* Tweak cassandra container settings to get it to work on nixos. (#1155)
* Merge wireapp/subtree-hscim repository under `/libs`, preserving history (#1152)
* Add link to twilio message ID format (#1150)
* Run backoffice locally (#1148)
* Fix services-demo (#1149, #1156)
* Add missing license headers (#1143)
* Test sign up with invalid email (#1141)
* Fix ormolu script (source code pretty-printing) (#1142)


# 2020-06-19

## Release Notes
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ docker-services:
$(MAKE) -C services/cannon docker
$(MAKE) -C services/proxy docker
$(MAKE) -C services/spar docker
$(MAKE) -C tools/stern docker
$(MAKE) docker-exe-zauth
$(MAKE) -C services/nginz docker

Expand Down
12 changes: 10 additions & 2 deletions deploy/dockerephemeral/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,18 @@ services:
image: julialongtin/cassandra:0.0.9
ports:
- "127.0.0.1:9042:9042"
ulimits:
memlock: 65536
nofile: 100000
nproc: 32768
environment:
# what's present in the jvm.options file by default.
# - "CS_JAVA_OPTIONS=-Xmx1024M -Xms1024M -Xmn200M"
# what's present in the jvm.options file by default:
#- "CS_JAVA_OPTIONS=-Xmx1024M -Xms1024M -Xmn200M"
- "CS_JVM_OPTIONS=-Xmx128M -Xms128M -Xmn50M"

# on nixos, you also may need to run
# sysctl -w vm.max_map_count=1048576
# or add that to your `configuration.nix`
networks:
- demo_wire

Expand Down
3 changes: 3 additions & 0 deletions deploy/services-demo/conf/brig.demo-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ zauth:
sessionTokenTimeout: 604800 # 7 days
accessTokenTimeout: 900 # 15 minutes
providerTokenTimeout: 604800 # 7 days
legalHoldUserTokenTimeout: 4838400 # 56 days
legalHoldSessionTokenTimeout: 604800 # 7 days
legalHoldAccessTokenTimeout: 900 # 15 minutes

turn:
serversV2: resources/turn/servers-v2.txt
Expand Down
7 changes: 7 additions & 0 deletions deploy/services-demo/conf/galley.demo-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ settings:
maxConvSize: 128
intraListing: false
conversationCodeURI: https://cannon/join/
concurrentDeletionEvents: 1024
deleteConvThrottleMillis: 0

featureFlags: # see #RefConfigOptions in `/docs/reference`
sso: disabled-by-default
legalhold: disabled-by-default
teamSearchVisibility: disabled-by-default

logLevel: Info
logNetStrings: false
1 change: 1 addition & 0 deletions deploy/services-demo/conf/galley.demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ settings:
featureFlags: # see #RefConfigOptions in `/docs/reference`
sso: disabled-by-default
legalhold: disabled-by-default
teamSearchVisibility: disabled-by-default

logLevel: Info
logNetStrings: false
54 changes: 53 additions & 1 deletion deploy/services-demo/conf/nginz/nginx-docker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ http {
#
# Logging
#
# Note sanitized_request:
# We allow passing access_token as query parameter for e.g. websockets
# However we do not want to log access tokens.
#

log_format custom_zeta '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for" - $connection $request_time $upstream_response_time $upstream_cache_status $zauth_user $zauth_connection $request_id $proxy_protocol_addr';
log_format custom_zeta '$remote_addr - $remote_user [$time_local] "$sanitized_request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for" - $connection $request_time $upstream_response_time $upstream_cache_status $zauth_user $zauth_connection $request_id $proxy_protocol_addr';
access_log /dev/stdout custom_zeta;

#
Expand Down Expand Up @@ -97,6 +101,8 @@ http {
}


# Docker DNS, required to resolve the references to stern here.
resolver 127.0.0.11;

#
# Locations
Expand Down Expand Up @@ -192,6 +198,7 @@ http {
include common_response_with_zauth.conf;
proxy_pass http://brig;
}

# Cargohold Endpoints

rewrite ^/api-docs/assets /assets/api-docs?base_url=http://127.0.0.1:8080/ break;
Expand Down Expand Up @@ -272,6 +279,11 @@ http {
proxy_pass http://galley;
}

location ~* ^/teams/([^/]*)/features/([^/]*) {
include common_response_with_zauth.conf;
proxy_pass http://galley;
}

# Gundeck Endpoints

rewrite ^/api-docs/push /push/api-docs?base_url=http://127.0.0.1:8080/ break;
Expand Down Expand Up @@ -345,6 +357,28 @@ http {
proxy_pass http://spar;
}

# Stern Endpoints

# We add a `/stern` suffix to the URL to resolve clashes with non-Stern endpoints.
rewrite ^/backoffice/api-docs/stern /stern/api-docs?base_url=http://127.0.0.1:8080/stern/ break;

location /stern/api-docs {
include common_response_no_zauth.conf;
# Using a variable instead of plain upstream makes nginx still start up if stern is not there.
# https://sandro-keil.de/blog/let-nginx-start-if-upstream-host-is-unavailable-or-down
set $stern stern:8091;
proxy_pass http://$stern;
}

location /stern {
include common_response_no_zauth.conf;
# Using a variable instead of plain upstream makes nginx still start up if stern is not there.
# https://sandro-keil.de/blog/let-nginx-start-if-upstream-host-is-unavailable-or-down
set $stern stern:8091;
# The trailing slash matters, as it makes sure the `/stern` prefix is removed.
proxy_pass http://$stern/;
}

#
# Swagger Resource Listing
#
Expand All @@ -363,6 +397,24 @@ http {
more_set_headers 'Access-Control-Allow-Origin: $http_origin';
}

#
# Back Office Swagger Resource Listing
#
location /backoffice/api-docs {
zauth off;
default_type application/json;
root conf/nginz/zwagger-ui;
index resources.json;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Methods' "GET, POST, PUT, DELETE, OPTIONS";
add_header 'Access-Control-Allow-Headers' "$http_access_control_request_headers, DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type";
add_header 'Content-Type' 'text/plain; charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
more_set_headers 'Access-Control-Allow-Origin: $http_origin';
}

# Swagger UI

location /swagger-ui {
Expand Down
36 changes: 36 additions & 0 deletions deploy/services-demo/conf/nginz/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,24 @@ http {
proxy_pass http://spar;
}

# Stern Endpoints

# We add a `/stern` suffix to the URL to resolve clashes with non-Stern endpoints.
rewrite ^/backoffice/api-docs/stern /stern/api-docs?base_url=http://127.0.0.1:8080/stern/ break;

location /stern/api-docs {
include common_response_no_zauth.conf;
# We don't use an `upstream` for stern, since running stern is optional.
proxy_pass http://127.0.0.1:8091;
}

location /stern {
include common_response_no_zauth.conf;
# We don't use an `upstream` for stern, since running stern is optional.
# The trailing slash matters, as it makes sure the `/stern` prefix is removed.
proxy_pass http://127.0.0.1:8091/;
}

#
# Swagger Resource Listing
#
Expand All @@ -372,6 +390,24 @@ http {
more_set_headers 'Access-Control-Allow-Origin: $http_origin';
}

#
# Back Office Swagger Resource Listing
#
location /backoffice/api-docs {
zauth off;
default_type application/json;
root conf/nginz/zwagger-ui;
index resources.json;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Methods' "GET, POST, PUT, DELETE, OPTIONS";
add_header 'Access-Control-Allow-Headers' "$http_access_control_request_headers, DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type";
add_header 'Content-Type' 'text/plain; charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
more_set_headers 'Access-Control-Allow-Origin: $http_origin';
}

# Swagger UI

location /swagger-ui {
Expand Down
9 changes: 9 additions & 0 deletions deploy/services-demo/conf/proxy.demo-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
host: proxy
port: 8087

httpPoolSize: 1000
maxConns: 5000
secretsConfig: resources/proxy.config

logLevel: Info
logNetStrings: false
28 changes: 28 additions & 0 deletions deploy/services-demo/conf/stern.demo-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
stern:
host: stern
port: 8091

brig:
host: brig
port: 8082

galley:
host: galley
port: 8085

gundeck:
host: gundeck
port: 8086

# Both ibis and galeb should be made optional for
# installations where these services are not available
galeb:
host: galeb
port: 8089

ibis:
host: ibis
port: 8090

logLevel: Info
logNetStrings: false
28 changes: 28 additions & 0 deletions deploy/services-demo/conf/stern.demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
stern:
host: 127.0.0.1
port: 8091

brig:
host: 127.0.0.1
port: 8082

galley:
host: 127.0.0.1
port: 8085

gundeck:
host: 127.0.0.1
port: 8086

# Both ibis and galeb should be made optional for
# installations where these services are not available
galeb:
host: 127.0.0.1
port: 8089

ibis:
host: 127.0.0.1
port: 8090

logLevel: Info
logNetStrings: false
38 changes: 30 additions & 8 deletions deploy/services-demo/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@

set -eo pipefail

USAGE="$0 [docker]"
MODE="$1"
USAGE="$0 [docker] [--run-backoffice]"
docker_deployment="false"
if [ "$MODE" = "docker" ]; then
if [ "$1" = "docker" ] || [ "$2" = "docker" ] ; then
docker_deployment="true"
fi
run_backoffice="false"
if [ "$1" = "--run-backoffice" ] || [ "$2" = "--run-backoffice" ] ; then
run_backoffice="true"
fi
TOP_LEVEL="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )"
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DOCKER_FILE="$SCRIPT_DIR/docker-compose.yaml"
DOCKER_FILE_BACKOFFICE="$SCRIPT_DIR/docker-compose-backoffice.yaml"
DIR="${TOP_LEVEL}/services"
PARENT_PID=$$
rm -f /tmp/demo.* # remove previous temp files, if any
Expand All @@ -32,7 +36,7 @@ function list_descendants () {
}

function kill_gracefully() {
pkill "gundeck|brig|galley|cargohold|cannon|spar"
pkill "gundeck|brig|galley|cargohold|cannon|spar|stern"
sleep 1
kill $(list_descendants $PARENT_PID) &> /dev/null
}
Expand Down Expand Up @@ -83,7 +87,8 @@ function check_prerequisites() {
&& test -f ${DIR}/../dist/cargohold \
&& test -f ${DIR}/../dist/proxy \
&& test -f ${DIR}/../dist/spar \
&& test -f ${DIR}/../dist/nginx \
&& test -f ${DIR}/../dist/stern \
&& ( test -f ${DIR}/../dist/nginx || which nix-build ) \
|| { echo "Not all services are compiled. How about you run 'cd ${TOP_LEVEL} && make services' first?"; exit 1; }
fi
}
Expand All @@ -107,8 +112,18 @@ function run_haskell_service() {
function run_nginz() {
colour=$1
prefix=$([ -w /usr/local ] && echo /usr/local || echo "${HOME}/.wire-dev")
(cd ${SCRIPT_DIR} && LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${prefix}/lib/ ${DIR}/../dist/nginx -p ${SCRIPT_DIR} -c ${SCRIPT_DIR}/conf/nginz/nginx.conf -g 'daemon off;' || kill_all) \
| sed -e "s/^/$(tput setaf ${colour})[nginz] /" -e "s/$/$(tput sgr0)/" &

# For nix we dont need LD_LIBRARY_PATH; we link against libzauth directly.
# nix-build will put a symlink to ./result with the nginx artifact
if which nix-build; then
nginz=$(nix-build "${DIR}/../nix" -A nginz --no-out-link )
(cd ${SCRIPT_DIR} && ${nginz}/bin/nginx -p ${SCRIPT_DIR} -c ${SCRIPT_DIR}/conf/nginz/nginx.conf -g 'daemon off;' || kill_all) \
| sed -e "s/^/$(tput setaf ${colour})[nginz] /" -e "s/$/$(tput sgr0)/" &
else
prefix=$([ -w /usr/local ] && echo /usr/local || echo "${HOME}/.wire-dev")
(cd ${SCRIPT_DIR} && LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${prefix}/lib/ ${DIR}/../dist/nginx -p ${SCRIPT_DIR} -c ${SCRIPT_DIR}/conf/nginz/nginx.conf -g 'daemon off;' || kill_all) \
| sed -e "s/^/$(tput setaf ${colour})[nginz] /" -e "s/$/$(tput sgr0)/" &
fi
}

function copy_brig_templates() {
Expand Down Expand Up @@ -146,9 +161,16 @@ if [ "$docker_deployment" = "false" ]; then
run_haskell_service cargohold ${purpleish}
run_haskell_service proxy ${redish}
run_haskell_service spar ${orange}
if [ "$run_backoffice" = "true" ]; then
run_haskell_service stern ${orange}
fi
run_nginz ${blueish}
else
docker-compose --file "$DOCKER_FILE" up
if [ "$run_backoffice" = "true" ]; then
docker-compose --file "$DOCKER_FILE" --file "$DOCKER_FILE_BACKOFFICE" up
else
docker-compose --file "$DOCKER_FILE" up
fi
fi

sleep 3 # wait a moment for services to start before continuing
Expand Down
Loading