RE: [squid-users] Allowing linked sites - NTLM and un-authenticated users

From: Jasper Van Der Westhuizen <javanderwesthuizen_at_shoprite.co.za>
Date: Mon, 2 Apr 2012 07:54:37 +0200

-----Original Message-----
From: Amos Jeffries [mailto:squid3_at_treenet.co.nz]
Sent: Saturday, March 31, 2012 10:11 AM
To: squid-users_at_squid-cache.org
Subject: Re: [squid-users] Allowing linked sites - NTLM and un-authenticated users

On 30/03/2012 11:45 p.m., Jasper Van Der Westhuizen wrote:
>> Hi everyone
>>
>> I've been struggling to get a very specific setup going.
>>
>> Some background: Our users are split into "Internet" users and "Non-Internet" users. Everyone in a specific AD group is allowed to have full internet >>access. I have two SQUID proxies with squidGuard load balanced with NTLM authentication to handle the group authentication. All traffic also then gets >>sent to a cache peer.
>>
>> This is basically what I need:
>> 1. All users(internet and non-internet) must be able to access sites in "/etc/squid/lists/whitelist.txt"
>> 2. If a user wants to access any external site that is not in the whitelist then he must be authenticated. Obviously a non-internet user can try until he is blue >>in the face, it won't work.
>>
>> These two scenarios are working 100%, except for one irritating bit. Most of the whitelisted sites have got linked websites like facebook or twitter or >>yourtube in them that load icons and graphics or adds etc. This causes a auth-prompt for non-internet users. I can see the requests in the logs being0 >>DENIED.
>>
>> The only way I could think of getting rid of these errors was to
>> implement a "http_access deny !whitelist" after the allow. This works
>> great for non-internet users and it blocks all the linked sites
>> without asking to authenticate, but obviously this breaks access to
>> all other sites for authenticated users.(access denied for all sites)

> You can use the "all" hack and two login lines:
>
>http_access allow whitelist# allow authed users, but dont challenge if missing auth http_access allow authed all # block access to some sites unless already >logged in http_access deny blacklist http_access deny !authed
>
>
>The authed users may still have problems logging in if the first site they visit is one of the "blacklist" ones. But if they visit another page first they can login >and get there.
>
>
>Amos

Hi Amos

Thank you for the reply.

I think I already tried this method but it still fails. In any case I tried what you suggested and the problem remains that my unauthenticated(non-internet) users can get to the whitelisted sites just fine, but they still get authentication prompts for the linked content like facebook and youtube that the site contains. An example of a site is http://www.triptrack.co.za/ and you will see what I mean. At the bottom right of the site there are links to facebook and youtube. Those links cause a authentication request to the unauthenticated(or non-internet) users. I can't have these prompts appear for these users. They have a set list of sites they can visit, and it should work for them and should not get asked to authenticate. Only once they try and go directly to sites that are not in the whitelist, should they be prompted, and obviously denied since they are not included in the AD group.

Current rules:
http_access allow whitelist
http_access allow authenticated all
http_access deny blacklist
http_access deny !authenticated

Kind Regards
Jasper
Received on Mon Apr 02 2012 - 05:54:50 MDT

This archive was generated by hypermail 2.2.0 : Mon Apr 02 2012 - 12:00:02 MDT