You are not logged in.

#1 2013-05-26 10:33:43

awayand
Member
Registered: 2009-09-25
Posts: 398

squid basic authentication not working

I have setup squid as follows:

/etc/squid/squid.conf

auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off

acl ncsa_users proxy_auth REQUIRED

http_access allow ncsa_users

Then I created my passwd file:

# htpasswd -c /etc/squid/passwd user

I get the authentication dialog, but squid does not authenticate me. I think my authenticator is crashing or something, I have no clue. When I run "http_access allow ncsa_users /etc/squid/passwd" the program runs fine and does not segfault. /etc/squid/passwd is world readable.

Here is my log output of /var/log/squid/cache.log:

2013/05/26 12:25:24.811 kid1| Checklist.cc(153) preCheck: 0xb71178 checking slow rules
2013/05/26 12:25:24.811 kid1| Checklist.cc(160) checkAccessList: 0xb71178 checking 'http_access allow ncsa_users'
2013/05/26 12:25:24.812 kid1| Acl.cc(336) matches: ACLList::matches: checking ncsa_users
2013/05/26 12:25:24.812 kid1| Acl.cc(319) checklistMatches: ACL::checklistMatches: checking 'ncsa_users'
2013/05/26 12:25:24.812 kid1| Acl.cc(281) aclCacheMatchFlush: aclCacheMatchFlush called for cache 0xb744e8
2013/05/26 12:25:24.812 kid1| Acl.cc(61) AuthenticateAcl: returning 2 sending credentials to helper.
2013/05/26 12:25:24.812 kid1| Acl.cc(321) checklistMatches: ACL::ChecklistMatches: result for 'ncsa_users' is -1
2013/05/26 12:25:24.812 kid1| Acl.cc(339) matches: ACLList::matches: result is false
2013/05/26 12:25:24.812 kid1| Checklist.cc(275) matchNode: 0xb71178 matched=0 async=1 finished=0
2013/05/26 12:25:24.812 kid1| Checklist.cc(312) matchNode: 0xb71178 going async
2013/05/26 12:25:24.812 kid1| Checklist.cc(131) asyncInProgress: ACLChecklist::asyncInProgress: 0xb71178 async set to 1
2013/05/26 12:25:24.813 kid1| AclProxyAuth.cc(144) checkForAsync: checking password via authenticator
2013/05/26 12:25:24.813 kid1| Checklist.cc(256) matchNodes: 0xb71178 awaiting async operation
2013/05/26 12:25:24.813 kid1| WARNING: basicauthenticator #1 exited
2013/05/26 12:25:24.813 kid1| Too few basicauthenticator processes are running (need 1/5)
2013/05/26 12:25:24.813 kid1| Starting new helpers
2013/05/26 12:25:24.813 kid1| helperOpenServers: Starting 1/5 'basic_ncsa_auth' processes
2013/05/26 12:25:24.831 kid1| Checklist.cc(131) asyncInProgress: ACLChecklist::asyncInProgress: 0xb71178 async set to 0
2013/05/26 12:25:24.831 kid1| Checklist.cc(160) checkAccessList: 0xb71178 checking 'http_access allow ncsa_users'
2013/05/26 12:25:24.831 kid1| Acl.cc(336) matches: ACLList::matches: checking ncsa_users
2013/05/26 12:25:24.831 kid1| Acl.cc(319) checklistMatches: ACL::checklistMatches: checking 'ncsa_users'
2013/05/26 12:25:24.831 kid1| Acl.cc(66) AuthenticateAcl: returning 3 sending authentication challenge.
2013/05/26 12:25:24.831 kid1| Checklist.cc(146) markFinished: 0xb71178 answer AUTH_REQUIRED for AuthenticateAcl exception
2013/05/26 12:25:24.831 kid1| Acl.cc(321) checklistMatches: ACL::ChecklistMatches: result for 'ncsa_users' is -1
2013/05/26 12:25:24.831 kid1| Acl.cc(339) matches: ACLList::matches: result is false
2013/05/26 12:25:24.831 kid1| Checklist.cc(275) matchNode: 0xb71178 matched=0 async=0 finished=1
2013/05/26 12:25:24.832 kid1| Checklist.cc(294) matchNode: 0xb71178 exception: AUTH_REQUIRED
2013/05/26 12:25:24.832 kid1| Checklist.cc(88) matchNonBlocking: ACLChecklist::check: 0xb71178 match found, calling back with AUTH_REQUIRED
2013/05/26 12:25:24.832 kid1| Checklist.cc(182) checkCallback: ACLChecklist::checkCallback: 0xb71178 answer=AUTH_REQUIRED
2013/05/26 12:25:24.832 kid1| Gadgets.cc(58) aclGetDenyInfoPage: got called for ncsa_users
2013/05/26 12:25:24.832 kid1| Gadgets.cc(77) aclGetDenyInfoPage: aclGetDenyInfoPage: no match
2013/05/26 12:25:24.832 kid1| FilledChecklist.cc(77) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0x7fffa1efef70
2013/05/26 12:25:24.832 kid1| Checklist.cc(334) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0x7fffa1efef70
2013/05/26 12:25:24.832 kid1| FilledChecklist.cc(77) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0x7fffa1eff090
2013/05/26 12:25:24.832 kid1| Checklist.cc(334) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0x7fffa1eff090
2013/05/26 12:25:24.833 kid1| FilledChecklist.cc(77) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0xb71178
2013/05/26 12:25:24.833 kid1| Checklist.cc(334) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0xb71178
2013/05/26 12:25:24.833 kid1| FilledChecklist.cc(77) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0xb71178
2013/05/26 12:25:24.833 kid1| Checklist.cc(334) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0xb71178
2013/05/26 12:25:27.344 kid1| Checklist.cc(153) preCheck: 0xb71178 checking slow rules
2013/05/26 12:25:27.344 kid1| Checklist.cc(160) checkAccessList: 0xb71178 checking 'http_access allow ncsa_users'
2013/05/26 12:25:27.344 kid1| Acl.cc(336) matches: ACLList::matches: checking ncsa_users
2013/05/26 12:25:27.344 kid1| Acl.cc(319) checklistMatches: ACL::checklistMatches: checking 'ncsa_users'
2013/05/26 12:25:27.345 kid1| Acl.cc(66) AuthenticateAcl: returning 3 sending authentication challenge.
2013/05/26 12:25:27.345 kid1| Checklist.cc(146) markFinished: 0xb71178 answer AUTH_REQUIRED for AuthenticateAcl exception
2013/05/26 12:25:27.345 kid1| Acl.cc(321) checklistMatches: ACL::ChecklistMatches: result for 'ncsa_users' is -1
2013/05/26 12:25:27.345 kid1| Acl.cc(339) matches: ACLList::matches: result is false
2013/05/26 12:25:27.345 kid1| Checklist.cc(275) matchNode: 0xb71178 matched=0 async=0 finished=1
2013/05/26 12:25:27.345 kid1| Checklist.cc(294) matchNode: 0xb71178 exception: AUTH_REQUIRED
2013/05/26 12:25:27.345 kid1| Checklist.cc(88) matchNonBlocking: ACLChecklist::check: 0xb71178 match found, calling back with AUTH_REQUIRED
2013/05/26 12:25:27.345 kid1| Checklist.cc(182) checkCallback: ACLChecklist::checkCallback: 0xb71178 answer=AUTH_REQUIRED
2013/05/26 12:25:27.345 kid1| Gadgets.cc(58) aclGetDenyInfoPage: got called for ncsa_users
2013/05/26 12:25:27.345 kid1| Gadgets.cc(77) aclGetDenyInfoPage: aclGetDenyInfoPage: no match
2013/05/26 12:25:27.345 kid1| FilledChecklist.cc(77) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0x7fffa1efe4d0
2013/05/26 12:25:27.345 kid1| Checklist.cc(334) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0x7fffa1efe4d0
2013/05/26 12:25:27.345 kid1| FilledChecklist.cc(77) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0x7fffa1efe5f0
2013/05/26 12:25:27.345 kid1| Checklist.cc(334) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0x7fffa1efe5f0
2013/05/26 12:25:27.345 kid1| FilledChecklist.cc(77) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0xb71178
2013/05/26 12:25:27.346 kid1| Checklist.cc(334) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0xb71178
2013/05/26 12:25:27.346 kid1| FilledChecklist.cc(77) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0xb71178
2013/05/26 12:25:27.346 kid1| Checklist.cc(334) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0xb71178

Any pointers greatly appreciated!

Offline

Board footer

Powered by FluxBB