Forum Discussion
newbie_89507
Nimbostratus
Sep 11, 2009Irule for SSL client authentication
i m new in this forum and new in F5 world. Recently bought F5 running 9.4.7 ver.
I have virtual server with valid SSL certificate. I need to write an irule so that when client...
newbie_89507
Nimbostratus
Sep 11, 2009in this irule would be enough
class my_thumbprint_list {
"Thumbprint= 9e 0f 40 e2 43 1c"
}
3. Add this iRule:
when RULE_INIT {
set ::org "O=my Organisation"
}
when CLIENTSSL_CLIENTCERT {
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]]
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_thumbprint_list]) and ($subject_dn contains $::org) } {
Accept the client cert
log "Client Certificate Accepted: $subject_dn"
} else {
log "No Matching Client Certificate Was Found Using: $subject_dn"
reject
}
}
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