Skip to content

Commit

Permalink
Force MySQL connection to use TLSv1.2
Browse files Browse the repository at this point in the history
Newer versions of JDK have TLS 1.0 and 1.1 disabled by default. The JDK 8 version we were using was never updated to a newer one, so it continued to use these TLS versions

The right fix is to update ConnectorJ (mysql-connector-java) and the MySQL versions we use 8.x. This should fix the defaults to sane TLS values.

For now, we force TLSv1.2 to maintain parity with how we ran tests before. Disabling SSL/TLS with `useSSL=false` is also a valid setup for this test

Refs -
https://community.streamsets.com/common-issues-47/mysql-jdbc-error-javax-net-ssl-sslhandshakeexception-no-appropriate-protocol-112
https://bugs.openjdk.org/browse/JDK-8256490
  • Loading branch information
aaneja committed Jan 7, 2025
1 parent 8c1d1fd commit fbee5d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
connector.name=mysql
connection-url=jdbc:mysql://mysql:13306
connection-url=jdbc:mysql://mysql:13306?enabledTLSProtocols=TLSv1.2
connection-user=root
connection-password=swarm
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ databases:

mysql:
jdbc_driver_class: com.mysql.jdbc.Driver
jdbc_url: jdbc:mysql://mysql:13306/test
jdbc_url: jdbc:mysql://mysql:13306/test?enabledTLSProtocols=TLSv1.2
jdbc_user: root
jdbc_password: swarm
jdbc_pooling: true
Expand Down

0 comments on commit fbee5d3

Please sign in to comment.