linagora / tmail-backend

GNU Affero General Public License v3.0
30 stars 17 forks source link

Update apisix configuration for get public assets endpoint #1046

Closed vttranlina closed 1 month ago

vttranlina commented 1 month ago

Why

epic: https://github.com/linagora/tmail-backend/issues/1027 When the Tmail JMAP server is behind Apisix, we need to update the Apisix configuration to not require authentication for requests to the Get public asset endpoint.

The unrestricted endpoint is /publicAsset/{$accountId}/{$assetId}.

Ref: https://github.com/linagora/tmail-backend/issues/1045

hungphan227 commented 1 month ago

+helm

quantranhong1999 commented 1 month ago

docker compose demo part: https://github.com/linagora/tmail-backend/pull/1072

quantranhong1999 commented 1 month ago

I reopen this as there is Helm chart part left and likely production change too.

chibenwa commented 1 month ago

Oh sorry

quantranhong1999 commented 1 month ago

Oh sorry

No problem ^^

quantranhong1999 commented 1 month ago

docker compose demo part: https://github.com/linagora/tmail-backend/pull/1072

I realize that we need to support other origins and not just tmail.linagora.com for example: https://github.com/linagora/tmail-backend/pull/1075

Otherwise other website may not be able to access the public asset.

quantranhong1999 commented 1 month ago

helm apisix part: https://ci.linagora.com/linagora/lrs/saas/deployments/tmail/emaily-staging-apps/-/merge_requests/41

quantranhong1999 commented 1 month ago

for the tmail.linagora.com part cc @Arsnael Can you do a pair with me maybe on Thursday? I don't want to touch prod alone :D

quantranhong1999 commented 1 month ago

added the APISIX route on prod