tejanshrana opened a new pull request, #4174:
URL: https://github.com/apache/flink-cdc/pull/4174
The Flink Postgres CDC connector, when initialising, logs the complete
connector configuration, including the database.password property, in plain
text to the TaskManager logs.
This fix redacts such sensitive information from being leaked in logs.
Current behaviour
`2025-11-14 11:04:29,954 INFO
org.apache.flink.cdc.connectors.postgres.source.fetch.PostgresSourceFetchTaskContext
[] - PostgresConnectorConfig is
{connector.class=io.debezium.connector.postgresql.PostgresConnector,
slot.name=flink_cdh_sample_1_3, schema.include.list=public,
provide.transaction.metadata=true, include.schema.changes=false,
database.sslmode=require, database.history.skip.unparseable.ddl=true,
database.sslfactory=org.postgresql.ssl.NonValidatingFactory,
database.history.instance.name=6d5b0651-f15b-49f3-a210-32a4654158de_3,
database.tcpKeepAlive=true, database.dbname=foo_sample, database.user=foo_user,
slot.drop.on.stop=true, database.history.refer.ddl=true,
database.server.name=postgres_cdc_source, heartbeat.interval.ms=0,
plugin.name=pgoutput, database.port=5432, database.hostname=postgres,
database.password=postgres, database.sslrootcert=,
table.include.list=public.foo_sample_users,
database.history=org.apache.flink.cdc.connectors.base.source.EmbeddedFlinkDatabase
History, snapshot.mode=never}`
After this fix
`2025-11-14 12:15:55,320 INFO
org.apache.flink.cdc.connectors.postgres.source.fetch.PostgresSourceFetchTaskContext
[] - PostgresConnectorConfig is
{connector.class=io.debezium.connector.postgresql.PostgresConnector,
schema.include.list=public, include.schema.changes=false,
database.sslmode=require,
database.sslfactory=org.postgresql.ssl.NonValidatingFactory,
database.history.instance.name=cdb75629-ee4b-488f-bed7-4566777633b9_2,
database.dbname=foo_sample, database.user=foo_user,
database.history.refer.ddl=true, heartbeat.interval.ms=0, plugin.name=pgoutput,
database.password=******, database.sslrootcert=,
database.history=org.apache.flink.cdc.connectors.base.source.EmbeddedFlinkDatabaseHistory,
snapshot.mode=never, slot.name=flink_cdh_sample_1_2,
provide.transaction.metadata=true, database.history.skip.unparseable.ddl=true,
database.tcpKeepAlive=true, slot.drop.on.stop=true,
database.server.name=postgres_cdc_source, database.port=5432,
database.hostname=postgres, table.include.li
st=public.foo_sample_orders}`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]