]> git.ipfire.org Git - thirdparty/squid.git/commit
Update External ACL helpers error handling and caching
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Fri, 27 Jan 2017 02:26:04 +0000 (15:26 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 27 Jan 2017 02:26:04 +0000 (15:26 +1300)
commit2331dc22f188d18e092a3b6921e3cb3130c5a213
treec72987dd13e9945dac01d0d1209a0b5aa41f7a51
parent7b901e8b9b29f69a0465fc2326a115ed6c27aca5
Update External ACL helpers error handling and caching

The helper protocol for external ACLs [1] defines three possible return values:
   OK - Success. ACL test matches.
   ERR - Success. ACL test fails to match.
   BH - Failure. The helper encountered a problem.

The external acl helpers distributed with squid currently do not follow this
definition. For example, upon connection error, ERR is returned:

   $ ext_ldap_group_acl ... -d
   ext_ldap_group_acl: WARNING: could not bind to binddn 'Can't contact LDAP server'
   ERR

This does not allow to distinguish "no match" and "error" either and
therefore negative caches "ERR", also in the case of an error.

Moreover there are multiple problems inside squid when trying to handle BH
responses:
  - Squid-5 and Squid-4 retry requests for BH responses but crashes after the
    maximum retry number (currently 2) is reached.
  - If an external acl helper return always BH (eg because the LDAP server is
    down) squid sends infinitely new request to the helper.

This is a Measurement Factory project
helpers/defines.h
helpers/external_acl/AD_group/ext_ad_group_acl.cc
helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc
helpers/external_acl/LM_group/ext_lm_group_acl.cc
helpers/external_acl/SQL_session/ext_sql_session_acl.pl.in
helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc
helpers/external_acl/file_userip/ext_file_userip_acl.cc
helpers/external_acl/time_quota/ext_time_quota_acl.cc
helpers/external_acl/unix_group/check_group.cc
src/external_acl.cc