Question

Squid authentication - one login for multiple instances running on one or more servers possible?

Asked by: tomfra

I have squid running on my server, listening on 2 different IPs and running in 2 different instances. I am using username/password based basic NCSA authentication method. This works OK. However, if user logs into instance one - let's say running on IP 1.2.3.4 and then switches to instance 2 running on different IP (by changing the proxy IP/port in web browser), he/she is asked to log into the new instance. I'd much prefer if the user had to login just once for both (or several) instances - the username/password combination is the same for both instances as they are using the same passwd file.

On the same topic - and I don't know if this is possible at all:

I plan to create a "proxy network" consisting of several physical servers (in different locations) running squid. Ideally, the user would have to login just once and be allowed access to all of the servers without prompting for their username & password more than once. Some kind of central sign-on/log in system authenticating the user on each of the servers. It should be also convenient and easy to use so that even not technically savvy users would be able to use it.

More squid questions comming soon ;)

Tomas

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2007-01-04 at 02:54:35ID22110567
Tags

squid

,

authentication

Topic

Linux Networking

Participating Experts
3
Points
500
Comments
18

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. authentication in squid
    I wanna passwd authentication when users access my squid linux host
  2. Problems with Squid NCSA Authentication
    Hi, I am new to Squid and I am trying to make it authenticate internal users against a password file generated using htpasswd. For some reason, no authentication is required for them to access the Internet: they just surf without having been presented an authentication promp...
  3. squid
    Hi i currently have squid proxy server setup on redhat with NTLM authtication working fine.now i need to allow a couple of web sites to go through without authentication. theses sites are windowsupdate. does anyone no how this can be done. thanks jason
  4. squid configuration
    How can I set when I go to internet with port 80 need to put user name and password I put acl Safe_ports port 80 ncsa_users proxy_auth REQUIRED But it not work Below is my squid .conf http_port 3128 hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? no_cac...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: rindiPosted on 2007-01-04 at 09:12:10ID: 18244594

I think for that you'd need to use some directory service, like openldap, or if you are using a SuSE distro, eDirectory from Novell (would also be an option for other distro's but I don't know about pricing).

 

by: tomfraPosted on 2007-01-04 at 11:39:13ID: 18245853

I have just little experience with all of this "authentication stuff" to be honest. I have looked at the http://www.openldap.org website and it would take me days, if not longer, to digest all the necessary information. The eDirectory from Novell may be an overkill for what I need and it's priced per user (although reasonably in my opinion).

I feel like there got to be a simpler and more obvious solution? But if there is not, would someone more knowledgeable in this field be willing to find a solution for me, for a reasonable price? I am not sure if I am allowed to ask for such kind of help in here and if I am not, I apologize...

Tomas
tomfra[AT]centrum.cz

 

by: ravenplPosted on 2007-01-04 at 12:21:20ID: 18246293

> I'd much prefer if the user had to login just once for both (or several) instances
Unfortunatelly it's browser problem. And since browser knows, that it swiched to new proxy, it will not use credentials from the first. I don't know how to tell browser that two different proxies(IP:port) are he same in fact.

You could present just one IP:port for users, then You could redirect it to different real proxies. It can be done with iptables or another load-balance service.
In such case browser would think it still connects to same proxy.

> On the same topic
As above.

 

by: tomfraPosted on 2007-01-04 at 12:34:28ID: 18246410

ravenpl: this would solve the problem only partially in this particular case I am afraid... Some of the proxy servers will be at different locations (different countries) and I'd like to offer the users to choose which of the proxy server they prefer.

I believe the key here is to not use the basic authentication schema. Perhaps some solution where the user logs in which then creates a cookie on the user's computer which is then read by some external "squid helper" and passed to squid? But as I said, I do not know much about this stuff so I may be completely wrong. And I am not aware of such a solution at this time anyway...

Tomas

 

by: ravenplPosted on 2007-01-04 at 12:47:00ID: 18246528

As I said - it's browser problem, not the proxy itself. It have to be solved on the browser side, or browser have to think it still uses same proxy.
Maybe You should provide very simple local proxy(connection forwarder), which would be installed locally on browser's box. It would do nothing but will redirect connection to desired real proxy. it would be configureable wihich real proxy it should use. This way browser will always use localhost:someport proxy, and therefore will reuse same auth credentials for any proxy.

 

by: tomfraPosted on 2007-01-04 at 13:51:34ID: 18247128

That could be a solution, I'll think about it. But I realize there would be some drawbacks too - e.g. installing even a simple proxy software on the user's computer may be beyond technical skills of many users and there would need to be a MS Win & Mac OS X version of the proxy, some people have firewalls and/or company policies not allowing them to install a proxy server on their workstations etc.

I am sure there is a solution that does not need the "end users" to install anything on their PCs. I have found http://www.pubcookie.org for example but I am not sure if that would work with Squid at all or how to implement it, yet. Squid is apparently very flexible when it comes to authenticating but I feel it's extremely complex too.

Tomas

 

by: ravenplPosted on 2007-01-04 at 23:00:34ID: 18249730

about pubcookie - isn't it installed on client's side anyway?

 

by: tomfraPosted on 2007-01-05 at 00:45:51ID: 18249912

I am not against a solution that involves some kind of client software running on the user's computer as long as there is still way to authenticate using just the web browser in cases when it's not possible to install the client software. In other words, if the users have the client software installed, they have to login just once (or simply have the client software / daemon running). If they don't, they can still use the proxy servers - but they will have to log into each of them separately.

This is completely OK. However, if possible at all, there should be also a Mac OS X version of such software. I could probably have something like that coded though. A similiar approach, and I'd prefer that, would be authentizing the user through a public/private key pair. I.e.: If there is the right certificate installed on the client's computer, they are authomatically authenticated on all of the proxies. Since web browsers can have the certificates stored and can work with them directly, there would be no need for any client software. But as before, this is somewhat beyond my expertise so I may be wrong. But it would be a very "clean" and secure solution in my opinion.

Tomas

 

by: tomfraPosted on 2007-01-05 at 03:26:54ID: 18250413

When researching futher this issue, I found references to "kerberos" - http://web.mit.edu/kerberos/ . From what I understood, it uses "tickets" to authenticate users which someone compared to public/private key authentication. I have also seen mentioned it as one of the auth. solutions for Squid, but with too few details given. Does anyone have experience with this "kerberos"?

Tomas

 

by: ravenplPosted on 2007-01-05 at 03:39:36ID: 18250448

You seem don't understand the issue. Browser will want another ticket for other proxy. The key is to make browser think that it still connects to same proxy.

 

by: tomfraPosted on 2007-01-05 at 03:58:50ID: 18250516

I see... OK, let's forget about Kerberos for now as it probably only complicates it.

But if there was a certificate installed in the web browser repository (or wherever they can be stored), allowing access to all the squid servers, wouldn't that solve the problem? I mean, when the user skips from one squid server to another I understand they got to authenticate again. However, if instead of a username/password prompt there was a check for the presence of the certificate, the authentication would be "automatic" and the user would not have to interfere with the process at all, right?

I accept the fact there may be no way than to authenticate at each of the servers separately. I just don't want the users to have to do all of the authentications by hand - e.g. by entering their username/password combo into a popup window. If the process takes place "in the background", I am fine with that.

Tomas

 

by: ravenplPosted on 2007-01-05 at 04:05:10ID: 18250545

> the authentication would be "automatic" and the user would not have to interfere with the process at all, right?
Would have to choose the certificate to use. But it's way simpler than entering user/pass.
But - personally I don't know how to configure such thing.

 

by: tomfraPosted on 2007-01-06 at 13:56:48ID: 18259538

OK, I have been thinking about something that would work for a *very* long time and I think I found it. I have yet to test it but I believe it will work. It's too late today, I will post the details tomorrow. Let's see if it actually will work ;)

Tomas

 

by: Tachyon_1Posted on 2007-01-17 at 14:54:37ID: 18336876

Here's how I did it.

I configured Squid to authenticate by user.
As an aside here, all my netlogon scripts for each user (eg boblogon.bat) contain a line that calls another script called 'everyone.bat'
The everyone script is where I put commands that I want all users to run at start up. This way most of my script customizing only has to happen once.
Now, in the everyone script I add a line to run a Windows identd client from a directory on the server.
Voila, you now have automatically authenticated Squid users. A side benefit is that all your Squid logs will now include user names, not just IP's. Makes tracking troublemakers down easier too.

As for other OS's, Linux and AFAIR, MacOS come with identd, you just need to enable it from your admin console.

Here's some sources for identd clients. (no warranty from me)

Retina Scan IDENT for windows - https://sourceforge.net/projects/retinascan
Microsoft Windows XP/2000/NT - http://freeware.teledanmark.no/identd
Microsoft Windows 9x - http://identd.sourceforge.net

Good luck with this. I've been using it for years now to filter Squidguard users where IP address won't help (ie DHCP, multiple users per box/different shifts etc.) and it works very well. It allows some nice, fine grained filtering.

At home you can use it on your Linux firewall to filter the kids from porn, gambling, hacking, (MySpace arggh!) etc. And I even use it to disable access entirely during certain hours/days.


 

by: Tachyon_1Posted on 2007-01-17 at 15:00:11ID: 18336907

Whoops, the old identd port is a dead link. Sorry, but Retinascan still works. So does the version for 9x.

 

by: Tachyon_1Posted on 2007-01-17 at 15:15:16ID: 18336994

Heh, me again.... I forgot about your second half.

You need to setup a parent Squid cache server and make the others children or siblings.

Then in your squid.conf make sure you add the appropriate "cache_peer" lines.
See the Squid docs for more on setting this up. But basically the other servers will have to have a line something like:
cache_peer cache.parentbox.example parent 3128 3130

I also like to install Squidguard as well as Squid and setup s script to fetch and install the latest blocklists.

Later.

 

by: Tachyon_1Posted on 2007-01-17 at 15:16:41ID: 18337006

Hit somewhere like
http://www.visolve.com/squid/squid24s1/contents.php
For more Squid help.

 

by: tomfraPosted on 2007-01-21 at 04:29:14ID: 18359394

I apologize I haven't replied to the suggestions for so long. OK, I've decided that this problem will be best solved by installing a client-side application that will use SSH tunelling to different proxy servers but will always keep the same settings in MSIE & Firefox, therefore the user will be prompted for the username & password only once - just as ravenpl suggested.

It's not a solution I'd normally prefer but it's an acceptable one in my opinion and beside, with the SSH tunelling there will be some "security advantage" too so it's a good compromise actually.

Tachyon_1: Your suggestions sound interesting too, I'll test some of that stuff if I find some time.

Thanks!

Tomas

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...