Skip to content

Exclude OIDC scopes from ApiCenterMinimalPermissionsPlugin excessive permissions - #1980

Open
waldekmastykarz wants to merge 1 commit into
dotnet:mainfrom
waldekmastykarz:verbose-carnival
Open

waldekmastykarz wants to merge 1 commit into
dotnet:mainfrom
waldekmastykarz:verbose-carnival

Conversation

@waldekmastykarz

Copy link
Copy Markdown
Collaborator

Closes #1964

ApiCenterMinimalPermissionsPlugin reported openid, profile, offline_access and email as excessive permissions, while MinimalPermissionsGuidancePlugin and GraphMinimalPermissionsGuidancePlugin exclude them.

Changes:

  • Add permissionsToExclude to ApiCenterMinimalPermissionsPlugin, with the same defaults as the guidance plugins (profile, openid, offline_access, email), and exclude those scopes when computing excessive permissions
  • List excluded permissions in the report (Markdown and plain text) and log them, same as the guidance plugins
  • Add permissionsToExclude to the v4.0.0 config schema
  • Add tests for the exclusion logic and report rendering (the plugin itself requires a live Azure API Center)

…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
Copilot AI balanced review requested due to automatic review settings October 21, 2026 13:55
@waldekmastykarz
waldekmastykarz requested a review from a team as a code owner October 21, 2026 13:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review found no blocking issues in this focused change; tests were not executed.

No open issues 🎉

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ApiCenterMinimalPermissionsPlugin reports OIDC scopes as excessive

2 participants