Forum Discussion
Stanislas_Piro2
Sep 07, 2017Cumulonimbus
Hi,
you can do it without an irule event (what is not optimal usage or APM) but with the following expression in
variable assign
set extension [mcget {session.ssl.cert.x509extension}];
if {[set tempupn [string range $extension [expr {[string first "othername:UPN<" $extension] +14}] [expr {[string last ">" $extension] -1}] ]] != ""} {
return $tempupn;
} elseif {[regexp {\d{10,16}} [mcget {session.ssl.cert.subject}] tempiv]} {
return "$tempiv@company";
}