Commit graph

116 commits

Author SHA1 Message Date
Owen
d3cf234e58
Fix tests for consistancy and to use node:test 2026-11-30 14:29:29 -05:00
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
Owen
a8c2b1f3a3
Only trust p-host when Traefik stamps the trust token 2026-11-23 10:44:54 -05:00
Owen
ad7bf2382c
Fix wildcard resource domain pulling 2026-11-03 10:40:36 -05:00
Owen
4726cb4fc1
Support matching on the base wildcard resources 2026-11-02 15:30:16 -05:00
Owen
f4410cdbeb
Sanitize values before including in treafik config 2026-10-27 15:10:08 -04:00
Owen
d02d2f79ba
Make sure the MTLS is enforced for redirects 2026-10-20 11:53:44 -04:00
Owen
3510054a92
MTLS for all public resources 2026-10-20 11:51:43 -04:00
Owen
f4140fd6f6
Add mtls to blueprint, policy, and oss getTraefikConfig 2026-10-20 10:02:44 -04:00
Owen
6989739bf9
Write mtls certs to files when using the TraefikConfigManager 2026-10-16 12:24:21 -04:00
miloschwartz
a6a3816b56
more ui adjustments 2026-10-15 15:42:43 -04:00
miloschwartz
1f1d3d7e0f
fix merge 2026-10-15 12:01:31 -04:00
miloschwartz
89f6748a1b
Merge branch 'dev' into feat/redirect-tables 2026-10-15 11:47:55 -04:00
Owen
b43709903d
Add support for configuring load balancing strategy 2026-10-12 16:47:12 -04:00
Owen Schwartz
27e0f00d65
Merge pull request #3838 from kdcokenny/fix/traefik-ipv6-targets
fix: use formatEndpoint for local targets
2026-10-01 09:06:18 -04:00
kdcokenny
8c3d0bd7f6 fix: use formatEndpoint for local targets 2026-09-30 20:27:27 +00:00
Owen
8ff05c0ec3
Start pulling cert at 15 days (due to cert update) 2026-09-30 14:01:17 -04:00
Fred KISSIE
0b0f62d8de ♻️ fix types and validate destination Host correcly 2026-09-23 21:00:26 +02:00
Fred KISSIE
14fda9cec0 ♻️ Force disable redirects when domain is missing attached resource domain 2026-09-23 20:49:45 +02:00
Fred KISSIE
ca18320ca3 Merge branch 'dev' into feat/redirect-tables 2026-09-22 22:36:53 +02:00
Owen Schwartz
3392120855
Merge pull request #3172 from Gulianrdgd/feature-response-headers
Feature response headers
2026-09-21 15:16:24 -04:00
Fred KISSIE
57b80bf74e
♻️ Add ssl field to redirects and add traefik config to public file 2026-09-18 23:38:46 +02:00
Fred KISSIE
d06a261cd6
♻️ refactor 2026-09-18 21:04:56 +02:00
Fred KISSIE
67f45023db
Merge branch 'dev' into feat/redirect-tables 2026-09-18 20:59:18 +02:00
Fred KISSIE
2cb5cea48f
✨ handle redirect request in badger's verifySession 2026-09-18 20:29:52 +02:00
Fred KISSIE
ec36317057
✨ finish redirect traefik config 2026-09-17 21:32:55 +02:00
Fred KISSIE
c51bcbb578
🚧 wip: traefik config for redirect 2026-09-16 19:30:10 +02:00
Owen
324f3e50ff
Add license tiers 2026-09-15 16:25:53 -04:00
Owen
143b4cf757
Atomically write files to avoid races with traefik 2026-09-15 10:04:00 -04:00
Owen
350f8c012a
Pull in static domains to the traefik config again 2026-09-14 16:48:10 -04:00
Owen
e66f7fe71b
Implement exit node check-in tracking and adjust logging for connection errors 2026-09-14 16:48:10 -04:00
Owen
3421441635
Add cert_mode to know when to gen or pull certs 2026-09-14 16:48:09 -04:00
Owen
073bfb32e9
Adjust lic headers 2026-09-14 16:48:09 -04:00
Julian van der Horst
6ad09adefa
Merge upstream/dev into feature-response-headers
Resolve conflicts against upstream's refactors:

- server/db/sqlite/schema/schema.ts: adopt upstream's reindented
  sqliteTable(name, cols, indexes) form for sites/resources, re-applying
  the headers -> requestHeaders/responseHeaders split. Kept in sync with
  the Postgres schema.
- server/lib/traefik/headersMiddleware.ts: extend upstream's extracted
  buildCustomHeadersMiddleware helper to take requestHeaders and
  responseHeaders and emit both customRequestHeaders and
  customResponseHeaders.
- server/lib/traefik/getTraefikConfig.ts and
  server/private/lib/traefik/getTraefikConfig.ts: keep upstream's helper
  extraction and appendPathMatch refactor, dropping the superseded inline
  blocks.

Also carry the feature forward onto code that moved upstream:

- The resource settings UI moved from resources/proxy/[niceId]/proxy to
  resources/public/[niceId]/http, which dropped this branch's changes in
  the previous merge. Re-add the request/response header inputs there and
  rename the vestigial headers field on the tcp page.
- messages/da-DK.json is new upstream and still had the old customHeaders
  key; rename it in line with the other locales.

Per the contributing docs, versioned migrations are intentionally omitted
so maintainers can write them at release time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 13:40:49 +02:00
Owen
7a61b182e0
Deduplicate inference resources by fullDomain to prevent duplicate routers 2026-08-17 17:13:22 -04:00
Owen
91b697b80b
Track public inference domains to avoid duplicate routers for siteResource aliases 2026-08-17 17:06:37 -04:00
Owen
af515f1072
Pass 2 bring over browser resources and http resource cert gen 2026-08-17 12:00:12 -04:00
Owen
c90c67eab3
Pass 1 of pulling traefik config into functions 2026-08-17 12:00:12 -04:00
Owen
11daf4f927
Move certificates 2026-08-17 12:00:12 -04:00
Owen
234819f8f2
Dont load private resource inference without a exit node loaded 2026-08-14 12:23:20 -04:00
Owen
7291628f86
optionally stamp ip header for downstream use 2026-08-13 09:14:37 -04:00
Owen
5fbb205044
search the right resource 2026-08-12 17:52:39 -04:00
Owen
860fa47b7c
Split out the token header into a common middleware for efficiency 2026-08-12 16:30:42 -04:00
Owen
653dd920ad
Allow remote header overrides and fix display issues with log 2026-08-12 15:54:22 -04:00
miloschwartz
49020fa6ea
add virtual api key validation in verifySession 2026-08-12 10:38:26 -04:00
Owen
6cca5e0472
Use fulldoman instead of the alias for the site resources 2026-08-06 13:45:51 -04:00
Owen
75ce7e91d7
Restrict the ai site resource router to exit node subnet 2026-08-06 11:00:34 -04:00
Owen
3d062389e9
update oss with gateway traefik routers 2026-08-05 10:14:40 -04:00
Owen
6526d7f225
Remove completions endpoints 2026-08-04 17:09:44 -04:00
Owen
aad26b9ae4
move the ai gateway to its own server 2026-08-04 17:08:59 -04:00