Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to setup a proxy service using squid and want it to authenticate against a database or another service.

There is an example config at http://wiki.squid-cache.org/ConfigExamples/Authenticate/Mysql

auth_param basic program /usr/local/squid/libexec/squid_db_auth --user someuser --password xxxx --plaintext --persist
auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 1 minute
auth_param basic casesensitive off


acl db-auth proxy_auth REQUIRED
http_access allow db-auth
http_access allow localhost
http_access deny all

the relevant snippet appears to be

auth_param basic program /usr/local/squid/libexec/squid_db_auth --user someuser --password xxxx --plaintext --persist

Do I have to replace someuser with actual username and xxxx with password?

For each user I add, do I have to add it to this config?

Ideally, I want a setup whereby, I am able to add/remove users to the service without changing the config file. Is this possible?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

--user someuser and --password xxxx are the username and password used to authenticate against the MySQL database. The proxy users must be created in the table passwd inside the squid database.

For reference: squid_db_auth manpage, how to build squid authentication helpers.

share|improve this answer
1  
thanks. I didn't realize that squid_db_auth was actually a program. It makes assumptions about db name and table names, which was throwing me off. Its man page (manpages.ubuntu.com/manpages/precise/man8/squid3_db_auth.8.html) helps. Also - a post freesoftwaremagazine.com/articles/authentication_with_squid helps in figuring out what is exactly required of such a helper. –  Nasir Dec 24 '12 at 1:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.