[squid-users] kerberos authentication with kerberos groups
Amos Jeffries
squid3 at treenet.co.nz
Fri Feb 16 17:58:15 UTC 2018
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 -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 -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
>
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
More information about the squid-users
mailing list