feat(mxgateway): expose GatewayLogRedactor via shared ILogRedactor seam

This commit is contained in:
Joseph Doherty
2026-06-01 15:49:32 -04:00
parent c51b6f9ce4
commit f1129b969d
3 changed files with 44 additions and 0 deletions
@@ -0,0 +1,15 @@
using System.Collections.Generic;
using ZB.MOM.WW.MxGateway.Server.Diagnostics;
using Xunit;
public class GatewayLogRedactorSeamTests
{
[Fact]
public void Redact_MasksApiKeyInClientIdentity()
{
var redactor = new GatewayLogRedactorSeam();
var props = new Dictionary<string, object?> { ["ClientIdentity"] = "Bearer mxgw_operator01_super-secret" };
redactor.Redact(props);
Assert.Equal("Bearer mxgw_operator01_[redacted]", props["ClientIdentity"]);
}
}