[squid-users] Custom external acl helpers in PHP

Amos Jeffries squid3 at treenet.co.nz
Sat Sep 5 08:35:58 UTC 2015


On 5/09/2015 7:58 a.m., Walter (NIF) wrote:
> Hi! I wrote a PHP script to authenticate users in a postgresql server
> and it's working perfectly.
> 
> The question is that we have some groups with different privileges. We
> had a LDAP base where
> the users were authenticated with the ldap_group external acl. I'd like
> to write my own external
> helper in PHP but I don't know how to make it get the current logged
> user and the group set in
> the acl like:
> 
> acl students external ldap_group students
> 

Same helper API protocol as for the auth helper you wrote. Only the
input line changes.

The helper receives the format-string from the ldap_group definition
followed by the text " students" on its stdin.

<http://www.squid-cache.org/Doc/config/external_acl_type/>
<http://wiki.squid-cache.org/Features/AddonHelpers#Access_Control_.28ACL.29>

PS. if you looked above in the auth_param descriptions you will see
group= kv-pairs being accepted in from the auth helpers. You can use
those with a note ACL matching group names instead of a second helper.

Amos



More information about the squid-users mailing list