Skip to content

Commit

Permalink
Specify default logger in app.CopyAndConfigureTLS (#47964)
Browse files Browse the repository at this point in the history
As some code begins migrating to slog, there will be no logrus
logger to provide to this function. Until the transition is
complete, allow a nil logger to be provided and use the default
logger instead.
  • Loading branch information
rosstimothy authored Oct 28, 2024
1 parent 4a97811 commit c68be3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/srv/app/connections_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,9 @@ func (c *ConnectionsHandler) deleteConnAuth(conn net.Conn) {
// for Teleport application proxy servers.
func CopyAndConfigureTLS(log logrus.FieldLogger, client authclient.AccessCache, config *tls.Config) *tls.Config {
tlsConfig := config.Clone()
if log == nil {
log = logrus.StandardLogger()
}

// Require clients to present a certificate
tlsConfig.ClientAuth = tls.RequireAndVerifyClientCert
Expand Down

0 comments on commit c68be3f

Please sign in to comment.