pangolin/server/setup
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
..
migrationNotes Keep tenants from publishing Pangolin's internal services via local sites 2026-11-25 19:34:53 -05:00
scriptsPg add migration 2026-11-20 14:36:47 -05:00
scriptsSqlite add migration 2026-11-20 14:36:47 -05:00
.gitignore Setting up drizzle and fix site not showing in private resource 2026-02-12 12:05:15 -08:00
clearStaleData.ts Revalidate OIDC sessions with the IdP using refresh tokens 2026-10-29 11:33:30 +01:00
copyInConfig.ts Propogated Changes. listen port is now accessed from db instead of config 2026-10-06 18:21:05 -06:00
ensureActions.ts Dont run on cloud 2026-07-01 22:07:33 -04:00
ensureRootApiKey.ts Remove debug log 2026-04-20 17:05:47 -07:00
ensureSetupToken.ts Properly insert PANGOLIN_SETUP_TOKEN into db 2026-01-28 15:03:31 -08:00
index.ts Add ability to predefine a root api key 2026-04-20 12:19:21 -07:00
migrationsPg.ts add migration 2026-11-20 14:36:47 -05:00
migrationsSqlite.backup.test.ts fix(sqlite): tag per-migration database backups with version and prevent collisions 2026-09-18 21:31:00 +05:30
migrationsSqlite.ts add migration 2026-11-20 14:36:47 -05:00