Decrease logs about challenged authentication schemes
What changed, and why it matters
This commit simply turns down the volume on log messages coming from BTCPayServer's security components. It changes the logging level from the default (likely Information/Debug) to Warning, so routine 'authentication scheme challenged' messages no longer fill the logs. There is no code behavior change, no bug fix, and no security vulnerability being patched.
No security action required. Review as a routine logging/operational change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds a single logging filter in two files: logging.AddFilter("BTCPayServer.Security", LogLevel.Warning);. This suppresses Information/Debug level log events from the BTCPayServer.Security namespace. The change is purely operational/log hygiene and does not alter authentication logic, authorization decisions, or any request handling.
Changed components
BTCPayServer/Program.csBTCPayServer.Tests/BTCPayServerTester.csInspect captured patch +2 / −0
diff --git a/BTCPayServer.Tests/BTCPayServerTester.cs b/BTCPayServer.Tests/BTCPayServerTester.cs
index fa4e19b..f6e1791 100644
--- a/BTCPayServer.Tests/BTCPayServerTester.cs
+++ b/BTCPayServer.Tests/BTCPayServerTester.cs
@@ -198,6 +198,7 @@ namespace BTCPayServer.Tests
logging.AddFilter("Microsoft", LogLevel.Error);
logging.AddFilter("Microsoft.EntityFrameworkCore.Migrations", LogLevel.Information);
logging.AddFilter("Fido2NetLib.DistributedCacheMetadataService", LogLevel.Error);
+ logging.AddFilter("BTCPayServer.Security", LogLevel.Warning);
// If LoggerProvider is an ILoggerProvider instance:
logging.ClearProviders();
diff --git a/BTCPayServer/Program.cs b/BTCPayServer/Program.cs
index 0cb6de7..df4a019 100644
--- a/BTCPayServer/Program.cs
+++ b/BTCPayServer/Program.cs
@@ -63,6 +63,7 @@ namespace BTCPayServer
//l.AddFilter("Microsoft.EntityFrameworkCore.Database.Command", LogLevel.Trace);
l.AddFilter("Microsoft.EntityFrameworkCore.Migrations", LogLevel.Information);
l.AddFilter("BTCPayServer.Migrations", LogLevel.Information);
+ l.AddFilter("BTCPayServer.Security", LogLevel.Warning);
l.AddFilter("System.Net.Http.HttpClient", LogLevel.Critical);
l.AddFilter("Microsoft.AspNetCore.Antiforgery.Internal", LogLevel.Critical);
l.AddFilter("Fido2NetLib.DistributedCacheMetadataService", LogLevel.Error);
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.