LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-23-2009, 07:17 AM   #1
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Using LDAP authentication only on one cache_peer in Squid


Hello all,

I'm trying to configure Squid to ask for authentication using LDAP but ONLY on one cache_peer. Before I had it activated on all servers and it worked perfectly. All the other webservers however have their own authentication except this wiki.

This is what I have in my squid.conf in regards to this particular site.
Code:
cache_peer 172.25.XXX.XXX parent 80 0 no-query originserver name=wiki
acl site_wiki dstdomain wiki.tradisa.com
cache_peer_access wiki allow site_wiki
auth_param basic program /lib/squid3/squid_ldap_auth -R -b "dc=domain,dc=es" -D "cn=squid,cn=Users,dc=domain,dc=es" -w "ldapuser" -f sAMAccountName=%s -h 172.25.XXX.XXX
auth_param basic children 1
auth_param basic credentialsttl 5 minutes
cache_peer_access wiki deny all
acl wiki_users proxy_auth REQUIRED
cache_peer_access wiki allow wiki_users
however I go straight to the website without it asking for authentication.

LDAP authentication is working perfectly, it's just an error in my definition as stated above. I'm missing something but I cannot see it. Of course IPs and names have been changed before posting.

All help is greatly appreciated.

Kind regards,

Eric
 
Old 11-24-2009, 07:02 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805

Original Poster
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Update Squid and LDAP

Hi all,

Small update. With the help of the squid mailing list I got some things changed already. My peer config looks like this for the one that has to authenticate.

Code:
other peer definitions

cache_peer 172.25.XX.XX parent 80 0 no-query originserver name=wiki
auth_param basic program /lib/squid3/squid_ldap_auth -R -b
"dc=domain,dc=es" -D "cn=squid,cn=Users,dc=domain,dc=es" -w
"ldapuser" -f sAMAccountName=%s -h 172.25.XX.XXX
auth_param basic children 1
auth_param basic credentialsttl 5 minutes
acl site_wiki dstdomain wiki.domain.com
acl wiki_users proxy_auth REQUIRED
cache_peer_access wiki allow site_wiki
cache_peer_access wiki allow wiki_users

other peer definitions

http_access deny site_people CONNECT !SSL_ports
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access allow localhost
http_reply_access allow all
http_access allow wiki_users site_wiki
http_access allow all
Trouble is that now I get prompted for ALL the peers to pass the
credentials which is not what I want. I'm going nuts with this thing.
I know it has something to do with the sequence the lines are in but
cannot see the trees through the forest any more.

Any help is greatly appreciated.

Kind regards,

Eric
 
Old 11-27-2009, 12:09 AM   #3
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805

Original Poster
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi guys and girls,

Is there really nobody who has an idea on this one?

<bump>

Kind regards,

Eric
 
Old 12-03-2009, 01:01 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805

Original Poster
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

I've been looking all over Google for quite some time now without finding a solution. Is there anybody that can help me out on this one please?

Thanks in advance.

Kind regards,

Eric
 
Old 12-03-2009, 06:46 AM   #5
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
Quote:
Originally Posted by EricTRA View Post
Hi,

I've been looking all over Google for quite some time now without finding a solution. Is there anybody that can help me out on this one please?

Thanks in advance.

Kind regards,

Eric
You have an acl for wiki_user, manager, etc. but you are not declaring them before hand


Code:
other peer definitions

cache_peer 172.25.XX.XX parent 80 0 no-query originserver name=wiki
auth_param basic program /lib/squid3/squid_ldap_auth -R -b
"dc=domain,dc=es" -D "cn=squid,cn=Users,dc=domain,dc=es" -w
"ldapuser" -f sAMAccountName=%s -h 172.25.XX.XXX
auth_param basic children 1
auth_param basic credentialsttl 5 minutes
acl site_wiki dstdomain wiki.domain.com
acl wiki_users proxy_auth REQUIRED
cache_peer_access wiki allow site_wiki
cache_peer_access wiki allow wiki_users
acl ldap_manager ldap_auth static 'CN=Manager,OU=Users,dc=domain,dc=es'
acl ldap_wikiusers ldap_auth static 'CN=wiki_users,OU=Users,dc=domain,dc=es'

other peer definitions

http_access deny site_people CONNECT !SSL_ports
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access allow localhost
http_reply_access allow all
http_access allow wiki_users site_wiki
http_access allow all
 
Old 12-03-2009, 07:01 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805

Original Poster
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello slimm609,

First of all let me thank you for replying. I just changed my config to include the line you pointed out but got an error:
Code:
Starting Squid HTTP Proxy 3.0: squid32009/12/03 13:56:01| aclParseAclLine: Invalid ACL type 'ldap_auth'
I cannot find anyting about a ldap_auth type in the documentation.

Kind regards,

Eric
 
Old 12-03-2009, 08:04 AM   #7
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
Quote:
Originally Posted by EricTRA View Post
Hello slimm609,

First of all let me thank you for replying. I just changed my config to include the line you pointed out but got an error:
Code:
Starting Squid HTTP Proxy 3.0: squid32009/12/03 13:56:01| aclParseAclLine: Invalid ACL type 'ldap_auth'
I cannot find anyting about a ldap_auth type in the documentation.

Kind regards,

Eric
I think there is an additional module for the ldap_auth to work. Sorry about that


check out this site. It looks pretty straight-forward.
http://workaround.org/squid-ldap
 
Old 12-03-2009, 09:00 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805

Original Poster
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Thanks, I'll look into it tomorrow when I'm back in the office. I'll keep you up to date.

Kind regards,

Eric
 
Old 12-04-2009, 01:29 AM   #9
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805

Original Poster
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello slimm609,

That's a No Go, I get the same result as before. I can activate the LDAP authentication and it's perfectly working. The problem I'm having is that when activated it gets applied to ALL the servers in the Squid configuration and I only want it to apply to the WIKI site.

All the other sites have their login page working with LDAP against our AD, but the WIKI shows all content at once. Since a lot of that content is private I prefer to authenticate before showing that site.

The other option is to create a login page for the wiki in order to have the same workflow as for the other servers/sites.

It appears to be impossible to just indicate to use the LDAP authentication on just one peer in the configuration. Looks like an all or nothing situation.

Any ideas are more then welcome.

Kind regards,

Eric
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling squid with ldap authentication for active directory ashfaq Linux - Software 0 05-12-2008 01:55 AM
LDAP authentication for squid squid 2.6.STABLE16 release 2.fc8 farrukhndm Linux - Security 2 04-03-2008 01:57 AM
filtering by group using squid + ldap as authentication hackintosh Linux - Server 3 10-25-2007 10:49 AM
squid server with ldap authentication guy_ripper Linux - Security 2 03-09-2007 10:40 AM
Squid PAM authentication and LDAP redmat Linux - Newbie 1 09-03-2004 07:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration