Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
11 changes: 6 additions & 5 deletions build/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@
FROM wire-server-builder:alpine as builder

ARG service
COPY . /src
COPY . /src/wire-server/

RUN cd /src/services/${service} && make install
RUN cd /src/wire-server/services/${service} && make install

#--- Minified stage ---
FROM wire-server-deps:alpine

ARG service
COPY --from=builder /src/services/${service}/dist/${service} /usr/local/bin/${service}
ARG executable
COPY --from=builder /src/wire-server/services/${service}/dist/${executable} /usr/bin/${exectuable}

# ARGs are not available at runtime, create symlink at build time
# more info: https://stackoverflow.com/questions/40902445/using-variable-interpolation-in-string-in-docker
RUN ln -s /usr/local/bin/${service} /usr/local/bin/service
ENTRYPOINT ["/usr/local/bin/service"]
RUN ln -s /usr/bin/${executable} /usr/bin/service
ENTRYPOINT ["/usr/bin/service"]
1 change: 1 addition & 0 deletions libs/api-bot/src/Network/Wire/Bot/Cache.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Data.ByteString.Conversion
import Data.IORef
import Data.LanguageCodes
import Data.Maybe (fromMaybe)
import Data.Misc
import Data.Monoid
import Data.Text.Encoding
import Data.Text.Lazy hiding (length, map)
Expand Down
2 changes: 2 additions & 0 deletions libs/api-bot/src/Network/Wire/Bot/Monad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ import Data.Id
import Data.IORef
import Data.List (foldl', partition)
import Data.Maybe (fromMaybe, isNothing)
import Data.Misc
import Data.Metrics (Metrics)
import Data.Monoid ((<>))
import Data.String (IsString)
Expand Down Expand Up @@ -861,6 +862,7 @@ randUser (Email loc dom) (BotTag tag) = do
, newUserInvitationCode = Nothing
, newUserLabel = Nothing
, newUserLocale = Nothing
, newUserTeam = Nothing
}, passw)

randMailbox :: BotNet Mailbox
Expand Down
1 change: 1 addition & 0 deletions libs/api-bot/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ extra-deps:
flags:
types-common:
protobuf: True
arbitrary: True
1 change: 1 addition & 0 deletions libs/api-client/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ extra-deps:
flags:
types-common:
protobuf: True
arbitrary: True
4 changes: 4 additions & 0 deletions libs/galley-types/src/Galley/Types/Teams/Intra.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,22 @@ data TeamStatus
| PendingDelete
| Deleted
| Suspended
| PendingActive
deriving (Eq, Show)

instance ToJSON TeamStatus where
toJSON Active = String "active"
toJSON PendingDelete = String "pending_delete"
toJSON Deleted = String "deleted"
toJSON Suspended = String "suspended"
toJSON PendingActive = String "pending_active"

instance FromJSON TeamStatus where
parseJSON (String "active") = pure Active
parseJSON (String "pending_delete") = pure PendingDelete
parseJSON (String "deleted") = pure Deleted
parseJSON (String "suspended") = pure Suspended
parseJSON (String "pending_active") = pure PendingActive
parseJSON other = fail $ "Unknown TeamStatus: " <> show other

data TeamData = TeamData
Expand Down Expand Up @@ -56,3 +59,4 @@ instance FromJSON TeamStatusUpdate where

instance ToJSON TeamStatusUpdate where
toJSON s = object ["status" .= tuStatus s]

1 change: 0 additions & 1 deletion services/brig/.ghci
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
:set -isrc
:set -XOverloadedStrings
10 changes: 9 additions & 1 deletion services/brig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ DEB_IT := dist/$(NAME)-integration_$(VERSION)+$(BUILD)_amd64.deb
DEB_SCHEMA := dist/$(NAME)-schema_$(VERSION)+$(BUILD)_amd64.deb
DEB_INDEX := dist/$(NAME)-index_$(VERSION)+$(BUILD)_amd64.deb
KEIRETSU_ENV ?= ../.env
EXECUTABLES := $(NAME) $(NAME)-integration $(NAME)-schema $(NAME)-index

guard-%:
@ if [ "${${*}}" = "" ]; then \
Expand Down Expand Up @@ -115,4 +116,11 @@ index-reset: install

.PHONY: docker
docker:
docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
$(foreach executable,$(EXECUTABLES),\
docker build -t $(executable) \
-f ../../build/alpine/Dockerfile \
--build-arg service=$(NAME) \
--build-arg executable=$(executable) \
../.. \
;)

2 changes: 1 addition & 1 deletion services/brig/Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: LOG_LEVEL=Warn ./dist/brig --host=$BRIG_WEB_HOST --port=$PORT --cassandra-host=$BRIG_CASSANDRA_HOST --cassandra-port=$BRIG_CASSANDRA_PORT --cassandra-keyspace=$BRIG_CASSANDRA_KEYSPACE --galley-host=$GALLEY_WEB_HOST --galley-port=$GALLEY_WEB_PORT --gundeck-host=$GUNDECK_WEB_HOST --gundeck-port=$GUNDECK_WEB_PORT --aws-ses-queue=$AWS_USER_SES_QUEUE --aws-internal-queue=$AWS_USER_INTERNAL_QUEUE --aws-dynamo-blacklist=$AWS_USER_BLACKLIST_TABLE --aws-dynamo-prekeys=$AWS_USER_PREKEYS_TABLE --aws-account-id=$AWS_ACCOUNT --aws-access-key-id=$AWS_ACCESS_KEY_ID --aws-secret-access-key=$AWS_SECRET_ACCESS_KEY --twilio-sid=$TWILIO_SID --twilio-token=$TWILIO_TOKEN --twilio-sender=$TWILIO_SENDER --nexmo-key=$NEXMO_KEY --nexmo-secret=$NEXMO_SECRET --nexmo-endpoint=$NEXMO_ENDPOINT --activation-url=http://$BRIG_WEB_HOST:$PORT/activate?key=\${key}\&code=\${code} --sms-activation-url=http://$BRIG_WEB_HOST:$PORT/v/\${code} --password-reset-url=http://$BRIG_WEB_HOST:$PORT/password-reset/\${key}?code=\${code} --invitation-url=http://$BRIG_WEB_HOST:$PORT/register?invitation_code=\${code} --deletion-url=http://$BRIG_WEB_HOST:$PORT/users/delete?key=\${key}\&code=\${code} --provider-activation-url=http://$BRIG_WEB_HOST:$PORT/provider/activate?key=\${key}\&code=\${code} --provider-approval-url=http://$BRIG_WEB_HOST:$PORT/provider/approve?key=\${key}\&code=\${code} --team-invitation-url=http://$BRIG_WEB_HOST:$PORT/register?team=\${team}\&team_code=\${code} --template-dir=deb/opt/brig/templates --email-sender=$EMAIL_SENDER --activation-timeout=$USER_ACTIVATION_TIMEOUT --user-connection-limit=$USER_CONNECTION_LIMIT --cookie-domain=$COOKIE_DOMAIN --provider-approval-to=$PROVIDER_APPROVAL_TO --provider-home-url=$PROVIDER_HOME_URL --zauth-provider-token-timeout=$ZAUTH_PROVIDER_TOKEN_TIMEOUT --zauth-private-keys=$ZAUTH_PRIVKEYS --zauth-public-keys=$ZAUTH_PUBKEYS --zauth-key-index=$ZAUTH_KEY_INDEX --zauth-user-token-timeout=$ZAUTH_USER_TOKEN_TIMEOUT --user-cookie-renew-age=$USER_COOKIE_RENEW_AGE --zauth-access-token-timeout=$ZAUTH_ACCESS_TOKEN_TIMEOUT --zauth-session-token-timeout=$ZAUTH_SESSION_TOKEN_TIMEOUT --cookie-insecure --user-cookie-retry-after=$USER_COOKIE_RETRY_AFTER --user-cookie-min-deviation=$USER_COOKIE_MIN_DEVIATION --user-cookie-limit=$USER_COOKIE_LIMIT --turn-servers=$TURN_SERVERS --turn-secret=$TURN_SECRET --elasticsearch-url=$BRIG_ELASTICSEARCH_URL --elasticsearch-user-index=$BRIG_ELASTICSEARCH_USER_INDEX
web: LOG_LEVEL=Warn ./dist/brig --host=$BRIG_WEB_HOST --port=$PORT --cassandra-host=$BRIG_CASSANDRA_HOST --cassandra-port=$BRIG_CASSANDRA_PORT --cassandra-keyspace=$BRIG_CASSANDRA_KEYSPACE --galley-host=$GALLEY_WEB_HOST --galley-port=$GALLEY_WEB_PORT --gundeck-host=$GUNDECK_WEB_HOST --gundeck-port=$GUNDECK_WEB_PORT --aws-ses-queue=$AWS_USER_SES_QUEUE --aws-internal-queue=$AWS_USER_INTERNAL_QUEUE --aws-dynamo-blacklist=$AWS_USER_BLACKLIST_TABLE --aws-dynamo-prekeys=$AWS_USER_PREKEYS_TABLE --aws-account-id=$AWS_ACCOUNT --aws-access-key-id=$AWS_ACCESS_KEY_ID --aws-secret-access-key=$AWS_SECRET_ACCESS_KEY --twilio-sid=$TWILIO_SID --twilio-token=$TWILIO_TOKEN --twilio-sender=$TWILIO_SENDER --nexmo-key=$NEXMO_KEY --nexmo-secret=$NEXMO_SECRET --nexmo-endpoint=$NEXMO_ENDPOINT --activation-url=http://$BRIG_WEB_HOST:$PORT/activate?key=\${key}\&code=\${code} --team-activation-url=http://$BRIG_WEB_HOST:$PORT/activate?key=\${key}\&code=\${code} --sms-activation-url=http://$BRIG_WEB_HOST:$PORT/v/\${code} --password-reset-url=http://$BRIG_WEB_HOST:$PORT/password-reset/\${key}?code=\${code} --invitation-url=http://$BRIG_WEB_HOST:$PORT/register?invitation_code=\${code} --deletion-url=http://$BRIG_WEB_HOST:$PORT/users/delete?key=\${key}\&code=\${code} --provider-activation-url=http://$BRIG_WEB_HOST:$PORT/provider/activate?key=\${key}\&code=\${code} --provider-approval-url=http://$BRIG_WEB_HOST:$PORT/provider/approve?key=\${key}\&code=\${code} --team-invitation-url=http://$BRIG_WEB_HOST:$PORT/register?team=\${team}\&team_code=\${code} --template-dir=deb/opt/brig/templates --email-sender=$EMAIL_SENDER --activation-timeout=$USER_ACTIVATION_TIMEOUT --user-connection-limit=$USER_CONNECTION_LIMIT --cookie-domain=$COOKIE_DOMAIN --provider-approval-to=$PROVIDER_APPROVAL_TO --provider-home-url=$PROVIDER_HOME_URL --zauth-provider-token-timeout=$ZAUTH_PROVIDER_TOKEN_TIMEOUT --zauth-private-keys=$ZAUTH_PRIVKEYS --zauth-public-keys=$ZAUTH_PUBKEYS --zauth-key-index=$ZAUTH_KEY_INDEX --zauth-user-token-timeout=$ZAUTH_USER_TOKEN_TIMEOUT --user-cookie-renew-age=$USER_COOKIE_RENEW_AGE --zauth-access-token-timeout=$ZAUTH_ACCESS_TOKEN_TIMEOUT --zauth-session-token-timeout=$ZAUTH_SESSION_TOKEN_TIMEOUT --cookie-insecure --user-cookie-retry-after=$USER_COOKIE_RETRY_AFTER --user-cookie-min-deviation=$USER_COOKIE_MIN_DEVIATION --user-cookie-limit=$USER_COOKIE_LIMIT --turn-servers=$TURN_SERVERS --turn-secret=$TURN_SECRET --elasticsearch-url=$BRIG_ELASTICSEARCH_URL --elasticsearch-user-index=$BRIG_ELASTICSEARCH_USER_INDEX
5 changes: 3 additions & 2 deletions services/brig/brig.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ library
, iproute >= 1.5
, lens >= 3.8
, lens-aeson >= 1.0
, lifted-async >= 0.8
, lifted-async >= 0.9.3
, mime-mail >= 0.4
, metrics-core >= 0.3
, metrics-wai >= 0.3
Expand Down Expand Up @@ -317,6 +317,7 @@ test-suite brig-integration
, directory >= 1.2
, errors >= 1.4
, exceptions >= 0.5
, extra
, filepath >= 1.4
, galley-types
, gundeck-types
Expand All @@ -326,7 +327,7 @@ test-suite brig-integration
, HsOpenSSL
, lens >= 3.9
, lens-aeson >= 1.0
, lifted-async >= 0.7
, lifted-async >= 0.9.3
, mtl >= 2.1
, network
, options >= 0.1
Expand Down
1 change: 1 addition & 0 deletions services/brig/deb/etc/sv/brig/run
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ exec chpst -u $USER \
--cassandra-port=${BRIG_CASSANDRA_PORT?'unset'} \
--cassandra-keyspace=${BRIG_CASSANDRA_KEYSPACE?'unset'} \
--activation-url=${BRIG_ACTIVATION_URL?'unset'} \
--team-activation-url=${BRIG_TEAM_ACTIVATION_URL?'unset'} \
--activation-timeout=${BRIG_ACTIVATION_TIMEOUT?'unset'} \
--sms-activation-url=${BRIG_SMS_ACTIVATION_URL?'unset'} \
--password-reset-url=${BRIG_PASSWORD_RESET_URL?'unset'} \
Expand Down

This file was deleted.

126 changes: 0 additions & 126 deletions services/brig/deb/opt/brig/templates/user/ar/email/update.html

This file was deleted.

22 changes: 0 additions & 22 deletions services/brig/deb/opt/brig/templates/user/ar/email/update.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dein Wire-Benutzerkonto
Loading