linagora / tmail-backend

GNU Affero General Public License v3.0
41 stars 22 forks source link

Update apisix configuration for get public assets endpoint #1046

Closed vttranlina closed 5 months ago

vttranlina commented 5 months 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 5 months ago

+helm

quantranhong1999 commented 5 months ago

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

quantranhong1999 commented 5 months ago

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

chibenwa commented 5 months ago

Oh sorry

quantranhong1999 commented 5 months ago

Oh sorry

No problem ^^

quantranhong1999 commented 5 months 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 5 months ago

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

quantranhong1999 commented 5 months 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 5 months ago

added the APISIX route on prod