Skip to content

feat: nginx-ntlm-modulev2 — full rewrite with security hardening for nginx ≥ 1.25#11

Draft
Copilot wants to merge 9 commits intomasterfrom
copilot/rewrite-plugin-nginx-ntlm-modulev2
Draft

feat: nginx-ntlm-modulev2 — full rewrite with security hardening for nginx ≥ 1.25#11
Copilot wants to merge 9 commits intomasterfrom
copilot/rewrite-plugin-nginx-ntlm-modulev2

Conversation

Copy link
Copy Markdown

Copilot AI commented May 7, 2026

  • Recheck session/cache ownership transitions in get_ntlm_peer and free_ntlm_peer
  • Use canonical item-release path for cache-to-free transitions to keep queue invariants consistent
  • Re-run repository tests (prove -r t) and report environment limitations
  • Run parallel validation and address actionable findings

Copilot AI and others added 2 commits May 7, 2026 08:34
- Rewrites ngx_http_upstream_ntlm_module.c with four documented security invariants:
  I1. Atomic item release via ngx_http_upstream_ntlm_item_release() helper
  I2. c->read->data (not c->data) for cache item storage on idle connections
  I3. OOM guard: cleanup-add failure aborts cache insertion (session-hijack fix)
  I4. Stale-credential eviction on re-auth with established session

- Fixes from all open PRs (#3, #6, #7):
  - Synchronous cleanup handler (no posted events)
  - Session-hijack via cleanup-OOM (critical)
  - Stale-credential reuse on established connections (high)
  - client_connection NULL in eviction path
  - Fault-injection macro NGX_NTLM_TEST_CLEANUP_NULL for testing

- Adds ntlm_time and ntlm_requests directives
- Adds notify peer callback pass-through
- Updates README.md for v2 with security section
- Updates Docker files to nginx 1.28.0 / alpine 3.20
- Adds TEST 5 (stale credential eviction) and TEST 6 (OOM guard, SKIP)
  to t/001-sanity.t

Agent-Logs-Url: https://github.com/Securepoint/nginx-ntlm-module/sessions/3343cf49-d4a7-4188-89b8-5a89fad4a7fe

Co-authored-by: matthias-lay <163420385+matthias-lay@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants