Extend ApiCenterMinimalPermissionsPlugin to support delegated and application permissions#1418
Merged
waldekmastykarz merged 6 commits intoOct 17, 2025
Conversation
Collaborator
|
Thanks for the PR, we'll review it asap |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR extends the ApiCenterMinimalPermissionsPlugin to support specific security scheme names when determining minimal permissions for API calls. This enhancement allows for more granular permission checking by supporting both delegated and application permissions through scheme-specific configuration.
Key Changes
- Added optional
schemeNameconfiguration property to specify which security scheme to analyze - Enhanced reporting to include scheme-specific context in permission headers and log messages
- Updated the permission checking logic to pass the scheme name for targeted analysis
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
schemas/v1.3.0/apicenterminimalpermissionsplugin.schema.json |
Added optional schemeName property to plugin configuration schema |
DevProxy.Plugins/Reporting/ApiCenterMinimalPermissionsPluginReport.cs |
Enhanced report output to include scheme name in permission headers when specified |
DevProxy.Plugins/Reporting/ApiCenterMinimalPermissionsPlugin.cs |
Added scheme name configuration, updated logging messages, and modified permission checking to use specified scheme |
Comments suppressed due to low confidence (1)
DevProxy.Plugins/Reporting/ApiCenterMinimalPermissionsPlugin.cs:1
- The nested if-else structure creates code duplication and reduces readability. Consider extracting the message formatting logic into helper methods or using string interpolation with conditional expressions to reduce duplication.
// Licensed to the .NET Foundation under one or more agreements.
waldekmastykarz
approved these changes
Oct 17, 2025
waldekmastykarz
left a comment
Collaborator
There was a problem hiding this comment.
Perfect! Nothing to add
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.
#1392