Skip to content

[Bug]: API Key sample curl show wrong header and missing value prefix #2714

Description

@Tharanidk

Please select the area the issue is related to

AI Workspace

Please select the aspect the issue is related to

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

Description

The sample cURL shown in the "API Key Generated Successfully" dialog (Try it out) has following issues.

  1. Missing Bearer prefix. When a Bearer value is configured in the Security tab, the sample cURL shows only the raw <API_Key> without the Bearer prefix. The generated command is therefore incorrect and copying it as-is produces a request that fails authentication.

  2. Wrong header name for API Key Auth. When security is applied through the API Key Auth guardrail, the sample cURL uses the header X-API-Key, but it should be API-Key. The header name in the sample doesn't match what the guardrail actually expects.

Image

Steps to Reproduce

Issue 1 — missing Bearer prefix:

  1. Open an LLM provider and go to the Security tab.
  2. Configure API key security with a Value prefix.
  3. Trigger Try it out and generate an API key.
  4. In the "API Key Generated Successfully" dialog,
  • Observed: header value is just <API_Key>.
  • Expected: header value is Bearer <API_Key>.

Issue 2 — wrong header name:

  1. Apply security via the API Key Auth guardrail.
  2. Trigger Try it out and generate an API key.
  3. In the dialog, inspect the sample cURL header name.
  • Observed: X-API-Key: <API_Key>.
  • Expected: API-Key: <API_Key>.

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

Assignees

Labels

Area/AIWorkspaceIssues related to AI WorkspaceArea/ManagementAny issues related to Management API or Management Portal UIAspect/APIAPI definitions, contracts, OpenAPI, interfacesAspect/UIFrontend, visual layouts, components, stylingSeverity/MajorType/Bug

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions