Here is the deal, I pulled this irule off of a Dartmouth site. Dartmouth did a study where they were able to get CAC authentication to work using an irule. Here is the rule.
when CLIENTSSL_CLIENTCERT {
if { [SSL::verify_result] } {
log LOCAL0.warn “Client cert didn’t verify, openssl code=[SSL::verify_result]”
reject
}
}
when HTTP_REQUEST {
Eliminate any inbound spoofed authentication headers
if { [HTTP::header exists F5PKI_CN] } {
log LOCAL0.warn “removed inbound F5PKI_CN header - possible attack”
reject
}
if { [SSL::cert count] != 0 } {
User authenticated with PKI, so get PKI DN
set subject { }
lappend subject [X509::subject [SSL::cert 0]]
Parse out the DN fields we need and set outbound header values
foreach entry [ split $subject / ] {
foreach {name value} [ split $entry = ] {
switch $name {
CN {
HTTP::header replace F5PKI_CN $value
}
OU {
HTTP::header replace F5PKI_OU $value
}
UID {
HTTP::header replace F5PKI_UID $value
}
}
}
}
}
}
we currently are using a 2400 with an 80 and 443 VIP. The 80 Vip has this irule attached. We have a pool of sharepoint servers that we are trying to get CAC authentication and Single sign on to. If anyone has any ideas as to why this hasn’t worked or what we can do to make this work please I am all ears.