]> git.ipfire.org Git - thirdparty/squid.git/commit - src/auth/digest/UserRequest.cc
Bug 3997: Excessive NTLM or Negotiate auth helper annotations
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 17 Jan 2015 09:15:53 +0000 (01:15 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 17 Jan 2015 09:15:53 +0000 (01:15 -0800)
commitc10ebce8035c25cc0d2c9b27f0720e91c4885d8e
tree2d55dd88f88eb2e92384724dc307f47893d335b0
parentc1c99471ac155f224346b7cbd0ace05c303dbdca
Bug 3997: Excessive NTLM or Negotiate auth helper annotations

With the transaction annotations feature added in Squid-3.4 auth
helper response values get recorded as annotatiions. In the case
of NTLM and Negotiate authentication the helper response contains
a large credentials token which changes frequently.

Also, user credentials state is cached. In the case of NTLM and
Negotiate the active credentials are cached in the TCP connection
state data, but also for the cache mgr helper reports make use of
caching in a global username cache.

When these two features are combined, the global username cache
for mgr reporting accumulates all TCP connection specific
token= values presented by the client on all its connections, and
any changes to the token over its lifetime.

The result is that for users performing either many transactions,
or staying connected for long periods the memory consumption from
unnecesarily stored tokens is excessive. When clients do both the
machine memory can be consumed, and the CPU can reach 100%
consumption just walking the annotations lists during regular
operations.

To fix this we drop the security credentials tokens from cached
annotations list in NTLM and Negotiate. Digest is also included
though its HA1 token value is static it has similar privacy issues
related to storage.

Also, use the new 3.5 APi for username cache key creation to build
the global username cache key for NTLM/Negotiate using the TCP
connection specific token so that credentials and associated
tokens do not get accidentally shared between connections and the
manager can accurately report users.
src/auth/digest/UserRequest.cc
src/auth/negotiate/Config.cc
src/auth/negotiate/UserRequest.cc
src/auth/ntlm/Config.cc
src/auth/ntlm/UserRequest.cc