Skip to content

Conversation

@BewareMyPower
Copy link
Contributor

@BewareMyPower BewareMyPower commented Aug 21, 2025

Motivation

The whole client configurations are logged, which might include the secret info whose key is authParams.

Modifications

Remove the logging for the whole client configuration. Actually, in PulsarConfigUpdater.rebuild, set will be called on each configuration, which is already logged here:

logInfo(
s"$module: Set '$key' to " +
s"'${printConfigValue(key, Option(value))}'," +
s" earlier value: '${printConfigValue(key, pulsarParams.get(key))}'")

The printConfigValue method will hide the config of authParams, but it could still print 1/3 of the authParams, which could still leak some info, so just hide the whole authParams

Documentation

Check the box below.

Need to update docs?

  • doc-required
  • no-need-doc
  • doc

@BewareMyPower BewareMyPower requested review from a team and nlu90 as code owners August 21, 2025 15:06
@BewareMyPower BewareMyPower self-assigned this Aug 21, 2025
@github-actions github-actions bot added the no-need-doc This pr does not need any document label Aug 21, 2025
@Anders-Frey
Copy link

Thanks for picking this up! I would like to add that the shortened print in the set function also reveals a fairly large chunk of the secret involved. Since the function cuts of the last third of the config value, a long value (like a JSON struct) could contain the sensitive information in the first two thirds of the value.

@BewareMyPower
Copy link
Contributor Author

It makes sense. The whole authParams is hidden now.

@BewareMyPower BewareMyPower merged commit 87d447a into master Aug 25, 2025
2 checks passed
@BewareMyPower BewareMyPower deleted the bewaremypower/config-log-security branch August 25, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-need-doc This pr does not need any document

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants