NIFI-15998 Add DatabasePasswordProvider support to CaptureChangeMySQL#11346
NIFI-15998 Add DatabasePasswordProvider support to CaptureChangeMySQL#11346yagipy wants to merge 1 commit into
Conversation
|
Rebased. |
|
Fixed CI. |
| if (password == null) { | ||
| password = ""; | ||
| } | ||
| String resolvedPassword = resolvePassword(); |
There was a problem hiding this comment.
The binlog client password is resolved only once at setup, while the JDBC connection re-fetches it on each connection. For a provider that returns short lived tokens (like RDS IAM), should the binlog connection also refresh the password when it reconnects?
| password = null; | ||
| passwordProvider = context.getProperty(DB_PASSWORD_PROVIDER).asControllerService(DatabasePasswordProvider.class); | ||
| passwordRequestContext = DatabasePasswordRequestContext.builder() | ||
| .jdbcUrl(JDBC_URL_FORMAT.formatted(context.getProperty(HOSTS).evaluateAttributeExpressions().getValue())) |
There was a problem hiding this comment.
This request context jdbcUrl is built from the raw MySQL Nodes value, so with multiple hosts it becomes jdbc:mysql://h1:3306,h2:3306. Should we pass the actual connected host so providers that sign per host (RDS IAM) work without needing the optional endpoint override?
| } | ||
|
|
||
| @Test | ||
| public void testPasswordProviderEmptyTokenThrowsProcessException(@Mock DatabasePasswordProvider passwordProvider) throws InitializationException { |
There was a problem hiding this comment.
Could the empty token and null token tests be merged into one parameterized test, since they assert the same branch and the same message?
Summary
NIFI-15998
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation