Repository navigation
v1.10.2: Verified JWT identity and audit classification
v1.10.2: Verified JWT identity and audit classification
Not additive
Through 1.10.1, both HTTP adapters decoded bearer JWT payloads without verifying the signature, and since 1.10.0 those claims took precedence over the identity headers. A token with alg: none and any signature bytes was accepted as any subject. From 1.10.2, bearer tokens carry no identity unless jwt_key is configured on the middleware or decorator. When it is configured, the token is the only identity: it is verified (expiry enforced, none never accepted, scheme matched case-insensitively), a missing or non-bearer Authorization header is 401 jwt_required, an invalid token is 401 jwt_invalid, and the X-AgentLock-* identity headers are never consulted. Deployments that relied on an upstream proxy to verify tokens must configure jwt_key, or leave it unset and accept that the identity headers are the input. python-jose[cryptography], already in the fastapi extra, is now used, and added to the flask extra.
Security
- JWT verification as above, in FastAPI and Flask. Verified against:
alg: nonein every form including explicitly listed, wrong key, expired, futurenbf, HS256-over-RSA-public-key algorithm confusion, duplicateAuthorizationheaders, absent and non-bearer schemes with valid identity headers, and a verified token whose claimed role contradicts the session (stillrole_mismatch). - Audit classification. A deferral timeout wrote
"deny"and the execution-after-denial check tested"denied", so a host that executed after a timeout denial was logged as a routine completion. One shared denial predicate now covers both spellings; the record keeps its own string. Found by the external reviewer's recheck of 1.10.1.
Stated limits
A verified token with no exp claim is accepted. Identity headers remain trusted-upstream inputs when no key is configured, and the docstrings say so.
Measured
Suite: 1746 passed, 9 skipped, 0 failed with [dev,all] (CPython 3.14.6, mcp 2.2.0). Both external oracles, 96 cases, pass against the published wheel. Reviewer-measured coverage on 1.10.1 was 93.6% of statements including adapters; FastAPI's dependency-injection path and the CLI remain the thin spots and are next.