Skip to content

docs: Credential architecture internals documentation#3886

Merged
gladjohn merged 2 commits into
masterfrom
gladjohn/credential-architecture-doc
Jul 7, 2026
Merged

docs: Credential architecture internals documentation#3886
gladjohn merged 2 commits into
masterfrom
gladjohn/credential-architecture-doc

Conversation

@gladjohn

Copy link
Copy Markdown
Contributor

Summary

Adds docs/design/credential-architecture.md — an internal architecture doc explaining how credentials are loaded, resolved, and wired to MSAL at runtime.

This is intended for contributors and anyone extending the credential system. The existing credentials-README.md covers the user-facing 'which credential to pick' perspective; this doc covers the internals.

What's covered

  • High-level flow — CredentialsProvider → DefaultCredentialsLoader → ICredentialSourceLoader (Mermaid flowchart)
  • Key interfaces — ICredentialsLoader, ICredentialSourceLoader, ICredentialsProvider, ICustomSignedAssertionProvider with defining vs implementing assemblies
  • All 9 built-in credential source loaders — table mapping CredentialSource enum → loader class → output
  • CredentialDescription lifecycle — Initial → Loaded / Skipped state transitions
  • Token binding (Bearer vs mTLS PoP) — how isTokenBinding flows through, with the real null-safe TryGetValue code
  • Credential wiring to MSAL — full decision tree in WithClientCredentialsAsync()
  • Extension points — how to add new ICredentialSourceLoader or ICustomSignedAssertionProvider
  • Credential fallback chain — ordered array semantics, Skip behavior, ResetCredentials()
  • End-to-end sequence diagrams — FIC+MI Bearer and Certificate mTLS PoP scenarios (Mermaid sequence diagrams)
  • Summary matrix — credential type × token type compatibility

Verification

All content verified against current codebase (commit 57860b3). Reviewed for accuracy against TokenAcquisition.cs, CredentialsProvider.cs, DefaultCredentialsLoader.cs, ConfidentialClientApplicationBuilderExtension.cs, and all loader implementations.

Type of change

  • Documentation only (no code changes)

Adds docs/design/credential-architecture.md covering:
- High-level credential loading flow (CredentialsProvider → DefaultCredentialsLoader → ICredentialSourceLoader)
- Key interfaces and their assemblies
- All built-in credential source loaders
- CredentialDescription lifecycle (Initial → Loaded/Skipped)
- Token binding (Bearer vs mTLS PoP) flow
- Credential wiring to MSAL detail
- Extension points for custom loaders and assertion providers
- Credential fallback chain semantics
- End-to-end sequence diagrams for FIC+MI Bearer and Certificate mTLS PoP scenarios
- Summary matrix of credential type × token type compatibility

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gladjohn
gladjohn requested a review from a team as a code owner June 22, 2026 15:50
@gladjohn
gladjohn merged commit 84c7bd9 into master Jul 7, 2026
4 checks passed
@gladjohn
gladjohn deleted the gladjohn/credential-architecture-doc branch July 7, 2026 14:47
This was referenced Jul 10, 2026
This was referenced Jul 14, 2026
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.

2 participants