Add API Key authentication support to CRUD API plugin#1655
Open
garrytrinder wants to merge 3 commits into
Open
Add API Key authentication support to CRUD API plugin#1655garrytrinder wants to merge 3 commits into
garrytrinder wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds API key authentication as an additional security option for the CRUD API plugin, updating both the API definition schema and the plugin runtime to support configuring and validating API keys at the root level and per-action level.
Changes:
- Extend CRUD API auth type to include
apiKey, and introduceapiKeyAuthConfigat both root and action levels. - Implement API key authorization checks (header and optional query-string parameter) and update CORS allow-headers handling.
- Update the API definition loader to hydrate the new API key auth configuration from the API file.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| schemas/v3.0.0/crudapiplugin.apifile.schema.json | Adds apiKey auth option and new apiKeyAuthConfig schema blocks at root and action scopes. |
| DevProxy.Plugins/Mocking/CrudApiPlugin.cs | Adds API key auth type/config, authorization logic, and CORS allow-headers updates. |
| DevProxy.Plugins/Mocking/CrudApiDefinitionLoader.cs | Loads ApiKeyAuthConfig from the API definition file into runtime configuration. |
waldekmastykarz
requested changes
May 12, 2026
…r header and query parameter names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.