Skip to content

Conversation

@KGaneshDatta
Copy link
Contributor

@KGaneshDatta KGaneshDatta commented Nov 12, 2025

Problem

  • Introduced an internal query.masked configuration of Type.Password to ensure secure logging by masking sensitive values and preventing accidental exposure.
  • Enhanced the existing validation to enforce that the connector operates exclusively in either table.mode or query.mode.

Solution

Does this solution apply anywhere else?
  • yes
  • no
If yes, where?

Test Strategy

Testing done:
  • Unit tests
  • Integration tests
  • System tests
  • Manual tests

Release Plan

@KGaneshDatta KGaneshDatta requested a review from a team as a code owner November 12, 2025 11:07
@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

orderInGroup = defineIncrementTimestampConfigs(config, orderInGroup);
orderInGroup = defineQueryAndQuoteConfigs(config, orderInGroup);
defineTransactionAndRetryConfigs(config, orderInGroup);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extend this Options method, because of falling to checkstyle error of exceeding 128 lines in a method.


return true;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a validation in order to limit using of either of query or query.masked config.

String msg =
"Do not specify table filtering configs with 'query' or 'query.masked'. "
+ "Remove table.whitelist / table.blacklist / table.include.list / "
+ "table.exclude.list.";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either of table.filtering.options or query should be provided as the connector would work in table.mode or query.mode and not both.

Copy link
Member

@akanimesh7 akanimesh7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few things @KGaneshDatta

  1. Since query was never exposed on cloud before this, we should perform some manual testing to understand/validate the behaviour. (How frequently will the query be executed, What if the query is taking too long to exceute ? do we have any observability into this ? Can multiple queries be provided (select * from table1;select* from table2;))
  2. If user has specified both table include/exclude list and query, we don't know which way they wanna go. The validation exception message currently instructs them to remove table include/exclude configs. Which might be other way round also.

private boolean hasAnyQueryConfig() {
String query = config.getString(JdbcSourceConnectorConfig.QUERY_CONFIG);
Password queryMasked =
config.getPassword(JdbcSourceConnectorConfig.QUERY_MASKED_CONFIG);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you make config.getQuery return optional, then this hasAnyQueryConfig method will not be needed.

@sonarqube-confluent
Copy link

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.

3 participants