Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
87ef692
feat: add WAM DPoP broker contract fields
hectormmg Aug 17, 2026
e50f088
feat: support DPoP in DOM broker path
hectormmg Aug 20, 2026
264bee6
fix: surface broker DPoP proof
hectormmg Aug 24, 2026
8416e99
feat: add WAM DPoP broker contract fields
hectormmg Aug 17, 2026
2764a1b
feat: support DPoP in DOM broker path
hectormmg Aug 20, 2026
7488f09
fix: surface broker DPoP proof
hectormmg Aug 24, 2026
20e4b35
chore: add broker DPoP changefile
hectormmg Aug 24, 2026
939daaf
Merge WI-1 into WI-2
hectormmg Aug 24, 2026
05f56ee
feat(msal-browser): support brokered DPoP outcomes
hectormmg Aug 25, 2026
a9e5140
Merge branch 'dev' of https://github.com/AzureAD/microsoft-authentica…
hectormmg Aug 25, 2026
d6a5410
feat: add WAM DPoP broker contract fields
hectormmg Aug 17, 2026
364af35
feat: support DPoP in DOM broker path
hectormmg Aug 20, 2026
25ef782
fix: surface broker DPoP proof
hectormmg Aug 24, 2026
99f5786
chore: add broker DPoP changefile
hectormmg Aug 24, 2026
c286dd3
fix: harden broker DPoP outcome handling
hectormmg Aug 25, 2026
3a99059
Merge updated WI-1 DPoP broker contracts
hectormmg Aug 25, 2026
651c5b9
chore: format merged broker DPoP tests
hectormmg Aug 25, 2026
1051c35
fix: finish broker DPoP validation fixes
hectormmg Aug 26, 2026
5f5281e
fix: address test failures (Forge review-fix)
hectormmg Aug 26, 2026
8897fd2
fix: address review findings (Forge review-fix)
hectormmg Aug 26, 2026
e67cadb
fix: address review findings (Forge review-fix)
hectormmg Aug 26, 2026
08f25fd
chore: restore DPoP changefile ownership metadata
hectormmg Aug 26, 2026
3bd5271
fix: address review findings (Forge review-fix)
hectormmg Aug 26, 2026
4f3e853
fix: address test failures (Forge review-fix)
hectormmg Aug 26, 2026
6f2dcf7
fix: address review findings (Forge review-fix)
hectormmg Aug 26, 2026
e3f8637
fix: finalize DPoP review corrections
hectormmg Aug 26, 2026
b0ee3c5
fix: address review findings (Forge review-fix)
hectormmg Aug 26, 2026
82a58e8
fix: address review findings (Forge review-fix)
hectormmg Aug 26, 2026
b10669e
fix: address review findings (Forge review-fix)
hectormmg Aug 26, 2026
9bb8291
chore: restore platform broker DPoP changefile PR
hectormmg Aug 27, 2026
e3301bc
revert: remove review-driven DPoP scope expansion
hectormmg Aug 28, 2026
1e7255d
fix(msal-browser): enforce MSAL-owned DPoP keys
hectormmg Sep 1, 2026
8802707
fix: map DOM request confirmation
hectormmg Sep 2, 2026
c9abd7d
feat: add WAM DPoP broker contract fields
hectormmg Aug 17, 2026
7b5ff4a
feat: support DPoP in DOM broker path
hectormmg Aug 20, 2026
83797f1
fix: surface broker DPoP proof
hectormmg Aug 24, 2026
0644bea
chore: add broker DPoP changefile
hectormmg Aug 24, 2026
c981fdf
fix: map DOM request confirmation
hectormmg Sep 2, 2026
0ed82fc
Merge branch 'copilot/ab-3715427-wam-dpop-contract-types' of https://…
hectormmg Sep 2, 2026
b12464f
merge: update WI-2 from refreshed WI-1
hectormmg Sep 2, 2026
293aa92
refactor(msal-browser): identify token binding schemes declaratively
hectormmg Sep 2, 2026
0cd6982
merge: inherit declarative token binding helper from WI-1
hectormmg Sep 2, 2026
509f5c6
fix(msal-browser): correct broker DPoP reqCnf
hectormmg Sep 2, 2026
6c540a8
fix: address review findings (Forge review-fix)
hectormmg Sep 2, 2026
26d50ae
fix: address review findings (Forge review-fix)
hectormmg Sep 2, 2026
fcdd77d
fix: address review findings (Forge review-fix)
hectormmg Sep 3, 2026
14550f8
Merge dev broker contract into WI-2
hectormmg Sep 16, 2026
41b7eca
Merge branch 'dev' of https://github.com/AzureAD/microsoft-authentica…
hectormmg Sep 17, 2026
bfbab14
fix: harden DPoP broker key lifecycle
hectormmg Oct 2, 2026
ba45830
Merge origin/dev into DPoP broker branch
hectormmg Oct 5, 2026
55b9c85
chore: reduce DPoP review churn
hectormmg Oct 5, 2026
4ace81d
refactor: simplify broker DPoP cleanup
hectormmg Oct 5, 2026
d34dbe6
Harden broker DPoP outcome handling
hectormmg Oct 6, 2026
2ba4b54
Document DPoP cache replacement failure semantics
hectormmg Oct 6, 2026
c6a237f
Ignore caller DPoP keys on direct broker requests
hectormmg Oct 7, 2026
6fc4dc9
Merge origin/dev into DPoP broker outcome branch
hectormmg Oct 7, 2026
43332eb
Fix broker DPoP request and key lifecycle
hectormmg Oct 12, 2026
8dbb168
Defer platform DOM DPoP outcome handling
hectormmg Oct 13, 2026
c93ef02
Document DPoP production readiness
hectormmg Oct 14, 2026
18e4265
Merge branch 'dev' of https://github.com/AzureAD/microsoft-authentica…
hectormmg Oct 14, 2026
3e6f3cf
Merge branch 'dev' of https://github.com/AzureAD/microsoft-authentica…
hectormmg Oct 14, 2026
00374b5
Use public DPoP binding terminology
hectormmg Oct 14, 2026
e323515
Clarify public DPoP binding terminology
hectormmg Oct 14, 2026
46a6b61
Focus broker DPoP docs on app behavior
hectormmg Oct 14, 2026
945922c
Classify unsupported DOM DPoP requests
hectormmg Oct 14, 2026
550d7c2
Remove obsolete DPoP proof alias
hectormmg Oct 15, 2026
396ca1a
Merge branch 'dev' of https://github.com/AzureAD/microsoft-authentica…
hectormmg Oct 15, 2026
53d45ce
Align extension proof test with L3 outcome
hectormmg Oct 15, 2026
181d9ce
Persist redirect broker error telemetry
hectormmg Oct 15, 2026
5e61a56
Add bounded broker DPoP outcome telemetry
hectormmg Oct 15, 2026
255d12d
Test emitted broker DPoP telemetry
hectormmg Oct 15, 2026
3516324
Clarify redirect broker error handling
hectormmg Oct 18, 2026
71d9d62
Keep temporary DPoP errors internal
hectormmg Oct 18, 2026
334780f
Merge branch 'dev' of https://github.com/AzureAD/microsoft-authentica…
hectormmg Oct 18, 2026
389dacd
Remove internal DPoP nonce parameter bridge
hectormmg Oct 19, 2026
350c1f8
Clear sign-out state when native cleanup fails
hectormmg Oct 19, 2026
2756817
Scope redirect key persistence to DPoP
hectormmg Oct 19, 2026
f67042b
Document broker DPoP helper types
hectormmg Oct 19, 2026
c15fb2d
Document DPoP redirect key persistence
hectormmg Oct 19, 2026
5fa08ee
Handle broker responses without telemetry properties
hectormmg Oct 19, 2026
1af785c
Clarify DPoP redirect storage requirements
hectormmg Oct 19, 2026
76457c8
Add broker DPoP lifecycle telemetry
hectormmg Oct 19, 2026
3847f0b
Qualify IndexedDB fallback documentation
hectormmg Oct 19, 2026
eeeb243
Clarify broker DPoP redirect navigation
hectormmg Oct 19, 2026
8258a7d
Organize platform broker DPoP guidance
hectormmg Oct 19, 2026
864d60f
Clarify broker DPoP preview availability
hectormmg Oct 19, 2026
7c3d69f
Remove redundant broker DPoP changes
hectormmg Oct 19, 2026
0682ffe
Preserve synchronous popup logout
hectormmg Oct 19, 2026
d5878ec
Restore scoped platform broker request handling
hectormmg Oct 20, 2026
cb3a631
Avoid duplicate native account cleanup
hectormmg Oct 20, 2026
43f004c
Clarify platform broker DPoP helpers
hectormmg Oct 20, 2026
886c26f
Restore original platform SKU documentation
hectormmg Oct 20, 2026
fd5f515
Clarify DPoP key cleanup behavior
hectormmg Oct 20, 2026
2dd8b9d
Clarify broker result token type selection
hectormmg Oct 20, 2026
8812ef4
Align broker DPoP response properties
hectormmg Oct 20, 2026
9b932ba
Decompose broker DPoP outcome validation
hectormmg Oct 20, 2026
a49fb88
Avoid mutating broker DPoP responses
hectormmg Oct 20, 2026
b9f4d16
Enforce string DPoP attestation values
hectormmg Oct 20, 2026
8f80ec5
Clarify broker DPoP outcome dispatch
hectormmg Oct 20, 2026
6958324
Merge branch 'dev' of https://github.com/AzureAD/microsoft-authentica…
hectormmg Oct 20, 2026
5b299d0
Preserve token binding manager for EAR
hectormmg Oct 20, 2026
1c587ac
Move broker DPoP response types
hectormmg Oct 22, 2026
5c0e2d7
Merge remote-tracking branch 'origin/dev' into copilot/ab-3715428-wam…
hectormmg Oct 22, 2026
97284ab
Fix broker DPoP ownership and concurrency
hectormmg Oct 28, 2026
d5b3c83
Merge origin/dev into WI-2 DPoP branch
hectormmg Oct 28, 2026
0658f27
Refactor broker cache binding parameters
hectormmg Oct 29, 2026
4be324b
Merge branch 'dev' into copilot/ab-3715428-wam-dpop-outcome-handling
hectormmg Oct 29, 2026
85588b3
Merge branch 'dev' into copilot/ab-3715428-wam-dpop-outcome-handling
hectormmg Oct 30, 2026
b14d729
Merge branch 'dev' into copilot/ab-3715428-wam-dpop-outcome-handling
hectormmg Oct 30, 2026
461c396
Merge branch 'dev' into copilot/ab-3715428-wam-dpop-outcome-handling
hectormmg Nov 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions change/@azure-msal-browser-platform-broker-dpop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Add platform broker DPoP request and response contract support [#8772](https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/8772)",
Comment thread
Copilot marked this conversation as resolved.
Resolved
"packageName": "@azure/msal-browser",
"email": "hectormmg@microsoft.com",
"dependentChangeType": "minor"
}
7 changes: 7 additions & 0 deletions change/@azure-msal-browser-wam-dpop-outcomes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Implement WAM DPoP routing outcomes and proof cache policy [#3715428](https://identitydivision.visualstudio.com/Engineering/_workitems/edit/3715428)",
Comment thread
Copilot marked this conversation as resolved.
Resolved
"packageName": "@azure/msal-browser",
"email": "hectormmg@microsoft.com",
"dependentChangeType": "minor"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import {
AuthErrorCodes,
IPerformanceClient,
StringDict,
Constants,
} from "@azure/msal-common/browser";
import {
DOMExtraParameters,
PlatformAuthRequest,
PlatformAuthRequestExtraParametersNoCache,
PlatformDOMTokenRequest,
} from "./PlatformAuthRequest.js";
import { PlatformAuthConstants } from "../../utils/BrowserConstants.js";
Expand Down Expand Up @@ -143,13 +145,28 @@ export class PlatformAuthDOMHandler implements IPlatformAuthHandler {
correlationId,
state,
extraParameters,
preferBinding,
resourceRequestMethod,
resourceRequestUri,
extraParametersNoCache,
...remainingProperties
} = request;

const validExtraParameters: DOMExtraParameters = this.getDOMExtraParams(
remainingProperties,
correlationId
);
const isProofOfPossessionRequest =
request.tokenType === Constants.AuthenticationScheme.POP ||
request.tokenType === Constants.AuthenticationScheme.DPOP ||
request.tokenType === "dpop_proof";

const validExtraParametersNoCache = this.getDOMExtraParamsNoCache(
isProofOfPossessionRequest,
resourceRequestMethod,
resourceRequestUri,
extraParametersNoCache
);

const platformDOMRequest: PlatformDOMTokenRequest = {
accountId: accountId,
Expand All @@ -165,6 +182,8 @@ export class PlatformAuthDOMHandler implements IPlatformAuthHandler {
redirectUri: redirectUri,
scope: scope,
state: state,
preferBinding: preferBinding,
extraParametersNoCache: validExtraParametersNoCache,
};

return platformDOMRequest;
Expand Down Expand Up @@ -242,11 +261,36 @@ export class PlatformAuthDOMHandler implements IPlatformAuthHandler {
properties: response.properties || {},
extendedLifetimeToken: response.extendedLifetimeToken ?? false,
shr: response.proofOfPossessionPayload,
token_type: response.tokenType,
dpop_proof: response.dpopProof,
token_binding_key_id: response.tokenBindingKeyId,
attested_chosen: response.attestedChosen,
};

return nativeResponse;
}

private getDOMExtraParamsNoCache(
isProofOfPossessionRequest: boolean,
resourceRequestMethod?: string,
resourceRequestUri?: string,
extraParametersNoCache?: PlatformAuthRequestExtraParametersNoCache
): PlatformAuthRequestExtraParametersNoCache | undefined {
if (!isProofOfPossessionRequest) {
return undefined;
}

return {
...extraParametersNoCache,
...(resourceRequestMethod && {
pop_method: resourceRequestMethod,
}),
...(resourceRequestUri && {
pop_uri: resourceRequestUri,
}),
};
}

private getDOMExtraParams(
extraParameters: Record<string, unknown>,
correlationId: string
Expand All @@ -269,10 +313,6 @@ export class PlatformAuthDOMHandler implements IPlatformAuthHandler {
`'${this.platformAuthType}' - Error stringifying extra parameters`,
correlationId
);
this.logger.errorPii(
`'${this.platformAuthType}' - Error stringifying extra parameters: '${e}'`,
correlationId
);
return {};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
AuthErrorCodes,
InProgressPerformanceEvent,
IPerformanceClient,
Constants,
} from "@azure/msal-common/browser";
import * as BrowserPerformanceEvents from "../../telemetry/BrowserPerformanceEvents.js";
import {
Expand Down Expand Up @@ -88,7 +89,7 @@ export class PlatformAuthExtensionHandler implements IPlatformAuthHandler {
// fall back to native calls
const messageBody: NativeExtensionRequestBody = {
method: NativeExtensionMethod.GetToken,
request: request,
request: this.initializeNativeExtensionRequest(request),
};

const req: NativeExtensionRequest = {
Expand All @@ -102,14 +103,6 @@ export class PlatformAuthExtensionHandler implements IPlatformAuthHandler {
`'${this.platformAuthType}' - Sending request to browser extension`,
request.correlationId
);
this.logger.tracePii(
`'${
this.platformAuthType
}' - Sending request to browser extension: '${JSON.stringify(
req
)}'`,
request.correlationId
);
this.messageChannel.port1.postMessage(req);

const response: object = await new Promise((resolve, reject) => {
Expand All @@ -122,6 +115,42 @@ export class PlatformAuthExtensionHandler implements IPlatformAuthHandler {
return validatedResponse;
}

private initializeNativeExtensionRequest(
request: PlatformAuthRequest
): PlatformAuthRequest {
const {
resourceRequestMethod,
resourceRequestUri,
extraParametersNoCache,
...extensionRequest
} = request;

const isProofOfPossessionRequest =
request.tokenType === Constants.AuthenticationScheme.POP ||
request.tokenType === Constants.AuthenticationScheme.DPOP ||
request.tokenType === "dpop_proof";

const nativeExtraParametersNoCache = isProofOfPossessionRequest
? {
...extraParametersNoCache,
...(resourceRequestMethod && {
pop_method: resourceRequestMethod,
}),
...(resourceRequestUri && {
pop_uri: resourceRequestUri,
}),
}
: undefined;

return {
...extensionRequest,
...(nativeExtraParametersNoCache &&
Object.keys(nativeExtraParametersNoCache).length > 0 && {
extraParametersNoCache: nativeExtraParametersNoCache,
}),
};
}

/**
* Returns an instance of the MessageHandler that has successfully established a connection with an extension
* @param {Logger} logger
Expand Down Expand Up @@ -317,14 +346,6 @@ export class PlatformAuthExtensionHandler implements IPlatformAuthHandler {
`'${this.platformAuthType}' - Received response from browser extension`,
correlationId
);
this.logger.tracePii(
`'${
this.platformAuthType
}' - Received response from browser extension: '${JSON.stringify(
response
)}'`,
correlationId
);
if (response.status !== "Success") {
resolver.reject(
createNativeAuthError(
Expand Down Expand Up @@ -392,11 +413,6 @@ export class PlatformAuthExtensionHandler implements IPlatformAuthHandler {
"Error parsing response from WAM Extension",
correlationId
);
this.logger.errorPii(
`Error parsing response from WAM Extension: '${err as string}'`,
correlationId
);
this.logger.errorPii(`Unable to parse '${event}'`, correlationId);

if (resolver) {
resolver.reject(err as AuthError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export function isPlatformAuthAllowed(
switch (authenticationScheme) {
case Constants.AuthenticationScheme.BEARER:
case Constants.AuthenticationScheme.POP:
case Constants.AuthenticationScheme.DPOP:
logger.trace(
"isPlatformAuthAllowed: authenticationScheme is supported, returning true",
correlationId
Comment thread
hectormmg marked this conversation as resolved.
Resolved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
import { NativeExtensionMethod } from "../../utils/BrowserConstants.js";
import { StringDict } from "@azure/msal-common/browser";

/**
* No-cache parameters MSAL.js sends to the native broker for proof-of-possession requests.
*/
export type PlatformAuthRequestExtraParametersNoCache = {
pop_method?: string;
pop_uri?: string;
pop_nonce?: string;
};

/**
* Token request which native broker will use to acquire tokens
*/
Expand All @@ -23,6 +32,7 @@ export type PlatformAuthRequest = {
claims?: string;
state?: string;
loginHint?: string; // UPN of the user
preferBinding?: string;
reqCnf?: string;
keyId?: string;
tokenType?: string;
Expand All @@ -32,6 +42,7 @@ export type PlatformAuthRequest = {
resourceRequestUri?: string;
extendedExpiryToken?: boolean;
extraParameters?: StringDict;
extraParametersNoCache?: PlatformAuthRequestExtraParametersNoCache;
signPopToken?: boolean; // Set to true only if token request does not contain a PoP keyId
attributeTokens?: string; // Pre-serialized attribute tokens (sorted, space-separated)
};
Expand Down Expand Up @@ -64,11 +75,13 @@ export type PlatformDOMTokenRequest = {
correlationId: string;
isSecurityTokenService: boolean;
state?: string;
preferBinding?: string;
extraParametersNoCache?: PlatformAuthRequestExtraParametersNoCache;
/*
* Known optional parameters will go into extraQueryParameters.
* List of known parameters is:
* "prompt", "nonce", "claims", "loginHint", "instanceAware", "windowTitleSubstring", "extendedExpiryToken",
* ProofOfPossessionParams: "reqCnf", "keyId", "tokenType", "shrClaims", "shrNonce", "resourceRequestMethod", "resourceRequestUri", "signPopToken"
* ProofOfPossessionParams: "reqCnf", "keyId", "tokenType", "shrClaims", "shrNonce", "signPopToken"
*/
extraParameters?: DOMExtraParameters;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export type PlatformAuthResponse = {
scope: string;
state: string;
shr?: string;
token_type?: string;
dpop_proof?: string;
token_binding_key_id?: string;
attested_chosen?: boolean;
extendedLifetimeToken?: boolean;
};

Expand Down Expand Up @@ -65,6 +69,10 @@ export type PlatformDOMTokenResponse = {
idToken: string;
scopes: string;
proofOfPossessionPayload?: string;
tokenType?: string;
dpopProof?: string;
tokenBindingKeyId?: string;
attestedChosen?: boolean;
extendedLifetimeToken?: boolean;
error: ErrorResult;
properties?: Record<string, string>;
Expand Down
Loading
Loading