Jeff_Knights_44
Dec 06, 2012Nimbostratus
local HTTP auth looping? HELP!!!
I recently built a simple irule to do a local HTTP authentication from a datagroup which would block the public from seeing a beta website.
I have watched the logs and it says "User XXX has been authorized to access virtual server /Common/TEST_SERVER
so it seems the irule is working correctly but the website never comes up, the userid and password screen keep coming up as if in a loop. any suggestions?
here is the irule:
when HTTP_REQUEST {
binary scan [ md5 [HTTP::password]] H* password
if { [class lookup "[HTTP::username]" datagroup_xxx] equals $password } {
log local0. "User [HTTP::username] has been authorized to access virtual server [virtual name]"
Insert iRule-based application code here if necessary
} else {
if { [string length [HTTP::password]] != 0 } {
log local0. "User [HTTP::username] has been denied access to virtual server "
}
HTTP::respond 401 WWW-Authenticate "Basic realm=\"local.loc\""
}
}