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_FAILURE
{
if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]}
{
reject
}
}
This results in a default "This Page Cannot Be Displayed" error in Internet Explorer. We would rather have the user be redirected to a page that can inform them of why they cannot access the requested resource.
Since I can't place the HTTP::uri "mypage.html" within the when AUTH_FAILURE statement, how can this be accomplished?
Thanks for the help.
- William_Them_99
Nimbostratus
This is our Auth rule:when CLIENTSSL_CLIENTCERT { set issuer [X509::issuer [SSL::cert 0]] if {$issuer contains "Verisign"} { log local0. "Issuer is $issuer" log local0. "Setting to profile test_ldap Verisign" set myprofilename "test_ldap_profile" set tmm_auth_ssl_cc_ldap_sid [AUTH::start pam $myprofilename] AUTH::cert_credential $tmm_auth_ssl_cc_ldap_sid [SSL::cert 0] AUTH::authenticate $tmm_auth_ssl_cc_ldap_sid SSL::handshake hold } } when AUTH_SUCCESS { log local0. "auth_success" if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]} { SSL::handshake resume } } when AUTH_FAILURE { if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]} { reject } } when AUTH_WANTCREDENTIAL { if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]} { reject } } when AUTH_ERROR { if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]} { reject } }
- unRuleY_95363Historic F5 AccountPerhaps you want to add it as an "else" clause after the "if { $issuer contains "Verisign" } {...}"?
- Carla_Molenda_1
Nimbostratus
I have picked up where Bill left off and still cannot get this to work. - Tao_Liu_90341Historic F5 AccountThat is because client cert auth happened before HTTP was active. You may have to postpone auth, try to replace CLIENTSSL_CLIENTCERT with HTTP_REQUEST if this delay is acceptable.
- Carla_Molenda_1
Nimbostratus
Thanks very much. This worked for us.
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