Forum Discussion
Robert_Decker_2
Nimbostratus
Apr 21, 2006how to add client cert info to ocsp request
Could somebody tell me how to include ssl cert info into the following irule listed below.
when CLIENT_ACCEPTED {
set tmm_auth_ssl_ocsp_sid [AUTH::start pam default_ssl_ocsp]
}
when CLIENTSSL_CLIENTCERT {
AUTH::cert_credential $tmm_auth_ssl_ocsp_sid [SSL::cert 0]
AUTH::cert_issuer_credential $tmm_auth_ssl_ocsp_sid [SSL::cert issuer 0]
AUTH::authenticate $tmm_auth_ssl_ocsp_sid
SSL::handshake hold
set id [SSL::sessionid]
}
when AUTH_SUCCESS {
if {$tmm_auth_ssl_ocsp_sid eq [AUTH::last_event_session_id]} {
SSL::handshake resume
set Z "success"
session add ssl $id $Z
}
}
when AUTH_FAILURE {
if {$tmm_auth_ssl_ocsp_sid eq [AUTH::last_event_session_id]} {
SSL::handshake resume
set Z "redirect"
session add ssl $id $Z
}
}
when AUTH_WANTCREDENTIAL {
if {$tmm_auth_ssl_ocsp_sid eq [AUTH::last_event_session_id]} {
reject
}
}
when AUTH_ERROR {
if {$tmm_auth_ssl_ocsp_sid eq [AUTH::last_event_session_id]} {
SSL::handshake resume
set Z "redirect"
session add ssl $id $Z
}
}
when HTTP_REQUEST {
set id [SSL::sessionid]
set y [session lookup ssl $id]
log local0. "y is: $y"
if { $y contains "redirect" }{
HTTP::redirect "http://x.x.x.x"
}
}
Thank you,
Rob
- Colin_Walker_12Historic F5 AccountWell, since your queston is rather generic, I can't give any specific examples, but I can certainly point you to the commands that allow you to insert whatever client data you'd like.
- Robert_Decker_2
Nimbostratus
Sorry about the generic question... I will try to do better… I am trying to add the ssl cert fields as http headers to an ssl ocsp Irule that allows redirection. Below are the fields I would like to include: - Robert_Decker_2
Nimbostratus
Below is the Irule I used to gather cert information. It works until I try to add the redirect/success statements and adding it to the session. It seems like adding that to the session overwrites the cert info. Any thoughts on how to avoid this?
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