-
-
Notifications
You must be signed in to change notification settings - Fork 137
SSL Mode support for MySQL #337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for reporting an issue. See the wiki for documentation and gitter for questions. |
Hi, jasync-mysql ssl support was added in #222. So I think your assumption that adding support to r2dbc should be straight forward is correct and contribution is welcome. IIRC url parsing is done by the spi impl (which is not part of the driver) and the driver gets the options directly. You're welcome to try that and support any parameter you see fit. Thanks! |
1 similar comment
Hi, jasync-mysql ssl support was added in #222. So I think your assumption that adding support to r2dbc should be straight forward is correct and contribution is welcome. IIRC url parsing is done by the spi impl (which is not part of the driver) and the driver gets the options directly. You're welcome to try that and support any parameter you see fit. Thanks! |
Hello!
I would like to ask if there's a plan to support
sslMode
configuration for MySQL database? According to FAQ, currently, only PostgreSQL is supported. I also noticed thatcom.github.jasync.sql.db.SSLConfiguration
defaults tosslMode=disabled
mode for MySQL which leads to problems when the MySQL Server is configured to enforce SSL connections.I had a look at the implementation details and found that this library integrates with R2DBC SPI (https://r2dbc.io/spec/0.8.1.RELEASE/spec/html/#overview.connection.discovery). The driver will be discovered by R2DBC SPI which will use
com.github.jasync.r2dbc.mysql.MysqlConnectionFactoryProvider#create
to createio.r2dbc.spi.ConnectionFactory
object:The above method does not configure
com.github.jasync.sql.db.SSLConfiguration
and thus, the defaultsslMode
(Mode.Disable
) will be used. Even though, theconnectionFactoryOptions
could have the optionssl
set totrue
or anysslMode
parameter specified.I suspect that changing this factory to interpret the
ssl
andsslMode
parameter ofconnectionFactoryOptions
would quickly resolve the issue. It seems thatcom.github.jasync.sql.db.mysql.MySQLConnection#onHandshake
already supports SSL.I would be happy to contribute and resolve this issue. But first I would like to make sure:
connectionFactoryOptions
would return true in case the secure protocol (r2dbcs
) is used. However how should it handle the combination of secure protocol andsslMode=disabled
, for example through the following connection string:r2dbcs:mysql://example.com?sslMode=disabled
?com.github.jasync.sql.db.SSLConfiguration
also acceptssslrootcert
,sslcert
,sslkey
.Thanks!
The text was updated successfully, but these errors were encountered: