Skip to content

Handle missing scope and app permission configuration - #4010

Merged
Iarek Kovtunenko (iarekk) merged 1 commit into
masterfrom
iinglese/authorization-config-validation-minimal
Sep 14, 2026
Merged

Iarek Kovtunenko (iarekk) merged 1 commit into
masterfrom
iinglese/authorization-config-validation-minimal

Conversation

@iNinja

Copy link
Copy Markdown
Contributor

Summary

  • Treat an explicitly configured missing scope or app-permission key as an empty requirement.
  • Preserve existing requirement precedence and scope-or-app-permission composition.

Release notes

Authorization now fails when an explicitly configured scope or app-permission key
is missing instead of treating the requirement as undeclared.

Testing

  • 28 focused tests passed on each of .NET 8, .NET 9, and .NET 10.

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.

Pull request overview

Updates authorization handlers to fail closed when configured scope or app-permission keys are missing.

Changes:

  • Treat missing configuration values as empty requirements.
  • Preserve requirement precedence and scope-or-permission OR semantics.
  • Add focused coverage for missing configuration scenarios.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
ScopeAuthorizationHandler.cs Handles missing scope values as empty.
ScopeOrAppPermissionAuthorizationHandler.cs Handles missing scope and permission values as empty.
RequiredScopePolicyTests.cs Tests requirement and endpoint missing-scope behavior.
RequiredScopeOrAppPermissionPolicyTests.cs Tests failure and OR-composition behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bgavrilMS
Bogdan Gavril (bgavrilMS) force-pushed the iinglese/authorization-config-validation-minimal branch from e4e96c2 to 029aa41 Compare September 14, 2026 11:45
@iarekk
Iarek Kovtunenko (iarekk) force-pushed the iinglese/authorization-config-validation-minimal branch from 029aa41 to 4b77cfd Compare September 14, 2026 14:52
@iarekk
Iarek Kovtunenko (iarekk) force-pushed the iinglese/authorization-config-validation-minimal branch 2 times, most recently from 2fe530e to 74cfd39 Compare September 14, 2026 15:23
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@iarekk
Iarek Kovtunenko (iarekk) force-pushed the iinglese/authorization-config-validation-minimal branch from 74cfd39 to 2cf555e Compare September 14, 2026 15:40
@iarekk
Iarek Kovtunenko (iarekk) merged commit cf93a71 into master Sep 14, 2026
9 checks passed
@iarekk
Iarek Kovtunenko (iarekk) deleted the iinglese/authorization-config-validation-minimal branch September 14, 2026 15:59
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.

5 participants