Skip to content

Commit 58fd884

Browse files
authored
Merge pull request #1665 from meridianhub/fix-dex-subdomain
fix: Exempt /dex/ OIDC endpoints from tenant subdomain resolution
2 parents 89ec596 + 7103a1c commit 58fd884

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

shared/platform/gateway/tenant_resolver.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ type tenantRepository interface {
6767
}
6868

6969
// platformPaths lists URL path prefixes that operate at the platform level
70-
// (e.g., tenant creation, listing tenants) and do not require tenant context.
71-
// Requests matching these prefixes bypass tenant resolution entirely.
72-
// Both REST (gRPC-Gateway transcoding) and Connect/gRPC paths are listed
73-
// because the Vanguard transcoder accepts requests in either format.
70+
// (e.g., tenant creation, identity provider endpoints) and do not require
71+
// tenant context. Requests matching these prefixes bypass tenant resolution
72+
// entirely.
7473
var platformPaths = []string{
7574
"/v1/tenants", // REST transcoding path
7675
"/meridian.tenant.v1.TenantService/", // Connect/gRPC path
76+
"/dex/", // Embedded OIDC identity provider
7777
}
7878

7979
// IsPlatformPath returns true if the request path is a platform-level endpoint

shared/platform/gateway/tenant_resolver_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,12 @@ func TestIsPlatformPath(t *testing.T) {
938938
assert.True(t, IsPlatformPath("/meridian.tenant.v1.TenantService/CreateTenant"))
939939
assert.True(t, IsPlatformPath("/meridian.tenant.v1.TenantService/GetTenant"))
940940

941+
// Dex OIDC identity provider paths
942+
assert.True(t, IsPlatformPath("/dex/auth"))
943+
assert.True(t, IsPlatformPath("/dex/callback"))
944+
assert.True(t, IsPlatformPath("/dex/keys"))
945+
assert.True(t, IsPlatformPath("/dex/token"))
946+
941947
// Non-platform paths
942948
assert.False(t, IsPlatformPath("/v1/accounts"))
943949
assert.False(t, IsPlatformPath("/v1/parties"))

0 commit comments

Comments
 (0)