Forum Discussion

chin_15339's avatar
chin_15339
Icon for Nimbostratus rankNimbostratus
Apr 29, 2017

conditional statement for Client Cert CN checking and redirecting accordingly is not working

when RULE_INIT { set static::debug 1 }

 

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]] if { $subject_dn != "" }{ if { $static::debug }{ log "Client Certificate received: $subject_dn"} } } when HTTP_REQUEST { if { [HTTP::host] contains "192" } { if { $subject_dn contains "CN=Vinit-A" } { HTTP::redirect "/vinit-A.html" pool test } } elseif { $subject_dn contains "CN=Vinit-B" } { HTTP::redirect "/vinit-B.html" pool test } elseif { $subject_dn contains "CN=Vinit-C" } { HTTP::redirect "/vinit-C.html" pool test } elseif { $subject_dn contains "CN=Vinit-D" } { HTTP::redirect "/vinit-D.html" pool test } }

 

No RepliesBe the first to reply