Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions changelog.d/5-internal/acl-legalhold-tokens
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow legalhold tokens access to `/converations/<uuid>` endpoint (#2682, #2726)
4 changes: 3 additions & 1 deletion charts/nginz/static/conf/zauth.acl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ b (whitelist (regex "(/v[0-9]+)?/bot(/.*)?"))
p (whitelist (regex "(/v[0-9]+)?/provider(/.*)?"))

# LegalHold Access Tokens
# FUTUREWORK: remove /legalhold/conversations/ when support for v1 dropped
la (whitelist (regex "(/v[0-9]+)?/notifications")
(regex "(/v[0-9]+)?/assets/v3/.*")
(regex "(/v[0-9]+)?/users(/.*)?")
(regex "(/v[0-9]+)?/legalhold/conversations/[^/]+"))
(regex "(/v[0-9]+)?/legalhold/conversations/[^/]+")
(regex "(/v[0-9]+)?/conversations/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"))
25 changes: 11 additions & 14 deletions deploy/services-demo/conf/nginz/zauth_acl.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
a (blacklist (path "/provider")
(path "/provider/**")
(path "/bot")
(path "/bot/**")
(path "/i/**"))
a (blacklist (regex "(/v[0-9]+)?/provider(/.*)?")
(regex "(/v[0-9]+)?/bot(/.*)?")
(regex "(/v[0-9]+)?/i/.*"))

b (whitelist (path "/bot")
(path "/bot/**"))
b (whitelist (regex "(/v[0-9]+)?/bot(/.*)?"))

p (whitelist (path "/provider")
(path "/provider/**"))
p (whitelist (regex "(/v[0-9]+)?/provider(/.*)?"))

# LegalHold Access Tokens
la (whitelist (path "/notifications")
(path "/assets/v3/**")
(path "/users")
(path "/users/**")
(path "/legalhold/conversations/*"))
# FUTUREWORK: remove /legalhold/conversations/ when support for v1 dropped
la (whitelist (regex "(/v[0-9]+)?/notifications")
(regex "(/v[0-9]+)?/assets/v3/.*")
(regex "(/v[0-9]+)?/users(/.*)?")
(regex "(/v[0-9]+)?/legalhold/conversations/[^/]+")
(regex "(/v[0-9]+)?/conversations/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"))
2 changes: 2 additions & 0 deletions services/brig/test/integration/API/User/Auth.hs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ testNginzLegalHold b g n = do

get (n . paths ["legalhold", "conversations", toByteString' (qUnqualified qconv)] . header "Authorization" ("Bearer " <> toByteString' t)) !!! const 200 === statusCode

get (n . paths ["conversations", toByteString' (qUnqualified qconv)] . header "Authorization" ("Bearer " <> toByteString' t)) !!! const 200 === statusCode

-- | Corner case for 'testNginz': when upgrading a wire backend from the old behavior (setting
-- cookie domain to eg. @*.wire.com@) to the new behavior (leaving cookie domain empty,
-- effectively setting it to the backend host), clients may start sending two cookies for a
Expand Down