Skip to content

CC-41565/41566/41568/41569: stop leaking Kafka record content into logs (v1.16.x backport) - #112

Open
Sahil Sonawane (saheeeel) wants to merge 1 commit into
v1.16.xfrom
logging-leak-backport
Open

CC-41565/41566/41568/41569: stop leaking Kafka record content into logs (v1.16.x backport)#112
Sahil Sonawane (saheeeel) wants to merge 1 commit into
v1.16.xfrom
logging-leak-backport

Conversation

@saheeeel

Copy link
Copy Markdown

Summary

Backports the CC-41565/41566/41568/41569 log-leak fixes to v1.16.x (identical change to PR #110 on v2.0.x).

Needed because kafka-connect-firestore-private bundles & shades org.mongodb.kafka:mongo-kafka-connect built from the mongo-kafka submodule pinned at v1.16.x (1.16.0). v1.16.x doesn't have the fix, so the Firestore connector still leaks record content in logs until this lands.

Same 6 files, sanitizing connector log statements (type/code/counts at ERROR, full detail at DEBUG/TRACE); DLQ unchanged. Cherry-picked cleanly (the leak sites are byte-for-byte identical on v1.16.x and v2.0.x).

Sanitize log statements and exception messages so only non-sensitive
metadata (field name/path, BSON type, exception type, error codes, counts)
reaches INFO/WARN/ERROR logs; full detail is kept at DEBUG/TRACE. DLQ error
reporting is unchanged.

- CC-41565 MongoProcessedSinkRecordData.tryProcess: log the exception type at
  ERROR (full exception at DEBUG). Sanitize the CDC throw-site messages
  (OperationHelper) and UUID id-strategy messages to report BSON type/length,
  not the value.
- CC-41566 StartedMongoSinkTask: drop the driver exception from both
  LOGGER.error calls; log only exception type, write-error code(s) and counts;
  full driver detail at DEBUG.
- CC-41568 TimeseriesTimeFieldAutoConversion: log field name + exception simple
  name at INFO; raw DateTimeParseException detail at TRACE.
- CC-41569 Validators.errorCheckingPasswordValueValidator: static ERROR message
  (no driver message / URI) and redacted ConfigException; detail at DEBUG.
@saheeeel
Sahil Sonawane (saheeeel) requested a review from a team as a code owner June 19, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant