[management] Mask credentials in logged URLs (#8250)

This commit is contained in:
Bethuel Mmbaga
2026-10-20 13:33:46 +03:00
committed by GitHub
parent 30ea8270d6
commit 1f70970792
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -758,7 +758,7 @@ func logAgentNetworkConfig(cfg *CombinedConfig) {
// logEnvVars logs all NB_ environment variables that are currently set
func logEnvVars() {
log.Info("=== Environment Variables ===")
log.Debug("=== Environment Variables ===")
found := false
for _, env := range os.Environ() {
if strings.HasPrefix(env, "NB_") {
@@ -770,14 +770,14 @@ func logEnvVars() {
} else if strings.Contains(keyLower, "dsn") {
value = maskDSNPassword(value)
}
log.Infof(" %s=%s", key, value)
log.Debugf(" %s=%s", key, value)
found = true
}
}
if !found {
log.Info(" (none set)")
log.Debug(" (none set)")
}
log.Info("=== End Environment Variables ===")
log.Debug("=== End Environment Variables ===")
}
// maskDSNPassword masks the password in a DSN string.
+1 -1
View File
@@ -39,7 +39,7 @@ func getRedisStore(ctx context.Context, redisEnvAddr string, maxConn int) (Store
return nil, err
}
log.WithContext(subCtx).Infof("using redis cache at %s", redisEnvAddr)
log.WithContext(subCtx).Infof("using redis cache at %s", options.Addr)
return &redisStore{
StoreInterface: redisstore.NewRedis(redisClient),