feat(web-app): send DPoP-Nonce on sample app requests (DSPX-3397) - #994
Draft
dmihalcik-virtru wants to merge 1 commit into
Draft
feat(web-app): send DPoP-Nonce on sample app requests (DSPX-3397)#994dmihalcik-virtru wants to merge 1 commit into
dmihalcik-virtru wants to merge 1 commit into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
dmihalcik-virtru
force-pushed
the
dspx-3397-7-web-app-nonce
branch
from
August 10, 2026 17:04
0c80feb to
e8178eb
Compare
Teaches the sample browser app to participate in the DPoP-Nonce handshake so it keeps working against a Keycloak configured with `require_nonce`. - Token endpoint: Keycloak answers the first proof with HTTP 400 + `DPoP-Nonce` when nonces are required (RFC 9449 §8). Wraps the request in the SDK's `sendWithNonceRetry` helper so the proof is re-minted around the server-supplied nonce and retried once, rather than hand-rolling a sixth copy of that retry loop in the app. - Adds a per-session `DPoPNonceCache` and threads the cached nonce into the proof `withCreds` mints for platform requests. - Switches the `Authorization` scheme from `Bearer` to `DPoP`, which is what RFC 9449 §7.1 requires for a DPoP-bound access token. - Adds a Playwright spec covering the headers the app actually emits. How to test: `cd web-app && npm test`, and `cd web-app/tests && npm test` for the browser spec. Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
dmihalcik-virtru
force-pushed
the
dspx-3397-7-web-app-nonce
branch
from
August 10, 2026 17:47
e8178eb to
602e4ff
Compare
|
X-Test Failure Report |
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.


Stack level 7 of the DSPX-3397 split. Base: #993.
What
Teaches the sample browser app to participate in the DPoP-Nonce handshake so it keeps working against a Keycloak configured with
require_nonce.DPoP-Noncewhen nonces are required (RFC 9449 §8). The request now goes through the SDK'ssendWithNonceRetryhelper (exported in feat(sdk): handle DPoP-Nonce challenges (DSPX-3397) #993), so the proof is re-minted around the server-supplied nonce and retried once — rather than hand-rolling a sixth copy of that retry loop in the app.DPoPNonceCacheon the session and threads the cached nonce into the proofwithCredsmints for platform requests.AuthorizationfromBearertoDPoP, which is what RFC 9449 §7.1 requires for a DPoP-bound access token.web-app/tests/tests/dpop-headers.spec.tsasserts the headers the app actually emits.Why
The sample app is the manual smoke test for the SDK's DPoP path. Without this it can't exercise the nonce handshake #993 adds.
How to test
Risk
Touches auth. The
Bearer→DPoPscheme change is the behavioral one; it only affects the sample app, not the published SDK.