🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix: remove LANGFUSE_SSO_DISCOVERY_ALLOWED_HOSTS (#18944)
Tobias Wochinger7632433489da
diff --git a/.env.dev.example b/.env.dev.exampleindex 789e2fc44a..1c5e007786 100644--- a/.env.dev.example+++ b/.env.dev.example@@ -294,8 +294,6 @@ LANGFUSE_AI_FEATURES_PROJECT_ID=7a88fb47-b4e2-43b8-a06c-a5ce950dc53a# LANGFUSE_SSO_DISCOVERY_WHITELISTED_HOST=localhost# LANGFUSE_SSO_DISCOVERY_WHITELISTED_IPS=127.0.0.1,::1# LANGFUSE_SSO_DISCOVERY_WHITELISTED_IP_SEGMENTS=127.0.0.0/8-# When set, OIDC discovery URLs must use one of these hosts. Checked when SSO is saved.-# LANGFUSE_SSO_DISCOVERY_ALLOWED_HOSTS=# When set, webhook URLs must use one of these hosts. Other outbound calls are unchanged.# LANGFUSE_WEBHOOK_ALLOWED_HOSTS=# Extra CIDR ranges blocked on outbound URL checks that already run. Blob storagediff --git a/.env.prod.example b/.env.prod.exampleindex a9bb5a6c4d..d229cbc358 100644--- a/.env.prod.example+++ b/.env.prod.example@@ -519,8 +519,6 @@ LANGFUSE_ENABLE_BLOB_STORAGE_FILE_LOG=true# LANGFUSE_SSO_DISCOVERY_WHITELISTED_HOST=# LANGFUSE_SSO_DISCOVERY_WHITELISTED_IPS=# LANGFUSE_SSO_DISCOVERY_WHITELISTED_IP_SEGMENTS=-# When set, OIDC discovery URLs must use one of these hosts. Checked when SSO is saved.-# LANGFUSE_SSO_DISCOVERY_ALLOWED_HOSTS=# When set, webhook URLs must use one of these hosts. Other outbound calls are unchanged.# LANGFUSE_WEBHOOK_ALLOWED_HOSTS=# Extra CIDR ranges blocked on outbound URL checks that already run. Blob storagediff --git a/docker-compose.yml b/docker-compose.ymlindex 38012cd38b..fbb337f305 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -36,7 +36,6 @@ services:LANGFUSE_LLM_CONNECTION_ALLOWED_HOSTS: ${LANGFUSE_LLM_CONNECTION_ALLOWED_HOSTS:-}LANGFUSE_WEBHOOK_ALLOWED_HOSTS: ${LANGFUSE_WEBHOOK_ALLOWED_HOSTS:-}LANGFUSE_EXTERNAL_MEDIA_STORAGE_ENDPOINT_ALLOWED_HOSTS: ${LANGFUSE_EXTERNAL_MEDIA_STORAGE_ENDPOINT_ALLOWED_HOSTS:-}- LANGFUSE_SSO_DISCOVERY_ALLOWED_HOSTS: ${LANGFUSE_SSO_DISCOVERY_ALLOWED_HOSTS:-}LANGFUSE_OUTBOUND_BLOCKED_IP_SEGMENTS: ${LANGFUSE_OUTBOUND_BLOCKED_IP_SEGMENTS:-}CLICKHOUSE_MIGRATION_URL: ${CLICKHOUSE_MIGRATION_URL:-clickhouse://clickhouse:9000}CLICKHOUSE_URL: ${CLICKHOUSE_URL:-http://clickhouse:8123}diff --git a/packages/shared/src/env.ts b/packages/shared/src/env.tsindex 62195e3aa1..84a51de536 100644--- a/packages/shared/src/env.ts+++ b/packages/shared/src/env.ts@@ -604,10 +604,6 @@ const EnvSchema = z.object({.transform((s) =>s ? s.split(",").map((s) => s.toLowerCase().trim()) : [],),- // When non-empty, OIDC discovery URLs and the endpoints in the discovery- // document must use one of these hosts. Checked when an SSO configuration- // is saved, same as the exemption list above.- LANGFUSE_SSO_DISCOVERY_ALLOWED_HOSTS: optionalCommaSeparatedLowercase,// Extra CIDR ranges merged into the private-address block for outbound URL// checks that already run. Blob storage stays opt-in: these ranges apply// there only when blob endpoint validation is already enabled. Exemptionsdiff --git a/web/src/ee/features/multi-tenant-sso/validateSsoConfig.ts b/web/src/ee/features/multi-tenant-sso/validateSsoConfig.tsindex 75c85ac670..5c9ceb6aea 100644--- a/web/src/ee/features/multi-tenant-sso/validateSsoConfig.ts+++ b/web/src/ee/features/multi-tenant-sso/validateSsoConfig.ts@@ -99,13 +99,12 @@ async function fetchWithSsrfDefense(url: string): Promise<Response> {}}-/** discoveryWhitelistFromEnv builds the operator exemptions and, when configured, the positive host allowlist. */+/** discoveryWhitelistFromEnv builds the operator exemptions from the internal-address block. */function discoveryWhitelistFromEnv() {return {hosts: env.LANGFUSE_SSO_DISCOVERY_WHITELISTED_HOST || [],ips: env.LANGFUSE_SSO_DISCOVERY_WHITELISTED_IPS || [],ip_ranges: env.LANGFUSE_SSO_DISCOVERY_WHITELISTED_IP_SEGMENTS || [],- allowedHosts: env.LANGFUSE_SSO_DISCOVERY_ALLOWED_HOSTS,};}