-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-18371 TopicBasedRemoteLogMetadataManagerConfig exposes sensitive configuration data in logs #18349
base: trunk
Are you sure you want to change the base?
Conversation
", commonProps=" + commonProps + | ||
", consumerProps=" + consumerProps + | ||
", producerProps=" + producerProps + | ||
", commonProps=" + configMapToRedactedString(commonProps, AdminClientConfig.configDef()) + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commonProps used to create AdminClient only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Wadimz nice find!
", producerProps=" + producerProps + | ||
", commonProps=" + configMapToRedactedString(commonProps, AdminClientConfig.configDef()) + | ||
", consumerProps=" + configMapToRedactedString(consumerProps, ConsumerConfig.configDef()) + | ||
", producerProps=" + configMapToRedactedString(producerProps, ProducerConfig.configDef()) + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a unit test to verify that no sensitive strings are output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chia7712 thanks for the review! Updated test to include validations
This change addresses issue described in KAFKA-18371
It was noticed that sensitive information is printed as clear text while using default TopicBasedRemoteLogMetadataManagerConfig implementation. Example:
2024-12-20 14:52:56,805] INFO Successfully configured topic-based RLMM with config: TopicBasedRemoteLogMetadataManagerConfig{clientIdPrefix='__remote_log_metadata_client_6', metadataTopicPartitionsCount=50, consumeWaitMs=120000, metadataTopicRetentionMs=-1, metadataTopicReplicationFactor=3, initializationRetryMaxTimeoutMs=120000, initializationRetryIntervalMs=100, commonProps={request.timeout.ms=10000, ssl.client.auth=none, ssl.keystore.location=/etc/eystore.p12, bootstrap.servers=server1:9094, security.protocol=SASL_SSL, password=CLEARTEXT, ssl.truststore.location=/etc/cacerts, ssl.keystore.password=CLEARTEXT, sasl.mechanism=SCRAM-SHA-512, ssl.key.password=CLEARTEXT, sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="username" password="CLEARTEXT";, ssl.truststore.password=CLEARTEXT, …
Committer Checklist (excluded from commit message)