Repository navigation
Exclude OIDC scopes from ApiCenterMinimalPermissionsPlugin excessive permissions - #1980
Open
waldekmastykarz wants to merge 1 commit into
Open
waldekmastykarz wants to merge 1 commit into
waldekmastykarz wants to merge 1 commit into
Conversation
…permissions ApiCenterMinimalPermissionsPlugin reported openid, profile, offline_access and email as excessive permissions, while the *MinimalPermissionsGuidance plugins exclude them. Add the same permissionsToExclude setting (with the same defaults) to ApiCenterMinimalPermissionsPlugin, list excluded permissions in its report, and update the config schema. Closes dotnet#1964 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c925a02d-52bc-43fe-b416-00336c443309
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes implement consistent scope exclusions with supporting tests and no identified blocking issues.
No open issues 🎉
What changed in this PR
Aligns ApiCenterMinimalPermissionsPlugin with the guidance plugins by excluding OIDC scopes from excessive-permission results, addressing #1964.
Changes:
- Adds configurable exclusions with the same OIDC defaults as the guidance plugins.
- Includes excluded permissions in reports and logs.
- Adds schema support and backend-independent tests.
| File | Description |
|---|---|
| schemas/v4.0.0/apicenterminimalpermissionsplugin.schema.json | Defines the exclusions setting and defaults. |
| DevProxy.Plugins/Reporting/ApiCenterMinimalPermissionsPluginReport.cs | Lists exclusions in Markdown and plain-text reports. |
| DevProxy.Plugins/Reporting/ApiCenterMinimalPermissionsPlugin.cs | Initializes, applies, and logs exclusions. |
| DevProxy.Integration.Tests/ReportingPluginsIntegrationTests.cs | Tests exclusion logic and report rendering. |
Review effort: Balanced
This branch has not been deployed
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.
Closes #1964
ApiCenterMinimalPermissionsPluginreportedopenid,profile,offline_accessandemailas excessive permissions, whileMinimalPermissionsGuidancePluginandGraphMinimalPermissionsGuidancePluginexclude them.Changes:
permissionsToExcludetoApiCenterMinimalPermissionsPlugin, with the same defaults as the guidance plugins (profile,openid,offline_access,email), and exclude those scopes when computing excessive permissionspermissionsToExcludeto the v4.0.0 config schema