Forum Discussion
rc_mike_110258
Nimbostratus
Jun 02, 2009Log client certificate to a file
Hello group,
I have configured the following iRule for insert the client certificate in a header named x-client-cert for an https virtual server.
I'm looking for a way to log the client certificate send by the user to a log file in the f5 in PEM format.
At the same time, is there any way to log an alarm when the client send a invalid client certificate (that is, expired cert, revoked cert...)? I’m looking in the f5 logs and can't find any trace when a client tries to access whit an invalid client certificate.
=============
when CLIENTSSL_CLIENTCERT
{
set cur [SSL::sessionid]
set ask [session lookup ssl $cur]
if { $ask eq "" } {
session add ssl [SSL::sessionid] [SSL::cert 0]
}
}
when HTTP_REQUEST
{
set id [SSL::sessionid]
set the_cert [session lookup ssl $id]
if { $the_cert != ""}
{
HTTP::header insert x-client-cert [b64encode $the_cert]
}
}
=============
Thank you in advance,
Miguel Ángel.
- Colin_Walker_12Historic F5 AccountMiguel,
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