debezium / debezium/dbz

Wrong values expected for property `database.ssl.mode` in MariaDB [DBZ-8195]

Open
#1,309 0 comments 1 reaction 0 assignees View on GitHub
component/mariadb-connector migrated-from-jira type/bug
Dominant language
HTML
Stars
6
Forks
8
Avg merge
2d 19h
Merged PRs (30d)
1

Description

Migrated from [DBZ-8195](https://issues.redhat.com/browse/DBZ-8195)

h1. Bug report

For bug reports, provide this information, please:

When starting a connector with the Maria Db connector, I face an issue regarding the sslmode property.

As per the documentation, [{{database.ssl.mode}}|https://debezium.io/documentation/reference/2.7/connectors/mariadb.html#mariadb-property-database-ssl-mode] can have the values `disabled`, `preferred`, `required`, `verify_ca` and `verify_identity`. This is true for mysql databases. 

But mariadb expects other values. As per the [documentation|https://mariadb.com/docs/server/connect/programming-languages/java/tls/#:~:text=1.1.3-,sslMode,-Enables%20SSL/TLS], they are `disable`, `trust`, `verify-ca`, `verify-full`. 

When trying to use these values, I get the error:
{code:java}
There is an issue with the connector.Code: InvalidInput.InvalidConnectorConfigurationMessage: The connector configuration is invalid. Message: Connector configuration is invalid and contains the following 1 error(s): The 'database.ssl.mode' value is invalid: Value must be one of verify_identity, disabled, preferred, required, verify_ca {code}
When trying to use the mysql ones, I get authentication problems. 

With _preferred_
{code:java}
[2024-09-02 12:42:24,558] ERROR Failed testing connection for jdbc:mariadb://[URL]:3306/?useInformationSchema=true&nullCatalogMeansCurrent=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL&connectTimeout=30000 with user 'username' (io.debezium.connector.binlog.BinlogConnector:70)
java.sql.SQLException: error parsing url : Wrong argument value 'preferred' for SslMode
at org.mariadb.jdbc.Configuration.parseInternal(Configuration.java:644) {code}
With _disabled_ and _required_
{code:java}
[2024-09-02 13:07:34,694] ERROR Failed testing connection for jdbc:mariadb://[URL]:3306/?useInformationSchema=true&nullCatalogMeansCurrent=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL&connectTimeout=30000 with user 'username' (io.debezium.connector.binlog.BinlogConnector:70)
java.sql.SQLInvalidAuthorizationSpecException: (conn=3464490) Access denied for user 'username'@'INTERNAL_IP' (using password: YES)
at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:286){code}
Is this expected and is there a workaround for this?
h2. What Debezium connector do you use and what version?

mariadb 2.7.1
h2. What is the captured database version and mode of deployment?

(E.g. on-premises, with a specific cloud provider, etc.)

AWS Mariadb
h2. Do you see the same behaviour using the latest released Debezium version?

This is also in the latest branch.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.