Design: Add Authority Refactoring design documentation with registry + pipeline architecture#5788
Draft
Design: Add Authority Refactoring design documentation with registry + pipeline architecture#5788
Conversation
Co-authored-by: gladjohn <90415114+gladjohn@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add design documentation for authority refactoring initiative
Add design documentation for authority refactoring initiative
Feb 26, 2026
Closed
1 task
christothes
reviewed
Mar 2, 2026
| private readonly IInstanceDiscoveryManager _discoveryManager; | ||
| private readonly RequestContext _requestContext; | ||
|
|
||
| public async Task<Authority> CreateAsync( |
Co-authored-by: gladjohn <90415114+gladjohn@users.noreply.github.com>
Copilot
AI
changed the title
Add design documentation for authority refactoring initiative
Address review feedback: make AuthorityCreationPipeline static
Mar 6, 2026
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.
Authority Refactoring Design Documents
Adds comprehensive design documentation for the planned authority refactoring initiative in MSAL.NET, establishing team alignment before implementation begins.
Overview
This PR introduces two companion design documents that specify a Registry + Pipeline architecture for authority creation and validation:
Key Design Principles
AuthorityRegistrycentralizes all authority type metadata (detection, creation, validation, resolution)AuthorityCreationPipelineArchitecture Highlights
Current (Fragile)
AuthorityInfo.DetectAuthorityType()Authority.CreateAuthority()switch statementProposed (Centralized)
AuthorityRegistrationrecords define all metadata for each typeAuthorityRegistryprovides detection and lookup via registration orderAuthorityCreationPipelineorchestrates 6 deterministic steps:Extensibility
Adding a hypothetical
FabrikamAuthorityrequires:FabrikamAuthorityRegistration.cs(one file)AuthorityRegistrystatic constructorNo changes needed in
AuthorityInfo,Authority,AuthorityManager, or pipeline logic.Test Strategy
Six categories of characterization tests (before any production code changes):
consumerstenantPhased Rollout Plan
main)AuthorityManagerBackwards Compatibility
WithAuthority()methods unchangedFiles Changed
docs/design/AUTHORITY_REFACTORING_DESIGN.md(685 lines) — Complete design spec with test examplesdocs/design/AUTHORITY_REFACTORING_ARCHITECTURE.md(471 lines) — Diagrams, data flow, dependency graphsScope
Documentation only — no executable code changes. This PR serves as the design specification for the implementation PR that will follow after team review and approval.
Success Criteria
mainInstance/namespace