Forum Discussion
William_Them_99
Nimbostratus
Jun 15, 2005Redirect after when AUTH_FAILURE
We have iRules to handle authentication of client cert attributes against an LDAP tree. Right now, when the user fails to authenticate with LDAP, the code does this:
when AUTH_F...
Carla_Molenda_1
Nimbostratus
Jul 21, 2005I have picked up where Bill left off and still cannot get this to work.
The AUTH_FAILURE does fire (I'm not sure if it is because I turned on mod SSL) but when I tried adding the http respond to the AUTH_FAILURE event I get an "operation not supported" in the log. HTTP::redirect and HTTP::uri will not even get saved after updating the iRules. I have also tried setting flags as seen in numerous other appends, but the setting does not get carried outside the AUTH event. I can see the variable get set in the AUTH, but by the time the next even hits, the value is not what it was set to inside the AUTH event (for both successes or failures). I have queried the value in numerous events but it never is the one set in the AUTH event. I was going to try AUTH::status but did not know how to get the authid. When I tried adding AUTH::last_event_session_id inside the HTTP_REQUEST I received an error in the log.) This is the current irule on the server (we have CLIENTSSL_CLIENTCERT events in the AUTH profiles).
when AUTH_SUCCESS
{
log local0. "auth_success"
set auth_code 0
if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]}
{
SSL::handshake resume
}
}
when AUTH_FAILURE
{
log local0. "auth_failure"
set auth_code 1
if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]}
{
log local0. "auth_failure - reject, auth_code is $auth_code"
reject
HTTP::respond 303 content http://myhost /Errors/AuthenticationFailed.html
}
}
when AUTH_WANTCREDENTIAL
{
log local0. "auth_wantcredential"
if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]}
{
reject
}
}
when AUTH_ERROR
{
log local0. "auth_error"
if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]}
{
reject
}
}
when HTTP_REQUEST {
log local0. "in http request, auth_code is $auth_code"
if {$auth_code eq 1} {
log local0. "Found Error in http request"
HTTP::redirect http://myhost/Errors/AuthenticationFailed.html
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
