<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.StileMessaggioDiPostaElettronica17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:133455314;
mso-list-type:hybrid;
mso-list-template-ids:1845902436 2048955634 135266307 135266309 135266305 135266307 135266309 135266305 135266307 135266309;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-font-family:Calibri;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=IT-CH link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hello.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m setting up squid on a CentOS 8 server.<o:p></o:p></p><p class=MsoNormal>Authentication against active directory works well with basic_ldap_auth, but I fail when trying to check that a user belongs to a group.<o:p></o:p></p><p class=MsoNormal>It seems to me that for ext_ldap_group_acl it’s enough that both the user and the group exist and it returns OK. It returns ERR when it cannot find the group or the user.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>To make it more clear, here are the queries and results I get.<o:p></o:p></p><p class=MsoNormal>user1.test exists and is a member of group My_Group<o:p></o:p></p><p class=MsoNormal>user2.test exists and is NOT a member of group My_Group<o:p></o:p></p><p class=MsoNormal>Group asdf does NOT exist<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So, I expect that when asking for<o:p></o:p></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'> </span></span><![endif]>user1.test My_Group >> OK<o:p></o:p></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'> </span></span><![endif]>user2.test My_Group >> ERR<o:p></o:p></p><p class=MsoNormal>But I get:<o:p></o:p></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'> </span></span><![endif]>user1.test My_Group >> OK<o:p></o:p></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'> </span></span><![endif]>user2.test My_Group >> OK<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Here it is:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># /usr/lib64/squid/ext_ldap_group_acl -d -R -b "dc=my,dc=domain" -D "<a href="mailto:squid@my.domain">squid@my.domain</a>" -W /etc/squid/ldappass.txt -F "(sAMAccountName=%s)" -f "(memberof=CN=%g,DC=my,DC=domain)" -h sv-102-dc.my.domain<o:p></o:p></p><p class=MsoNormal>user1.test asdf<o:p></o:p></p><p class=MsoNormal>ext_ldap_group_acl.cc(589): pid=194302 :Connected OK<o:p></o:p></p><p class=MsoNormal>ext_ldap_group_acl.cc(772): pid=194302 :user filter '(sAMAccountName=user1.test)', searchbase 'dc=my,dc=domain'<o:p></o:p></p><p class=MsoNormal>ext_ldap_group_acl.cc(736): pid=194302 :group filter '(memberof=CN=asdf,DC=my,DC=domain)', searchbase 'dc=my,dc=domain'<o:p></o:p></p><p class=MsoNormal>ERR<o:p></o:p></p><p class=MsoNormal>user1.test My_Group<o:p></o:p></p><p class=MsoNormal>ext_ldap_group_acl.cc(589): pid=194302 :Connected OK<o:p></o:p></p><p class=MsoNormal>ext_ldap_group_acl.cc(772): pid=194302 :user filter '(sAMAccountName=user1.test)', searchbase 'dc=my,dc=domain'<o:p></o:p></p><p class=MsoNormal>ext_ldap_group_acl.cc(736): pid=194302 :group filter '(memberof=CN=My_Group, DC=my,DC=domain)', searchbase 'dc=my,DC=domain'<o:p></o:p></p><p class=MsoNormal>OK<o:p></o:p></p><p class=MsoNormal>user2.test My_Group<o:p></o:p></p><p class=MsoNormal>ext_ldap_group_acl.cc(589): pid=194302 :Connected OK<o:p></o:p></p><p class=MsoNormal>ext_ldap_group_acl.cc(772): pid=194302 :user filter '(sAMAccountName=user2.test)', searchbase 'dc=my,dc=domain'<o:p></o:p></p><p class=MsoNormal>ext_ldap_group_acl.cc(736): pid=194302 :group filter '(memberof=CN=My_Group, DC=my,DC=domain)', searchbase 'dc=my,DC=domain'<o:p></o:p></p><p class=MsoNormal>OK<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>My env:<o:p></o:p></p><p class=MsoNormal># uname -rms<o:p></o:p></p><p class=MsoNormal>Linux 4.18.0-193.14.2.el8_2.x86_64 x86_64<o:p></o:p></p><p class=MsoNormal># rpm -qa | grep squid<o:p></o:p></p><p class=MsoNormal>squid-4.4-8.module_el8.2.0+319+d18e041f.1.x86_64<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Could any kind soul help me out?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thank you and best regards.<o:p></o:p></p><p class=MsoNormal>Robi<o:p></o:p></p></div></body></html>