diff --git a/pkg/apiserver/middlewares/v1/tls_auth.go b/pkg/apiserver/middlewares/v1/tls_auth.go index a65a52d55..eda51d265 100644 --- a/pkg/apiserver/middlewares/v1/tls_auth.go +++ b/pkg/apiserver/middlewares/v1/tls_auth.go @@ -235,7 +235,7 @@ func (ta *TLSAuth) ValidateCert(c *gin.Context) (bool, string, error) { if revoked { return false, "", fmt.Errorf("client certificate is revoked") } - ta.logger.Infof("client OU %v is allowed vs required OU %v", clientCert.Subject.OrganizationalUnit, ta.AllowedOUs) + ta.logger.Debugf("client OU %v is allowed vs required OU %v", clientCert.Subject.OrganizationalUnit, ta.AllowedOUs) return true, clientCert.Subject.CommonName, nil } return false, "", fmt.Errorf("no verified cert in request") diff --git a/pkg/database/alerts.go b/pkg/database/alerts.go index d9d833c4f..4ce7f8072 100644 --- a/pkg/database/alerts.go +++ b/pkg/database/alerts.go @@ -894,10 +894,10 @@ func (c *Client) FlushOrphans() { } func (c *Client) FlushAgentsAndBouncers(agentsCfg *csconfig.AuthGCCfg, bouncersCfg *csconfig.AuthGCCfg) error { - log.Printf("starting FlushAgentsAndBouncers") + log.Debug("starting FlushAgentsAndBouncers") if bouncersCfg != nil { if bouncersCfg.ApiDuration != nil { - log.Printf("trying to delete old bouncers from api") + log.Debug("trying to delete old bouncers from api") deletionCount, err := c.Ent.Bouncer.Delete().Where( bouncer.LastPullLTE(time.Now().UTC().Add(*bouncersCfg.ApiDuration)), ).Where( @@ -910,7 +910,7 @@ func (c *Client) FlushAgentsAndBouncers(agentsCfg *csconfig.AuthGCCfg, bouncersC } } if bouncersCfg.CertDuration != nil { - log.Printf("trying to delete old bouncers from cert") + log.Debug("trying to delete old bouncers from cert") deletionCount, err := c.Ent.Bouncer.Delete().Where( bouncer.LastPullLTE(time.Now().UTC().Add(*bouncersCfg.CertDuration)), @@ -927,7 +927,7 @@ func (c *Client) FlushAgentsAndBouncers(agentsCfg *csconfig.AuthGCCfg, bouncersC if agentsCfg != nil { if agentsCfg.CertDuration != nil { - log.Printf("trying to delete old agents from cert") + log.Debug("trying to delete old agents from cert") deletionCount, err := c.Ent.Machine.Delete().Where( machine.LastPushLTE(time.Now().UTC().Add(*agentsCfg.CertDuration)), @@ -936,7 +936,7 @@ func (c *Client) FlushAgentsAndBouncers(agentsCfg *csconfig.AuthGCCfg, bouncersC ).Where( machine.AuthTypeEQ(types.TlsAuthType), ).Exec(c.CTX) - log.Printf("deleted %d entries", deletionCount) + log.Debugf("deleted %d entries", deletionCount) if err != nil { c.Log.Errorf("while auto-deleting expired machine (cert) : %s", err) } else if deletionCount > 0 { @@ -944,7 +944,7 @@ func (c *Client) FlushAgentsAndBouncers(agentsCfg *csconfig.AuthGCCfg, bouncersC } } if agentsCfg.LoginPasswordDuration != nil { - log.Printf("trying to delete old agents from password") + log.Debug("trying to delete old agents from password") deletionCount, err := c.Ent.Machine.Delete().Where( machine.LastPushLTE(time.Now().UTC().Add(*agentsCfg.LoginPasswordDuration)), @@ -953,7 +953,7 @@ func (c *Client) FlushAgentsAndBouncers(agentsCfg *csconfig.AuthGCCfg, bouncersC ).Where( machine.AuthTypeEQ(types.PasswordAuthType), ).Exec(c.CTX) - log.Printf("deleted %d entries", deletionCount) + log.Debugf("deleted %d entries", deletionCount) if err != nil { c.Log.Errorf("while auto-deleting expired machine (password) : %s", err) } else if deletionCount > 0 {