Before Creating the Bug Report
Runtime platform environment
Any environment that starts Broker or Proxy, or updates Broker configuration at runtime, with sensitive configuration values.
RocketMQ version
- Branch:
develop
- Commit:
293f588571
JDK Version
Reproduced and verified with Amazon Corretto JDK 11.0.23.
Describe the Bug
Broker and Proxy print complete configuration snapshots to normal logs during startup. Broker runtime configuration updates also print the incoming properties and old/new replacement values. These log projections currently have no explicit sensitivity marker or masking policy, so values such as TLS key passwords, authentication bootstrap data, inner-client credentials, SOCKS proxy credentials, and metrics exporter headers may be exposed in log files.
This iteration covers the normal full-configuration startup logs of Broker and Proxy and the Broker dynamic configuration update log. Existing exception/error logs, Controller, BrokerContainer, and Namesrv are out of scope. The open-source Proxy currently has no runtime dynamic configuration reload path.
Steps to Reproduce
- Configure Proxy with a non-empty
tlsKeyPassword or metricsGrpcExporterHeader, or configure Broker with a non-empty metricsGrpcExporterHeader.
- Start the corresponding component and inspect its configuration startup log.
- Alternatively, update an annotated Broker configuration property at runtime.
- Observe that the configured value is written without masking.
What Did You Expect to See?
Sensitive configuration fields should be explicitly marked and masked only in log projections. Broker dynamic logs should contain only properties whose values actually changed. The masked text should retain a short prefix and suffix for troubleshooting, while the original configuration object, parsing, serialization, update, persistence, and runtime behavior remain unchanged.
What Did You See Instead?
The full sensitive value is present in the log.
Additional Context
The proposed fix introduces a runtime field annotation and a shared log-only masking utility. Only explicitly annotated fields are masked; there is no key-name fallback. Unannotated fields remain unchanged even when their names contain words such as password, secret, AK, or SK.
Before Creating the Bug Report
Runtime platform environment
Any environment that starts Broker or Proxy, or updates Broker configuration at runtime, with sensitive configuration values.
RocketMQ version
develop293f588571JDK Version
Reproduced and verified with Amazon Corretto JDK 11.0.23.
Describe the Bug
Broker and Proxy print complete configuration snapshots to normal logs during startup. Broker runtime configuration updates also print the incoming properties and old/new replacement values. These log projections currently have no explicit sensitivity marker or masking policy, so values such as TLS key passwords, authentication bootstrap data, inner-client credentials, SOCKS proxy credentials, and metrics exporter headers may be exposed in log files.
This iteration covers the normal full-configuration startup logs of Broker and Proxy and the Broker dynamic configuration update log. Existing exception/error logs, Controller, BrokerContainer, and Namesrv are out of scope. The open-source Proxy currently has no runtime dynamic configuration reload path.
Steps to Reproduce
tlsKeyPasswordormetricsGrpcExporterHeader, or configure Broker with a non-emptymetricsGrpcExporterHeader.What Did You Expect to See?
Sensitive configuration fields should be explicitly marked and masked only in log projections. Broker dynamic logs should contain only properties whose values actually changed. The masked text should retain a short prefix and suffix for troubleshooting, while the original configuration object, parsing, serialization, update, persistence, and runtime behavior remain unchanged.
What Did You See Instead?
The full sensitive value is present in the log.
Additional Context
The proposed fix introduces a runtime field annotation and a shared log-only masking utility. Only explicitly annotated fields are masked; there is no key-name fallback. Unannotated fields remain unchanged even when their names contain words such as
password,secret,AK, orSK.