Mr_Moody
Oct 16, 2020Nimbostratus
custom error page for missing client authentication certificate
I have a working IRule below that requests a client certificate based on uri and data group list. In the event the client does not provide a valid cert I would like to redirect the user to custom html error page (hosted on another site) with further instructions. Any help would be appreciated.
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/uri1" || [HTTP::uri] starts_with "/uri2"} {
if {not [matchclass [IP::remote_addr] equals NOCERT_IP_LIST]} {
SSL::session invalidate
SSL::authenticate always
SSL::authenticate depth 9
SSL::cert mode require
set cmd "SSL::profile /Common/require_clientssl"
eval $cmd
SSL::renegotiate
event disable all
}
}
}