Forum Discussion
U_franco_117956
Nimbostratus
Jan 20, 2015LTM as a proxy asking username/password
Hi. I´m involved to develop an irule in order to get LTM worked as a basic proxy server for vservers where irule was configured, asking for a username password in the same way you were being auth...
Michael_Jenkins
Cirrostratus
Jan 20, 2015So what about if you add some more logging. Do you get anything then?
when HTTP_REQUEST {
log local0. "Testing Proxy-Authorization"
log local0. " Headers:"
foreach name [HTTP::header names] {
log local0. " ${name}: [HTTP::header value $name]"
}
if { not ([HTTP::header exists "Proxy-Authorization"]) } {
log local0. " NO PROXY-AUTHENTICATE HEADER. Returning 407"
HTTP::respond 407 Proxy-Authenticate "BASIC realm=\"PROXY X\""
} else {
log local0. " PROXY-AUTHENTICATE HEADER exists."
log local0. " Value: [HTTP::header value "Proxy-Authorization"]"
set proxyauth [lindex [split [HTTP::header value "Proxy-Authorization"] " "] 1]
set username [lindex [split [b64decode $proxyauth] ":"] 0 ]
set password [lindex [split [b64decode $proxyauth] ":"] 1 ]
log local0. " PROXY-AUTHORIZATION HEADER IS $proxyauth, USERNAME IS $username AND PASSWORD IS $password"
if {not ($username equals "useraaa" and $password equals "aaauser") } {
HTTP::redirect "http://sorrypage.aaaaa.com"
}
}
}
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