fix(authn): session authn is skipped when anonymous policy is configured (#1647)

closes: #1642

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
peusebiu
2023-07-27 19:55:25 +03:00
committed by GitHub
parent abba6aa3cf
commit 635d71853e
5 changed files with 1063 additions and 819 deletions
+1 -2
View File
@@ -182,8 +182,7 @@ func (c *Controller) Run(reloadCtx context.Context) error {
if c.Config.HTTP.TLS.CACert != "" {
clientAuth := tls.VerifyClientCertIfGiven
if (c.Config.HTTP.Auth == nil || c.Config.HTTP.Auth.HTPasswd.Path == "") &&
!c.Config.HTTP.AccessControl.AnonymousPolicyExists() {
if !c.Config.IsBasicAuthnEnabled() && !c.Config.HTTP.AccessControl.AnonymousPolicyExists() {
clientAuth = tls.RequireAndVerifyClientCert
}