Andrea Cosentino created CAMEL-24454:
----------------------------------------
Summary: camel-mllp - logPhi defaults to true, so message content
is written to the log at INFO/WARN
Key: CAMEL-24454
URL: https://issues.apache.org/jira/browse/CAMEL-24454
Project: Camel
Issue Type: Bug
Components: camel-mllp
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
Fix For: 4.23.0
{{MllpComponent.logPhi}} defaults to {{true}} with {{logPhiMaxBytes=5120}}. At
the default INFO/WARN levels, payload bytes reach the log from several paths:
* {{MllpSocketBuffer.readFrom}} - partial-payload WARN
* {{MllpSocketBuffer.readSocketInputStream}} - pre-START_OF_BLOCK WARN
* {{TcpSocketConsumerRunnable}} - out-of-band and partial-payload WARNs
* {{TcpServerConsumerValidationRunnable}} - INFO/WARN dumps
The partial-payload timeout path logs the content of legitimate in-flight
messages - a slow sender's real HL7 message - not only unexpected bytes. Some
of these paths log content without consulting the flag at all.
For a protocol whose payload is patient data by definition, the safe default is
the other way round.
Proposal: default {{logPhi}} to {{false}}, and make every content-logging path
honour the flag. Needs an upgrade-guide entry.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)