wso2 / micro-integrator

The cloud-native configuration driven runtime that helps developers implement composite microservices.
https://wso2.com/integration/
Apache License 2.0
194 stars 206 forks source link

Sensitive information are not masked in the saved log files when wire log enabled #3377

Open gabilang opened 6 days ago

gabilang commented 6 days ago

$title Even the necessary configs were added to the deployment.toml file for masking sensitive values, it looks that those relevant sensitive information are not masked in the wso2carbon.log file. Anyway in the terminal log the relevant information are appeared as masked.

Config used in the deployment.toml

[masking_pattern.properties]
"CREDIT_CARD_VISA" = "4[0-9]{6,}$"
"CREDIT_CARD_MASTER" = "(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}"
"CREDIT_CARD_AMEX" = "[34|37][0-9]{14}$"
"PHONE" = "[0-9]{10}"

And added the necessary change to the <MI_HOME>/conf/log4j2.properties file as well.

Affected version: WSO2 Micro Integrator 4.3.0-M1