Slack Mutual TLS Recipe: Adding X-Client-Certificate-SAN header from client certificate
Published Jul 10, 2019
Version 1.0Was this article helpful?
For the CN it would be the following.
when HTTP_REQUEST {
if {[SSL::cert 0] ne ""}{
set tmpcn [X509::subject [SSL::cert 0]]
set cn [findstr $tmpcn "CN=" 3]
HTTP::header replace X-Client-Certificate-SAN $cn
} else {
HTTP::header remove X-Client-Certificate-SAN
}
}