Skip to content

Commit

Permalink
Undo #11062 since it breaks the nginx config (#11082)
Browse files Browse the repository at this point in the history
* [mTLS] Fix acme verfication when mTLS and Client CN verification is enabled

* revert mTLS location excluding acme-challenge since each location will match ultimately resulting in 404 for all request paths
  • Loading branch information
bossm8 committed Mar 9, 2024
1 parent 157e53b commit 9c384c7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rootfs/etc/nginx/template/nginx.tmpl
Expand Up @@ -985,10 +985,8 @@ stream {

{{ if not ( empty $server.CertificateAuth.MatchCN ) }}
{{ if gt (len $server.CertificateAuth.MatchCN) 0 }}
location ~ ^/(?!(\.well-known/acme-challenge)) {
if ( $ssl_client_s_dn !~ {{ $server.CertificateAuth.MatchCN }} ) {
return 403 "client certificate unauthorized";
}
if ( $ssl_client_s_dn !~ {{ $server.CertificateAuth.MatchCN }} ) {
return 403 "client certificate unauthorized";
}
{{ end }}
{{ end }}
Expand Down

0 comments on commit 9c384c7

Please sign in to comment.