k2v-academy / K2View-Academy

Other
0 stars 0 forks source link

TDM - hiding sensitive information from being printed in the fabric log #1069

Closed yBqdo2VLaCdftea1MqgSdtEhrPZtV5oJRr4eIUo closed 3 months ago

yBqdo2VLaCdftea1MqgSdtEhrPZtV5oJRr4eIUo commented 3 months ago

Hello, for one of our customer we have SSN set as root iid for LU and BE.. whenever they run the task - they have output in the log file that LU.ENV_SSN is synced

output like below (but below is based on Customer LU and SRC env)

[SyncInstance:Customer.SRC_1_tid:1990] c.k.f.s.FabricSession - FINISHED - sync Customer.SRC_1 (UPDATE)

Is there a way to hide this IID from logs (without switching log profile from INFO to ERROR as we still want to debug things while we are developing)?


Best regards, Andrey

i7QC2njzxHCc0LYBqCh0HQf30xF2DYuJjqtFbNe commented 3 months ago

The only option to turn this info off is by changing logbook.xml file, but you can change the file to turn off only the messages coming from this class.

yBqdo2VLaCdftea1MqgSdtEhrPZtV5oJRr4eIUo commented 3 months ago

Could you pls suggest what class it is based on below outputs?

Is this for com.k2view.fabric.session.sync.local.SyncExecution and com.k2view.fabric.session.FabricSession respectively?

INFO  2024-05-22 02:39:43,235 [LIDf3e000000000668] [SyncInstance:Customer.SRC_10_tid:1993] c.k.f.s.s.l.SyncExecution - Start operation 'Sync Customer.SRC_10'

INFO  2024-05-22 02:39:43,234 [LIDf3e000000000668] [SyncInstance:Customer.SRC_10_tid:1993] c.k.f.s.FabricSession - START - sync Customer.SRC_10

This means we will disable most of the output... also, if we set these classes to ERROR - is there a chance that we still print IID in case of ERROR ?

Is there a possibility to add some config parameter to log all IIDs using masked value (or as 0000) in the log if option is enabled? W/o switching entire class output to ERROR?

i7QC2njzxHCc0LYBqCh0HQf30xF2DYuJjqtFbNe commented 3 months ago

currently the suggested feature above is not supported, you need to mark the classes as suggested before