Forum Discussion
Jeff_Knights_44
Nimbostratus
Dec 06, 2012local 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 be...
hoolio
Cirrostratus
Dec 06, 2012Hi 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
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects