Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

2.7 KB
Raw Blame

Login rate-limit release check

The security release gate runs tests/integration/test_login_proxy_rate_limit.py through real nginx and the production uvicorn launcher. It verifies the single-proxy fix from #6442 for the password-spraying bypass reported in #5787.

The 18 scenarios cover:

  • TRUST_PROXY_HEADERS enabled and disabled.
  • nginx overwriting both address headers, appending to X-Forwarded-For, adding a separate X-Forwarded-For line, and setting only X-Real-IP while clearing X-Forwarded-For.
  • Different usernames with no forged headers and with rotating, repeated X-Forwarded-For headers plus a forged X-Real-IP.
  • A second client retaining its own budget after the first is blocked.
  • Repeated attempts against one username reaching account lockout before the IP limit. The test sets the account threshold to three to distinguish this from the five-attempt IP budget.

The probe requires real HTTP 401 responses before the limit and the production IP limiter's JSON 429 body and retry headers afterwards. An account-lockout response, CSRF rejection, or proxy-wide shared bucket cannot satisfy it. All application state is temporary; the two servers listen only on loopback. No existing accounts, provider credentials, or Redis service are used.

After installing development dependencies and nginx, run:

LDR_TESTING_WITH_MOCKS=false pdm run python -m pytest \
  tests/integration/test_login_proxy_rate_limit.py \
  -n 0 -p no:cov -v --tb=short --timeout=180

The proxy fixture skips mocked runs before checking for nginx or starting either server. The integration marker also lets ordinary CI deselect these tests. In security-tests.yml, the proxy-login-tests job runs them with its own 15-minute timeout, separate from the security-tests job. nginx is required there, and a separate report check rejects missing scenarios, skips, failures, and errors. Because release-gate.yml already requires the whole security workflow, a failed or timed-out probe blocks release publication. Its JUnit report, pytest output, and server logs are uploaded as the proxy-login-reports artifact.

This verifies the supported single-proxy rate-limit behavior. It does not establish safe direct access from private peers, trust in arbitrary proxy chains, or safety when an X-Real-IP-only proxy passes untrusted X-Forwarded-For through. Those remain separate trust-policy concerns (#6849, #6850, #6851).

For the security advisory, verify a release containing #6442 and this check before recording that version as patched. A passing run against main is not a released fix. Until that release exists, operators of v1.10.7 should overwrite both client-IP headers at their proxy and restrict access to the application port to that proxy.