From 9b1034e3619c70a2c6190aa807201af69e900d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Sibiril?= <81782+aureliensibiril@users.noreply.github.com> Date: Tue, 26 May 2026 15:15:48 +0200 Subject: [PATCH] Skip unconnectable providers in provider listing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ConnectorProviderInfos listed every known provider, including ones this deployment cannot connect: no OAuth client credentials configured and no API-key or client-credentials fallback supported. Those rendered as dead entries the operator has no way to use, so skip them. Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com> --- .../api/console/v1/organization_resolvers.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkg/server/api/console/v1/organization_resolvers.go b/pkg/server/api/console/v1/organization_resolvers.go index 379ae9862..91380962c 100644 --- a/pkg/server/api/console/v1/organization_resolvers.go +++ b/pkg/server/api/console/v1/organization_resolvers.go @@ -549,6 +549,17 @@ func (r *organizationResolver) ConnectorProviderInfos(ctx context.Context, obj * for _, p := range coredata.ConnectorProviders() { _, oauthErr := r.connectorRegistry.Get(string(p)) + oauthConfigured := oauthErr == nil + apiKeySupported := r.providerSupportsAPIKey(p) + clientCredentialsSupported := r.providerSupportsClientCredentials(p) + + // Skip providers that cannot be connected in this deployment: no + // OAuth client credentials configured and no key-based fallback + // (API key or client credentials) supported. Surfacing them would + // render dead entries the operator has no way to use. + if !oauthConfigured && !apiKeySupported && !clientCredentialsSupported { + continue + } scopes := r.providerRegistry.ProviderOAuth2Scopes(p) if scopes == nil { @@ -558,9 +569,9 @@ func (r *organizationResolver) ConnectorProviderInfos(ctx context.Context, obj * info := &types.ConnectorProviderInfo{ Provider: p, DisplayName: r.providerDisplayName(p), - OauthConfigured: oauthErr == nil, - APIKeySupported: r.providerSupportsAPIKey(p), - ClientCredentialsSupported: r.providerSupportsClientCredentials(p), + OauthConfigured: oauthConfigured, + APIKeySupported: apiKeySupported, + ClientCredentialsSupported: clientCredentialsSupported, Oauth2Scopes: scopes, ExtraSettings: r.providerExtraSettings(p), }