You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add API Key authentication support to CRUD API Plugin #1650
Add support for API Key authentication to the CRUD API Plugin. Currently, the only supported authentication method is Microsoft Entra ID (see Entra auth how-to and CrudApiPlugin reference). Many APIs use API Key authentication, and Dev Proxy should support simulating this scenario as well.
Spec
Following the existing pattern used for Entra auth, we should add a new apiKey auth mode and a corresponding apiKeyAuthConfig section. This update will support passing keys via a header, or a request query-string.
The HTTP header name to read the API key from. Defaults to x-api-key.
apiKeyAuthConfig.apiKey
string
Yes
The valid API key.
apiKeyAuthConfig.queryParameterName
string
No
The name of the query-string parameter to read the API key from.
Behavior
When auth is set to "apiKey", the plugin checks the configured header or query parameter for the valid API key on every request.
If both the header and the query parameter are configured, the plugin checks both locations for the API key. If either carries the valid key, the request is authorized.
If neither the header nor query param is present or valid, return 401 Unauthorized.
If the key is valid, the request proceeds normally.
Activity
waldekmastykarz commentedon May 11, 2026
Let's align it with the API plugin so that both configs are consistent and easily reusable, and support API key in both query and headers.
garrytrinder commentedon May 11, 2026
Good catch, updated the spec to include query string support.