Files
alzeo/tests
Hasan BasbunarandClaude Opus 5.5 af1aa5d2a2 proxy: the identity wall reads the Bearer scheme in any case
With QWEN38_CLIENT_KEYS_FILE set, _label_peer named a client only when
its header started with "Bearer " exactly, while SGLang, vLLM's
middleware (vllm_engine_auth.py) and the door without the wall
(engine_admits) all read the scheme in any case, as RFC 9110 11.1 has
it. A listed key sent as "bearer <key>" got the wall's 401 "missing or
unknown client key" from a proxy whose engine admits that header.
Reproduced against v6.41 with a live proxy: "Bearer" 503 (no engine
behind it, so past the wall), "bearer" and "BEARER" 401.

The scheme is now compared case-insensitively and the token after it is
stripped as before; an empty token or another scheme still gets the 401.

Found in a cloud review of v1.36.1 (pull request #52). The reference box
does not set QWEN38_CLIENT_KEYS_FILE, so there it changes nothing. The
new test fails on the old code (401 != 200 for "bearer") and passes on
this one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 17:37:32 +02:00
..