Hi,
I try to deploy teable on a secure environment.
Current hard assertion made for technical choice seems leading to not be able to use teable if not in a high specific deployment subcase.
For example CSV import require the application to be able to join itself and using the same PUBLIC_ORIGIN than user.
A simple docker traefik like this just broke this assertion.
teable:
image: teableio/teable:latest
depends_on: [traefik, postgres, redis]
environment:
PUBLIC_ORIGIN: http://teable.localhost
labels:
traefik.enable: true
traefik.http.services.teable.loadbalancer.server.port: 3000
traefik.http.routers.teable.rule: Host(`teable.localhost`)
Teable listen on localhost:3000, but is served throught traefik as reverse proxy on teable.localhost:80
When uploading a CSV, teable try to join teable.localhost:80, which is not garanteed to resolve, and in all case teable is not on 80 port but 3000. This leads to error:
request to http://teable.localhost/api/attachments/read/private/import/xxx?token=xxx&response-content-disposition=attachment;%20filename*=UTF-8%27%27foo.csv failed, reason: connect ECONNREFUSED 127.0.0.1:80
On real production, for security reason and isolation, teable will not be on a tcp socket (localhost:3000) but on a uds one (/run/teable/sock), with a nginx or caddy reverse proxy in front of it to really serve the content.
On secure environment, firewall will deny any intra-host communication, and so even binding to a tcp port is not a solution (require to also allow at least traffic from localhost:* to localhost:3000 which is no-go).
Even if firewall whitelist would be possible, teable public traffic would be load balanced to many teable instances by caddy or nginx, but each internal app would only hit themself, bypassing load balancing, IDS, etc.
Once again, there is no garanteed an app can join the public URL even in this case to go back through reverse proxy (VPN restriction, custom VPN DNS, hair pining (😰)…)
Did I miss something or is it not possible to deploy correctly teable with such constraints (app not able to join public url)?
A (partial) solution would be to at least be able to define a PRIVATE_URL for such internal traffic (in the docker traefik config above, PUBLIC_URL=http://teable.localhost with PRIVATE_URL=http://localhost:3000 would work)
Hi,
I try to deploy teable on a secure environment.
Current hard assertion made for technical choice seems leading to not be able to use teable if not in a high specific deployment subcase.
For example CSV import require the application to be able to join itself and using the same
PUBLIC_ORIGINthan user.A simple docker traefik like this just broke this assertion.
Teable listen on
localhost:3000, but is served throught traefik as reverse proxy onteable.localhost:80When uploading a CSV, teable try to join
teable.localhost:80, which is not garanteed to resolve, and in all case teable is not on 80 port but 3000. This leads to error:On real production, for security reason and isolation, teable will not be on a tcp socket (localhost:3000) but on a uds one (
/run/teable/sock), with a nginx or caddy reverse proxy in front of it to really serve the content.On secure environment, firewall will deny any intra-host communication, and so even binding to a tcp port is not a solution (require to also allow at least traffic from
localhost:*tolocalhost:3000which is no-go).Even if firewall whitelist would be possible, teable public traffic would be load balanced to many teable instances by caddy or nginx, but each internal app would only hit themself, bypassing load balancing, IDS, etc.
Once again, there is no garanteed an app can join the public URL even in this case to go back through reverse proxy (VPN restriction, custom VPN DNS, hair pining (😰)…)
Did I miss something or is it not possible to deploy correctly teable with such constraints (app not able to join public url)?
A (partial) solution would be to at least be able to define a
PRIVATE_URLfor such internal traffic (in the docker traefik config above,PUBLIC_URL=http://teable.localhostwithPRIVATE_URL=http://localhost:3000would work)