[squid-users] kerberos authentication with kerberos groups

Jeroen Ruijter jeroen.ruijter at borsboomhamm.nl
Mon Feb 19 09:30:14 UTC 2018


support_member.cc(91): pid=2166 :2018/02/19 08:23:59| kerberos_ldap_group: DEBUG: Default domain loop: group at domain ADGroupRaamregeling at BNH.LOCAL

support_member.cc(119): pid=2166 :2018/02/19 08:23:59| kerberos_ldap_group: DEBUG: Default group loop: group at domain ADGroupRaamregeling at BNH.LOCAL

support_member.cc(63): pid=2166 :2018/02/19 09:54:21| kerberos_ldap_group: DEBUG: User domain loop: group at domain ADGroupRaamregeling at BNH.LOCAL

support_member.cc(65): pid=2166 :2018/02/19 09:54:21| kerberos_ldap_group: DEBUG: Found group at domain ADGroupRaamregeling at BNH.LOCAL

support_member.cc(76): pid=2166 :2018/02/19 09:54:21| kerberos_ldap_group: INFO: User Jeroen.Ruijter is not member of group at domain ADGroupRaamregeling at BNH.LOCAL



So user authenticated for proxy the goup is found but the user is not a member, but I’m certainly a member





Squid info

bhlnx03:~ # squid -v

Squid Cache: Version 3.5.21

Service Name: squid

configure options:  '--host=x86_64-suse-linux-gnu' '--build=x86_64-suse-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/lib' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--disable-strict-error-checking' '--sysconfdir=/etc/squid' '--libexecdir=/usr/sbin' '--datadir=/usr/share/squid' '--sharedstatedir=/var/squid' '--with-logdir=/var/log/squid' '--with-pidfile=/run/squid.pid' '--with-dl' '--enable-disk-io' '--enable-storeio' '--enable-removal-policies=heap,lru' '--enable-icmp' '--enable-delay-pools' '--enable-esi' '--enable-icap-client' '--enable-useragent-log' '--enable-referer-log' '--enable-kill-parent-hack' '--enable-arp-acl' '--enable-ssl-crtd' '--with-openssl' '--enable-forw-via-db' '--enable-cache-digests' '--enable-linux-netfilter' '--with-large-files' '--enable-underscores' '--enable-auth' '--enable-auth-basic' '--enable-auth-ntlm' '--enable-auth-negotiate' '--enable-auth-digest' '--enable-external-acl-helpers=LDAP_group,eDirectory_userip,file_userip,kerberos_ldap_group,session,unix_group,wbinfo_group' '--enable-stacktraces' '--enable-x-accelerator-vary' '--with-default-user=squid' '--disable-ident-lookups' '--enable-follow-x-forwarded-for' '--disable-arch-native' 'build_alias=x86_64-suse-linux-gnu' 'host_alias=x86_64-suse-linux-gnu' 'CFLAGS=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIE -fPIC -DOPENSSL_LOAD_CONF' 'LDFLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro,-z,now -pie' 'CXXFLAGS=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIE -fPIC -DOPENSSL_LOAD_CONF' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'









-----Oorspronkelijk bericht-----
Van: squid-users [mailto:squid-users-bounces at lists.squid-cache.org] Namens Amos Jeffries
Verzonden: vrijdag 16 februari 2018 18:58
Aan: squid-users at lists.squid-cache.org
Onderwerp: Re: [squid-users] kerberos authentication with kerberos groups



On 17/02/18 02:02, Jeroen Ruijter wrote:

> I'm trying to replace my basic ldap authentication by kerberos single

> sign on.

>



NP: Despite what some claim, SSO is not unique to NTLM and Kerberos authentication. It is a behaviour of the tools used. As such it can be done with *any* authentication type if the tools used perform the necessary behaviour.







> The user can succesfully login with single sign on, but I have

> restriction on groups and that is where it goes wrong.



What exactly does this "going wrong" look like?



Also, what version of Squid are you working with?

(the "squid -v" output please)



>

> I would like to use -r to trim the domain name, but when I do so it

> seems to work even less.

>

> Someone any ideas what to try, I believe the system is loking wrong in

> active directory but adding -b OU=Users,DC=yyy,DC=local does not help

> me further



You have some things looking for ".local" and others for ".LOCAL". I'm not sure if case insensitivity exists in all those places they are being used, so that is one potential cause of problems.





> =======

>

>

>

> auth_param negotiate program /usr/sbin/negotiate_wrapper_auth -d

> --ntlm /usr/bin/ntlm_auth --diagnostics

> --helper-protocol=squid-2.5-ntlmssp

> --domain=yyy --kerberos /usr/sbin/negotiate_kerberos_auth -d -s

> GSS_C_NO_NAME

>

> auth_param negotiate children 20 startup=0 idle=1

>

> auth_param negotiate keep_alive off

>

>

>

> external_acl_type XXX_InternetAllowed ttl=3600 negative_ttl=3600

> %LOGIN /usr/sbin/ext_kerberos_ldap_group_acl -b

> OU=Users,OU=BenH,DC=yyy,DC=local -g AD_XXX_InternetAllowed at yyy.LOCAL<mailto:AD_XXX_InternetAllowed at yyy.LOCAL>

> -d

>

> external_acl_type RestrictedAdult ttl=3600 negative_ttl=3600 %LOGIN

> /usr/sbin/ext_kerberos_ldap_group_acl -b

> OU=Users,OU=BenH,DC=yyy,DC=local -g ADGroupRestrictedAdult at yyy.LOCAL<mailto:ADGroupRestrictedAdult at yyy.LOCAL>

> -d

>

>

>

> acl XXX_InternetAllowed external XXX_InternetAllowed

>

> acl XXX_Adult external XXX_Adult

>



...

>

> http_access deny auth !XXX_InternetAllowed



The above says the users entire login is to be rejected if they are not a member of the XXX_InternetAllowed group.



That should work but it is better to reject failed logins fully first, then do the group checks separately.



Like this:



http_access deny !auth

http_access deny !XXX_InternetAllowed all



>

> http_access deny XXX_Adult XXX_AdultX

>



you could gain a fair bit of performance back by making that check the dstdomain before the slow external lookup:



  http_access deny XXX_AdultX XXX_Adult all





> http_access allow localnet

>

> http_access allow localhost

>

> http_access deny all

>

>

>

> ========

>





...

>

> support_ldap.cc(342): pid=7612 :2018/02/16 11:50:07|

> kerberos_ldap_group: DEBUG: Search ldap server with bind path

> CN=Schema,CN=Configuration,DC=bnh,DC=local and filter:

> (ldapdisplayname=samaccountname)

>

> support_ldap.cc(345): pid=7612 :2018/02/16 11:50:07|

> kerberos_ldap_group: DEBUG: Found 0 ldap entries

>

> support_ldap.cc(350): pid=7612 :2018/02/16 11:50:07|

> kerberos_ldap_group: DEBUG: Determined ldap server not as an Active

> Directory server

>

> support_ldap.cc(1061): pid=7612 :2018/02/16 11:50:07|

> kerberos_ldap_group: ERROR: Error determining ldap server type:

> Operations error

>

> support_member.cc(76): pid=7612 :2018/02/16 11:50:07|

> kerberos_ldap_group: INFO: User Administrator is not member of

> group at domain AD_XXX_InternetAllowed at YYY.LOCAL<mailto:AD_XXX_InternetAllowed at YYY.LOCAL>

>



Looks like it is working to me.



The helper tries several methods of locating a server, two fail but the third seems to work and produces the above result.





Amos



_______________________________________________

squid-users mailing list

squid-users at lists.squid-cache.org<mailto:squid-users at lists.squid-cache.org>

http://lists.squid-cache.org/listinfo/squid-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20180219/0c151c64/attachment-0001.html>


More information about the squid-users mailing list