Forum Discussion
Client Cert Auth Failures
Do you have any idea what would cause this. I have an irule configured to do client certificate authentication. When the client accessing is IE the authentication works fine and the http headers are sent through to the pool members. But when the certificate Auth is being done using a SOAPUI method the client cert auth appears to work but then it doesn’t send through to the pool members. It is almost as if the HTTP::Collect doesn’t release when using SOAPUI.
Here is the rule:
when RULE_INIT {
set ::debug 1
}
when CLIENTSSL_CLIENTCERT {
HTTP::release
Example Subject DN: /C=AU/ST=NSW/L=Syd/O=Your Organisation/OU=Your OU/CN=John Smith
set subject_dn [X509::subject [SSL::cert 0]]
set issuer_dn [X509::issuer [SSL::cert 0]]
if {$::debug >0}{log "Client Certificate Received: $subject_dn"}
Check if the client certificate contains the correct O and a CN from the list
if { ([matchclass $subject_dn contains $::my_cn_list]) and ([matchclass $issuer_dn contains $::my_issuer_list]) } {
Accept the client cert
if {$::debug >0}{log "Client Certificate Accepted: $subject_dn"}
if {$::debug >0}{log "Client Certificate Issuer: $issuer_dn"}
} else {
if {$::debug >0}{log "No Matching Client Certificate Was Found Using: $subject_dn"}
if {$::debug >0}{log "issuer_dn = $issuer_dn"}
reject
}
}
when HTTP_REQUEST {
if {$::debug >0}{log "URI = [HTTP::uri]"}
if { [matchclass [HTTP::uri] starts_with $::requires_client_cert] } {
if { [SSL::cert count] <= 0 } {
HTTP::collect
if {$::debug >0}{log "header name IN= [HTTP::header names]"}
SSL::authenticate always
SSL::authenticate depth 9
SSL::cert mode require
SSL::renegotiate
}
}
}
when HTTP_REQUEST_SEND {
clientside {
if { [SSL::cert count] > 0 } {
if {$::debug >0}{log "header name OUT= [HTTP::header names]"}
HTTP::header insert "X-SSL-Session-ID" [SSL::sessionid]
HTTP::header insert "X-SSL-Client-Cert-Status" [X509::verify_cert_error_string [SSL::verify_result]]
HTTP::header insert "X-SSL-Client-Cert-Subject" [X509::subject [SSL::cert 0]]
HTTP::header insert "X-SSL-Client-Cert-Issuer" [X509::issuer [SSL::cert 0]]
}
}
}
Recent Discussions
Related Content
* 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