-
Notifications
You must be signed in to change notification settings - Fork 82
Closed
Labels
Description
If there is an error in incoming requests, I am logging this request and some requests may contain sensitive information, such as password.
There is LayoutWrappingEncoder encoder on logback and I am able to add Layout that.
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.custom.ecs.layout.MaskingPatternLayout">
<maskPattern>\"oldPassword\"\s*:\s*\"(.*?)\"</maskPattern> <!-- password pattern -->
<maskPattern>\"newPassword\"\s*:\s*\"(.*?)\"</maskPattern> <!-- password pattern -->
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
</layout>
</encoder>
payload={
"newPassword": "********",
"oldPassword": "********",
"smsCode": "123456"
}
But, I am using EcsEncoder in production environment, but there is no option to add Layout in this encoder. So, I can't mask fields. Is there anyway to do that or is there any plan to add this?