pangolin/server
Owen 8419370e5b
Keep tenants from publishing Pangolin's internal services via local sites
Traefik dials a local site's targets from inside Pangolin's own network, so
an org admin could create a local site with a target such as pangolin:3001
and publish the internal API (including the unauthenticated
/traefik-config, which lists every org's header values and gateway trust
tokens) on their own hostname. disable_local_sites was only read by the
dashboard; the server-side check in createSite was commented out.

- createSite refuses local sites when flags.disable_local_sites is set or
  "local" is not in traefik.site_types, and basic WireGuard sites when
  flags.disable_basic_wireguard_sites is set.
- New localSiteTargetError rejects loopback, unspecified, link-local
  (incl. 169.254.169.254), broadcast, localhost, the internal hostname,
  gerbil, traefik and badger. createTarget, updateTarget and blueprint
  targets refuse them on local sites, and both Traefik config generators
  skip existing ones.
- Optional traefik.config_token: when set, GET /traefik-config requires
  "Authorization: Bearer <token>" (constant-time compare). Unset keeps the
  old behaviour and logs a warning once. The installer now generates the
  token and writes it to config.yml and Traefik's HTTP provider headers.
- Migration notes for 1.28.0 cover the config change and a query for
  existing targets that will stop routing.

PAN-1885 / GHSA-jrw8, rx89 part of PAN-1799
2026-11-25 19:34:53 -05:00
..
auth Merge branch '1-27' into dev 2026-11-17 17:47:01 -05:00
db Merge branch 'dev' into custom-login-css 2026-11-20 14:25:16 -05:00
emails Handle support messages for self hosted licenses 2026-11-13 14:43:14 -05:00
lib Keep tenants from publishing Pangolin's internal services via local sites 2026-11-25 19:34:53 -05:00
license License machines 2026-10-20 15:29:37 -04:00
middlewares Only trust cached org membership that belongs to the caller 2026-11-25 18:38:16 -05:00
private Keep tenants from publishing Pangolin's internal services via local sites 2026-11-25 19:34:53 -05:00
routers Keep tenants from publishing Pangolin's internal services via local sites 2026-11-25 19:34:53 -05:00
setup Keep tenants from publishing Pangolin's internal services via local sites 2026-11-25 19:34:53 -05:00
types
aiGatewayServer.ts Only trust cached org membership that belongs to the caller 2026-11-25 18:38:16 -05:00
apiServer.ts Only trust cached org membership that belongs to the caller 2026-11-25 18:38:16 -05:00
certificates.ts Wire up to start 2026-09-14 16:48:10 -04:00
cleanup.ts log chat sessions to database 2026-08-11 12:19:28 -04:00
dns.ts Add dns server 2026-09-14 16:48:09 -04:00
extendZod.ts
index.ts add redirect routes to integration api 2026-10-02 17:11:06 -04:00
integrationApiServer.ts Only trust cached org membership that belongs to the caller 2026-11-25 18:38:16 -05:00
internalServer.ts Only trust cached org membership that belongs to the caller 2026-11-25 18:38:16 -05:00
logger.ts
nextServer.ts Fix #4002 2026-10-26 10:13:50 -04:00
openApi.ts Add resource session tracking page 2026-11-02 14:59:01 -05:00
startSchedulers.ts Fix circular import issue 2026-08-17 12:00:13 -04:00