fix(relay): auth middleware round 3 — RFC compliance and test gaps
RFC compliance:
- Reject requests with multiple DPoP headers (RFC 9449 §11.1): a
header-prepending proxy could inject a forged proof as the first value
- Case-insensitive Bearer scheme matching (RFC 7235 §2.1): use
eq_ignore_ascii_case so "bearer"/"BEARER" are accepted
Test gaps:
- Fix dpop_header_present_but_access_token_has_no_cnf: was using
"dummy.dpop.value" which failed at base64 decode; now uses a valid
DPoP proof so the "access token missing DPoP binding" branch is
actually exercised
- Add dpop_cnf_present_without_jkt_returns_401 covering the cnf:{}
guard added in round 2
- Add dpop_iat_at_i64_min_returns_401: the specific value motivating
the i128 widening fix; confirms no panic in debug or bypass in release
- Add multiple_dpop_headers_returns_401 covering the new §11.1 guard