added new auth-tls-match-cn annotation (#8434)
* added new auth-tls-match-cn annotation * added few more tests
This commit is contained in:
parent
81c2afd975
commit
f9372aa495
5 changed files with 116 additions and 0 deletions
|
|
@ -946,6 +946,14 @@ stream {
|
|||
|
||||
set $proxy_upstream_name "-";
|
||||
|
||||
{{ if not ( empty $server.CertificateAuth.MatchCN ) }}
|
||||
{{ if gt (len $server.CertificateAuth.MatchCN) 0 }}
|
||||
if ( $ssl_client_s_dn !~ {{ $server.CertificateAuth.MatchCN }} ) {
|
||||
return 403 "client certificate unauthorized";
|
||||
}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $server.Hostname "_" }}
|
||||
ssl_reject_handshake {{ if $all.Cfg.SSLRejectHandshake }}on{{ else }}off{{ end }};
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue