Skip to content

Commit dd9fd77

Browse files
PieterKasclaude
andcommitted
server/dpop: round-5 comment fixes
- Soften the heldNonce comment: newest-wins refresh is correct for ROTATING servers; a strict single-use server that re-arms only via challenges can still push alternate negatives to untestable (correctly reported, not mis-scored) — the previous "rotate or single-use" over-claimed. (R5) - Fix the clock-skew test comment: the stale probe is now -303s (~273s old), not -301s/~271s. (R5) Comment-only; no behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 13676b7 commit dd9fd77

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎src/scenarios/server/auth/dpop.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ describe('DPoP server validation scenario', () => {
378378

379379
it('anchors iat probes to the server clock (no false failure under skew)', async () => {
380380
// The server's clock is 30s behind the framework. Without anchoring, the
381-
// stale probe (now−301s by the framework clock) looks only ~271s old to the
381+
// stale probe (now−303s by the framework clock) looks only ~273s old to the
382382
// server → inside ±5 min → wrongly accepted → the iat check would FAIL a
383383
// conformant server. Anchoring to the server's Date header keeps it rejected.
384384
const checks = await new DPoPServerValidationScenario().run(

‎src/scenarios/server/auth/dpop.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,11 @@ algorithms, the 401 challenge format, token audience validation under DPoP, and
266266
// value into every subsequent proof — including the negatives — so a server
267267
// that checks the nonce first still evaluates the injected defect rather
268268
// than merely re-challenging. Refreshing (vs capturing once) keeps this
269-
// correct against servers that rotate or single-use their nonces.
269+
// correct against servers that ROTATE their nonce (each response carries the
270+
// next one). A strict single-use server that re-arms the nonce only via a
271+
// use_dpop_nonce challenge (not on ordinary rejections, which §8.2 doesn't
272+
// require) can still push alternate negatives to untestable — acceptable, as
273+
// those are correctly reported not-testable rather than mis-scored.
270274
let heldNonce: string | undefined;
271275

272276
const send = async (

0 commit comments

Comments
 (0)