Skip to content

Policy-based authorization article overhaul#37231

Open
guardrex wants to merge 12 commits into
mainfrom
guardrex/policy-based-authz
Open

Policy-based authorization article overhaul#37231
guardrex wants to merge 12 commits into
mainfrom
guardrex/policy-based-authz

Conversation

@guardrex

@guardrex guardrex commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes #35817

Tom ... I worked quite long time on this one, longer than usual. The current article (live link) seems like it has a lot of problems to address.

Notes

  • I'll ping Wade when he gets back to look everything over for a possible patch PR later. Unless you think we need it, I don't plan on requesting an engineering review.
  • Per Dan's request, I'm moving the RP and MVC content to their own articles under their nodes. The main doc set article uses Blazor examples.
  • The Blazor code cross-links pull from the new Blazor authz sample app in the main samples repo, which I'm using to cover all of the scenarios in the security > authorization node (Dan's original master issue). I didn't do much with the old samples. I stripped namespaces in some of the code. Those old samples still provide sample code in the main doc set article, which is focused on Blazor, and the non-Blazor namespaces in those old samples confuse the presentation.
  • I took a heavy hand with section ordering, section naming, and content phrasing throughout the article. I'm 👂 for your bug fixes and suggestions.
  • I 💀 the INCLUDES content approach. No broken links in prior version content now. 🎉

Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
aspnetcore/migration/22-to-30.md aspnetcore/migration/22-to-30
aspnetcore/migration/70-to-80.md aspnetcore/migration/70-to-80
aspnetcore/mvc/security/authorization/policies.md aspnetcore/mvc/security/authorization/policies
aspnetcore/mvc/security/authorization/resource-based.md aspnetcore/mvc/security/authorization/resource-based
aspnetcore/razor-pages/security/authorization/policies.md aspnetcore/razor-pages/security/authorization/policies
aspnetcore/razor-pages/security/authorization/resource-based.md aspnetcore/razor-pages/security/authorization/resource-based
aspnetcore/release-notes/aspnetcore-5.0.md aspnetcore/release-notes/aspnetcore-5.0
aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata
aspnetcore/security/authorization/customizingauthorizationmiddlewareresponse.md aspnetcore/security/authorization/customizingauthorizationmiddlewareresponse
aspnetcore/security/authorization/dependencyinjection.md aspnetcore/security/authorization/dependencyinjection
aspnetcore/security/authorization/iauthorizationpolicyprovider.md aspnetcore/security/authorization/iauthorizationpolicyprovider
aspnetcore/security/authorization/policies.md aspnetcore/security/authorization/policies
aspnetcore/security/authorization/resource-based.md aspnetcore/security/authorization/resource-based
aspnetcore/security/how-to-choose-identity-solution.md aspnetcore/security/how-to-choose-identity-solution
aspnetcore/toc.yml aspnetcore/toc

@guardrex guardrex self-assigned this Jun 5, 2026
@guardrex guardrex marked this pull request as ready for review July 10, 2026 14:41
@guardrex guardrex requested a review from Copilot July 10, 2026 15:02

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

This PR modernizes and restructures the policy-based authorization documentation by shifting MVC and Razor Pages–specific guidance into their own new articles and refocusing the main article on Blazor-oriented examples, while also updating related cross-references and Entra ID links across the docs set.

Changes:

  • Overhauls security/authorization/policies.md to use Razor component examples and updated samples (including a new external-service sample section).
  • Adds new companion articles for MVC and Razor Pages policy-based authorization and wires them into aspnetcore/toc.yml.
  • Updates multiple related docs to point to the new anchors/pages and refreshes Microsoft Entra ID links + ms.date metadata.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
aspnetcore/toc.yml Adds TOC entries for the new MVC and Razor Pages policy-based authorization articles.
aspnetcore/security/how-to-choose-identity-solution.md Updates Entra link + ms.date metadata.
aspnetcore/security/authorization/resource-based.md Updates xref fragments and sample namespace/path text to match the new policies doc structure.
aspnetcore/security/authorization/policies/samples/stubs/copy_of_IAuthorizationService.cs Removes copied framework source stub previously used for an include snippet.
aspnetcore/security/authorization/policies/includes/policies5.md Removes pre-6.0 include content that was previously injected into the policies article.
aspnetcore/security/authorization/policies.md Major rewrite: policy concepts + Blazor-focused examples + new external-service sample walkthrough.
aspnetcore/security/authorization/iauthorizationpolicyprovider.md Updates xref fragments + ms.date.
aspnetcore/security/authorization/dependencyinjection.md Updates xref fragments + ms.date.
aspnetcore/security/authorization/customizingauthorizationmiddlewareresponse.md Updates ms.date.
aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md Replaces hard-coded user values with placeholders in decoded JWT example.
aspnetcore/release-notes/aspnetcore-5.0.md Updates Entra link + ms.date.
aspnetcore/razor-pages/security/authorization/resource-based.md Updates xref fragment to new policies doc anchor.
aspnetcore/razor-pages/security/authorization/policies.md New Razor Pages–specific policy-based authorization article.
aspnetcore/mvc/security/authorization/resource-based.md Updates xref fragment to new policies doc anchor.
aspnetcore/mvc/security/authorization/policies.md New MVC-specific policy-based authorization article (including MVC handler Resource guidance).
aspnetcore/migration/70-to-80.md Updates xref to point to the new MVC policies article section.
aspnetcore/migration/22-to-30.md Updates xrefs to the new policies anchor/article for handler resource guidance.

Comment thread aspnetcore/security/authorization/policies.md
Comment thread aspnetcore/security/authorization/policies.md Outdated
Comment thread aspnetcore/security/authorization/policies.md Outdated
Comment thread aspnetcore/security/authorization/policies.md Outdated
Comment thread aspnetcore/security/authorization/policies.md Outdated
Comment thread aspnetcore/security/authorization/policies.md
Comment thread aspnetcore/security/how-to-choose-identity-solution.md Outdated
Comment thread aspnetcore/security/authorization/policies.md Outdated
guardrex and others added 3 commits July 10, 2026 11:33
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@guardrex guardrex requested a review from tdykstra July 10, 2026 15:40
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.

Policy-based auth: Refactor for Blazor

2 participants