Skip to content

Commit

Permalink
[mTLS] Fix acme verfication when mTLS and Client CN verification is e…
Browse files Browse the repository at this point in the history
…nabled (#11062)
  • Loading branch information
bossm8 committed Mar 8, 2024
1 parent f3a4f07 commit 7d12628
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rootfs/etc/nginx/template/nginx.tmpl
Expand Up @@ -985,8 +985,10 @@ stream {

{{ 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";
location ~ ^/(?!(\.well-known/acme-challenge)) {
if ( $ssl_client_s_dn !~ {{ $server.CertificateAuth.MatchCN }} ) {
return 403 "client certificate unauthorized";
}
}
{{ end }}
{{ end }}
Expand Down

0 comments on commit 7d12628

Please sign in to comment.