Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix(idp): do not expose client secret in responses (#4463)

Joe Chen30d6221dd3c5
diff --git a/backend/api/v1/idp_service.go b/backend/api/v1/idp_service.go
index 8cecce9bba..3848b199c7 100644
--- a/backend/api/v1/idp_service.go
+++ b/backend/api/v1/idp_service.go
@@ -261,7 +261,7 @@ func convertIdentityProviderConfigFromStore(identityProviderConfig *storepb.Iden
TokenUrl: v.TokenUrl,
UserInfoUrl: v.UserInfoUrl,
ClientId: v.ClientId,
- ClientSecret: v.ClientSecret,
+ ClientSecret: "", // SECURITY: We do not expose the client secret
Scopes: v.Scopes,
FieldMapping: &fieldMapping,
},
@@ -278,14 +278,13 @@ func convertIdentityProviderConfigFromStore(identityProviderConfig *storepb.Iden
OidcConfig: &v1pb.OIDCIdentityProviderConfig{
Issuer: v.Issuer,
ClientId: v.ClientId,
- ClientSecret: v.ClientSecret,
+ ClientSecret: "", // SECURITY: We do not expose the client secret
FieldMapping: &fieldMapping,
},
},
}
- } else {
- return nil
}
+ return nil
}
func convertIdentityProviderConfigToStore(identityProviderConfig *v1pb.IdentityProviderConfig) *storepb.IdentityProviderConfig {