osheroff / mysql-binlog-connector-java

MySQL Binary Log connector
680 stars 167 forks source link

DBZ-8445 -- No support for `mysql_clear_password` #162

Open akanimesh7 opened 1 week ago

akanimesh7 commented 1 week ago

While working with debezium mysql connector v2.4.2 with the below configs --

  "database.jdbc.driver":"software.amazon.jdbc.Driver",
  "database.protocol":"jdbc:aws-wrapper:mysql",
  "driver.wrapperPlugins": "iam",

and db user created with AWSAuthenticationPlugin. Snapshot goes fine, but while streaming the below stacktrace occurs --

[2024-11-19 14:25:09,130] ERROR [mysql-conn-v2-6|task-0] Producer failure (io.debezium.pipeline.ErrorHandler:52)
io.debezium.DebeziumException: Failed to authenticate to the MySQL database at <something>:3306 with user 'something'
    at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.execute(MySqlStreamingChangeEventSource.java:1034)
    at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.execute(MySqlStreamingChangeEventSource.java:92)
    at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:272)
    at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:197)
    at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:137)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.github.shyiko.mysql.binlog.network.AuthenticationException: unsupported authentication method: mysql_clear_password
    at com.github.shyiko.mysql.binlog.network.Authenticator.switchAuthentication(Authenticator.java:174)
    at com.github.shyiko.mysql.binlog.network.Authenticator.readResult(Authenticator.java:87)
    at com.github.shyiko.mysql.binlog.network.Authenticator.authenticate(Authenticator.java:70)
    at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:574)
    at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:932)
    ... 1 more

Can we support mysql_clear_password ? This will help the connector to run fine with IAM assume role enabled RDS instances.