Skip to content

AB#3788751: L3-WI-2F Implement DPoP outcome handling for Platform Authentication DOM API - #8968

Merged
Hector Morales (hectormmg) merged 12 commits into
devfrom
copilot/ab-3788751-platform-auth-dom-dpop
Nov 20, 2026
Merged

Hector Morales (hectormmg) merged 12 commits into
devfrom
copilot/ab-3788751-platform-auth-dom-dpop

Conversation

@hectormmg

@hectormmg Hector Morales (hectormmg) commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Implements AB#3788751 - L3-WI-2F Implement DPoP outcome handling for Platform Authentication DOM API.

Enable DOM transport support for the broker DPoP handling introduced in #8789, including the resource-nonce support from #8981.

  • Use normal DOM transport discovery and the existing shared L1/L3 validation and key/cache lifecycle. The shared interaction-client implementation is unchanged from dev.
  • Pass properties.token_type, properties.DPoP, and properties.binding_attested unchanged to shared processing, rather than creating top-level aliases or parsing attestation in the DOM handler.
  • L3 returns the broker proof unchanged, without local signing or access-token/proof caching. L1 retains MSAL-owned keys and local resource-proof generation.
  • Preserve existing DOM error mapping, broker descriptions, exceptions, Bearer/legacy-PoP behavior, and resource-nonce forwarding. Never serialize internal bindingPreferenceSent state.

Validation

  • 336 focused tests passed across the DOM handler, provider, extension handler, silent-request helpers, and shared interaction client.
  • Built msal-common before msal-browser; browser build passed.
  • Lint passed with three existing warnings. Formatting, API Extractor (--local), Beachball, documentation links, and git diff --check passed.
  • Coverage includes extension/DOM L1/L3 equivalence, popup/silent/redirect flows, malformed canonical outcomes, key ownership, cache replacement, disabled access-token caching, and consistent error/exception handling across schemes.

Managed-device validation

VM-validated the DOM L3 DPoP flow using the rebuilt sample from 86cfcfb25, including the review cleanups. Seven scenarios passed: L3 acquisition, redirect, repeated broker requests without MSAL access-token caching, concurrent distinct proofs, Graph nonce challenge/retry (HTTP 200), wrong-method rejection (HTTP 401), and app-provided key rejection.

The subsequent 89528a60e change only restores the existing opt-in serialization-error diagnostic and its unit-test assertion; local validation passed. The external sample is not part of this PR.

<!-- BEGIN pr-telemetry -->
assistance: agentic-cli
type: feature
agent-tool: copilot-cli
agent-model: gpt-6.1-sol
work-item: AB#3788751
<!-- END pr-telemetry -->

Implements AB#3788751. Preserve canonical broker properties and Edge request fields while sharing fail-closed L1/L3 validation and existing key/cache lifecycle.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619
@hectormmg
Hector Morales (hectormmg) requested a review from a team as a code owner November 5, 2026 00:26
@hectormmg Hector Morales (hectormmg) added feature Feature requests. agentic-cli Copilot CLI / terminal agent drove the bulk of the edits labels Nov 5, 2026
Copilot AI balanced review requested due to automatic review settings November 5, 2026 00:26
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619

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.

🟡 Changes recommended

A critical guard bypass allows top-level DPoP indicators to be dropped when properties are empty, letting DPoP tokens be accepted and returned or cached under a requested non-DPoP scheme.

1 open issue
What changed in this PR

Extends broker DPoP outcome handling to the Edge Platform Authentication DOM API, building on #8789 while preserving shared validation, proof handling, and cache behavior.

Changes:

  • Enables DOM DPoP routing after discovery advertises the required contract.
  • Shares L1/L3 outcome validation and adds DOM response checks and error sanitization.
  • Adds transport-equivalence tests and updates preview documentation and release metadata.
File Description
lib/​msal-browser/​test/​request/​SilentRequestHelpers.spec.ts Tests capability-gated silent request preparation.
lib/​msal-browser/​test/​interaction_client/​PlatformAuthInteractionClient.spec.ts Tests transport equivalence, proofs, caching, and redirect key ownership.
lib/​msal-browser/​test/​broker/​PlatformAuthProvider.spec.ts Tests DOM DPoP routing after contract discovery.
lib/​msal-browser/​test/​broker/​PlatformAuthDOMHandler.spec.ts Tests request mapping, response validation, and sanitized errors.
lib/​msal-browser/​src/​interaction_client/​PlatformAuthInteractionClient.ts Delegates outcome validation to the shared helper.
lib/​msal-browser/​src/​broker/​nativeBroker/​PlatformAuthResponse.ts Aligns DOM properties with the canonical broker contract.
lib/​msal-browser/​src/​broker/​nativeBroker/​PlatformAuthProvider.ts Allows DPoP routing through a capability-enabled DOM provider.
lib/​msal-browser/​src/​broker/​nativeBroker/​PlatformAuthDpop.ts Extracts shared L1/L3 validation and outcome telemetry.
lib/​msal-browser/​src/​broker/​nativeBroker/​PlatformAuthDOMHandler.ts Implements DOM DPoP transport handling and validation.
lib/​msal-browser/​docs/​device-bound-tokens.md Documents DOM preview requirements and broker outcome behavior.
change/​@azure-msal-browser-platform-dom-dpop-outcomes.json Records the feature as a minor release change.

Review effort: Balanced

Retain the merged resource nonce guidance and align the DOM preparation test with broker DPoP deduplication semantics.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619
Cover PCA nonce propagation through both transports for L1 local resource proofs and unchanged L3 broker proofs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619
Describe extension and DOM transport availability consistently and omit internal wire mappings and cache/key lifecycle details.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619
Fail closed for Bearer and legacy PoP responses with top-level DPoP indicators, including empty or absent canonical properties. Cover direct-handler rejection and account/cache/key mutation boundaries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619
Remove unused DOM outcome aliases and redundant attestation parsing, require request-aware DOM validation, and reuse the shared token-type classifier. Retain validation at both the direct DOM and shared interaction boundaries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619
Remove DOM-specific error-code exceptions and the artificial DPoP capability latch. Retain normal DOM transport discovery, known native error sanitization and status mappings, and shared fail-closed outcome validation. Exercise malformed outcomes through directly constructed handlers and align routing/preparation regressions with normal provider availability.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619
Keep DOM wire checks in the transport and validate L1/L3 once in the existing interaction client. Remove redundant request/discovery checks and the unnecessary validator extraction; retain shared token classification and pre-mutation regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619
Reuse native error codes, statuses, and HRESULT parsing. Retain omission of free-form DPoP error metadata and raw numeric error-code telemetry, with regression coverage for fallback and status mapping.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619
Restore existing native error details and exception handling for every scheme. Remove the DOM-only response schema, synthetic alias rules, and DPoP-specific extra-parameter stripping. Restore the shared interaction client and request module unchanged from dev, retaining only transport enablement, wire mapping, and internal-state filtering.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619

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.

🔵 Needs a closer look

The private-preview DOM DPoP browser/WAM integration requires human runtime confirmation because latest-build managed-device and feature-disabled L1 validation remain pending, and the account-less ssoSilent timeout is unexplained.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d23898df-9767-4bfd-85c8-8b156caa2619
@hectormmg

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).

@hectormmg
Hector Morales (hectormmg) merged commit 38cad58 into dev Nov 20, 2026
84 checks passed
@hectormmg
Hector Morales (hectormmg) deleted the copilot/ab-3788751-platform-auth-dom-dpop branch November 20, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentic-cli Copilot CLI / terminal agent drove the bulk of the edits feature Feature requests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants