Skip to content

[Bug]: API Key name needs 3 or more chars in Gateway - but not validated in CP #3163

Description

@malinthaprasan

Please select the area the issue is related to

AI Workspace, Gateway

Please select the aspect the issue is related to

Aspect/UI (Frontend layouts, components, styling), Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)

Description

Image
gateway-controller-1  | time=2026-08-06T04:55:29.467Z level=INFO source=/build/pkg/policyxds/server.go:228 msg="Policy xDS stream request" stream_id=1 type_url=api-platform.wso2.org/v1.RouteConfig version=3 resource_names=[]
gateway-controller-1  | time=2026-08-06T04:55:29.467Z level=INFO source=/build/pkg/policyxds/snapshot.go:446 msg="[linear cache] open watch 3 (delta: false) for api-platform.wso2.org/v1.RouteConfig all resources"
gateway-controller-1  | time=2026-08-06T04:55:29.467Z level=INFO source=/build/pkg/policyxds/server.go:228 msg="Policy xDS stream request" stream_id=1 type_url=api-platform.wso2.org/v1.PolicyChainConfig version=3 resource_names=[]
gateway-controller-1  | time=2026-08-06T04:55:29.467Z level=INFO source=/build/pkg/policyxds/snapshot.go:446 msg="[linear cache] open watch 3 (delta: false) for api-platform.wso2.org/v1.PolicyChainConfig all resources"
gateway-controller-1  | time=2026-08-06T04:56:16.244Z level=INFO source=/build/pkg/controlplane/client.go:1369 msg="Received WebSocket event" type=apikey.created payload="[REDACTED - contains sensitive API key data]"
gateway-controller-1  | time=2026-08-06T04:56:16.244Z level=INFO source=/build/pkg/controlplane/client.go:2941 msg="API Key Created Event received" correlation_id=d609dbbc-01bf-444d-935c-f80d49e7ebed timestamp=2026-08-06T04:56:16Z
gateway-controller-1  | time=2026-08-06T04:56:16.244Z level=ERROR source=/build/pkg/controlplane/client.go:2982 msg="API key created event has invalid name" correlation_id=d609dbbc-01bf-444d-935c-f80d49e7ebed error="API key name is too short (minimum 3 characters required)"
gateway-runtime-1     | [rtr] [2026-08-06 04:56:57.964][55][info][main] [source/server/drain_manager_impl.cc:226] shutting down parent after drain

Steps to Reproduce

Create an LLM provider and create a key with less than 3 chars.

Severity Level of the Issue

Severity/Major (Important functionality is broken. Should be prioritized. Doesn't need immediate attention)

Environment Details (with versions)

No response

Metadata

Metadata

Labels

Area/AIWorkspaceIssues related to AI WorkspaceAspect/APIAPI definitions, contracts, OpenAPI, interfacesAspect/UIFrontend, visual layouts, components, stylingSeverity/MajorType/Bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions