logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ext_ldap_group_acl - Squid LDAP external acl group helper

Author

       This program  was  written  by  FlavioPescuma<flavio@marasystems.com>HenrikNordstrom<hno@squid-cache.org>

       Based on prior work in squid_ldap_auth by GlenNewton<glen.newton@nrc.ca>

       This manual was written by HenrikNordstrom<hno@marasystems.com>

Configuration

       This helper is intended to be used as an external_acl_type helper in squid.conf.external_acl_typeldap_group%LOGIN/path/to/ext_ldap_group_acl...aclgroup1externalldap_groupGroup1aclgroup2externalldap_groupGroup2NOTE:  When  constructing  search  filters it is recommended to first test the filter using ldapsearch to
       verify that the filter matches what you expect before you attempt to use ext_ldap_group_acl

Description

ext_ldap_group_acl  allows Squid to connect to a LDAP directory to authorize users via LDAP groups.  LDAP
       options are specified as parameters on the command line, while the username(s) and group(s) to be checked
       against the LDAP directory are specified on subsequent lines of input to the helper,  one  username/group
       pair per line separated by a space.

       As  expected  by the external_acl_type construct of Squid, after specifying a username and group followed
       by a new line, this helper will produce either OK or ERR on the following line to show if the user  is  a
       member of the specified group.

       The  program operates by searching with a search filter based on the users user name and requested group,
       and if a match is found it is determined that the user belongs to the group.

Name

       ext_ldap_group_acl - Squid LDAP external acl group helper

       Version 2.18

Options

-anever|always|search|find
                   When to dereference aliases. Defaults to 'never'

                   never dereference aliases (default), always dereference aliases, only during a search or only
                   to find the base object

       -bbasednREQUIRED.  Specifies the base DN under which the groups are located.

       -Bbasedn   Specifies the base DN under which the users are located (if different)

       -cconnect_timeout
                   Specify timeout used when connecting to LDAP servers (requires Netscape LDAP API libraries)

       -d          Debug mode where each step taken will get reported in detail.  Useful for understanding  what
                   goes wrong if the result is not what was expected.

       -Dbinddn-wpassword
                   The DN and password to bind as while performing searches. Required if the LDAP directory does
                   not allow anonymous searches.

                   As  the  password  needs  to be printed in plain text in your Squid configuration and will be
                   sent on the command line to the helper it is strongly  recommended  to  use  a  account  with
                   minimal  associated privileges.  This to limit the damage in case someone could get hold of a
                   copy of your Squid configuration file or extracts the password used from a process listing.

       -Dbinddn-Wsecretfile
                   The DN and the name of a file containing the password to bind as while performing searches.

                   Less insecure version of the former parameter pair with two advantages: The password does not
                   occur in the process listing, and the password is not being compromised if someone  gets  the
                   squid configuration file without getting the secretfile.

       -Ecertpath Enable LDAP over SSL (requires Netscape LDAP API libraries)

       -ffilter   LDAP  search filter used to search the LDAP directory for any matching group memberships.  In
                   the filter %u will be replaced by the user name (or DN if the -F or -u options are used)  and
                   %g by the requested group name.

       -Ffilter   LDAP  search  filter used to search the LDAP directory for any matching users.  In the filter
                   %s will be replaced by the user name. If % is to be included literally in the filter then use
                   %%-g          Specifies that the first query argument sent to the helper by Squid is  a  extension  to  the
                   basedn and will be temporarily added in front of the global basedn for this query.

       -hldapserver
                   Specify the LDAP server to connect to

       -Hldapuri  Specify the LDAP server to connect to by a LDAP URI (requires OpenLDAP libraries)

       -K          Strip Kerberos Realm component from user names (@ separated)

       -pldapport Specify  an  alternate  TCP port where the LDAP server is listening if other than the default
                   LDAP port 389.

       -P          Use a persistent LDAP connection. Normally the LDAP connection is only open while verifying a
                   users group membership to preserve resources at the LDAP server. This option causes the  LDAP
                   connection  to  be  kept  open,  allowing  it  to  be  reused  for  further user validations.
                   Recommended for larger installations.

       -R          Do not follow referrals

       -sbase|one|sub
                   search scope. Defaults to subbase object only,

                   one level below the base object or

                   subtree below the base object

       -S          Strip NT domain name component from user names (/ or \ separated)

       -tsearch_timeout
                   Specify time limit on LDAP search operations

       -uattr     LDAP attribute used to construct the user DN from the user name and base dn  without  needing
                   to search for the user.  A maximum of 16 occurrences of %s are supported.

       -v2|3      LDAP protocol version. Defaults to 3 if not specified.

       -Z          Use TLS encryption

Questions

       Questions  on  the  usage  of  this  program  can  be  sent  to  the  SquidUsersmailinglist <squid-
       users@lists.squid-cache.org>

       Or contact your favorite LDAP list/friend if the question is more related to LDAP than Squid.

Reporting Bugs

       Bug reports need to be  made  in  English.   See  https://wiki.squid-cache.org/SquidFaq/BugReporting  for
       details of what you need to include with your bug report.

       Report bugs or bug fixes using https://bugs.squid-cache.org/

       Report serious security bugs to SquidBugs<squid-bugs@lists.squid-cache.org>

       Report ideas for new improvements to the SquidDevelopersmailinglist <squid-dev@lists.squid-cache.org>

See Also

squid(8), basic_ldap_auth(8), ldapsearch(1), GPL(7),
       Your favorite LDAP documentation
       RFC2254 - The String Representation of LDAP Search Filters,
       The Squid FAQ wiki https://wiki.squid-cache.org/SquidFaq
       The Squid Configuration Manual http://www.squid-cache.org/Doc/config/

                                                 30 January 2005                           ext_ldap_group_acl(8)

Synopsis

ext_ldap_group_acl-b base-DN -f filter [ options ][ server [':' port ]| URI ]...

See Also