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\””

}

}

Hi Jeff,

Can you try this?

when HTTP_REQUEST {

if {[HTTP::password] eq ""}{

HTTP::respond 401 WWW-Authenticate "Basic realm=\"local.loc\""
} else {
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 {
HTTP::respond 403 content "blocked!"
}
}
}

Aaron

it came back with:

The website declined to show this webpage

and the F5 logs showed:

User XXX has been authorized to access virtual server /Common/XXXXXXXXXX

If you take the iRule off of the virtual server are you able to access the pool?

Aaron

i just noticed something, the second time the userid/password auth screen comes back is says something about “Sling (Development)” which is not us.

yes, if you take the irule off it goes where it should… one of our websites

can you see an attachment i just attached ?

can you see this attachment?

server.jpg

ok, one more time…

I am quickly thinking everything is working as it should but the website sees the AUTH request and somehow the JAVA on the site is reacting…

I cleared all caches

I took the irule out of the VIP

the website came up with no problem

I put your irule back in, and its not saying blocked or anything, its just looping the userid and password again..

so now I am back to square one.

would cookie persistence make any difference?