Forum Discussion
Muhammad_Irfan1
Cirrus
Dec 11, 2014Client authentication is set to require but not getting any log from this iRule
when CLIENTSSL_CLIENTCERT {
Debug flag
set debug 1
Check if client presented a cert after it was requested/required
if {[SSL::cert count] > 0}{
Client presented at least one cert. ...
Michael_Jenkins
Cirrostratus
Dec 12, 2014To accomplish what you're asking, I reworked the iRule a little bit to clean up the code a little bit. Only thing you may have to change is the [SSL::cert 0] to [SSL::cert 1] if you get an error, as I'm not sure if its a 0 or 1 based array. See if that helps.
when CLIENTSSL_CLIENTCERT {
Debug flag
set debug 1
if {$debug >= 1} {
Check if client presented a cert after it was requested/required
if {[SSL::cert count] > 0} {
Loop through each cert and log the cert subject, issuer and serial number
log local0. "[IP::client_addr]:[TCP::client_port]: subject=[X509::subject [SSL::cert 0]]"
} else {
log local0. "[IP::client_addr]:[TCP::client_port]: No client cert found!"
}
}
}
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