Forum Discussion
Mathew_58739
Nimbostratus
May 17, 2007Insert SSL certificate name into HTTP header
I have a customer that wants the SSL certificate name instead of the ClientIP address re-inserted into the HTTP header. I need some help???
4 Replies
- Check out this example in CodeShare
http://devcentral.f5.com/wiki/default.aspx/iRules/InsertCertInServerHeaders.html
Click here - Mathew_58739
Nimbostratus
Ok. Thank you for the example. My rule is relatively simple then.... all I should need is:
when HTTP_REQUEST {
HTTP::header insert SSLClientCert
} else {
reject
}
Do you know what value I need for the SSLClientCert ? I want to be able to insert the client certificate name. For example, myserver.domain.com. - Mathew_58739
Nimbostratus
I have an updated rule to consider......
when CLIENTSSL_CLIENTCERT {
set sslcert_cn [SSL::cert 0]
}
when HTTP_REQUEST {
HTTP::header insert ClientSSL $sslcert_cn
}
I don't know what value use in the [SSL::cert 0] location to ensure that I am capturing the Common Name. Can you help? - hoolio
Cirrostratus
Take a look at the X509:: commands on the wiki (Click here).
I think '[X509::subject [SSL::cert 0]]' should work, but I haven't tested it with a client cert.
Aaron
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