RaigorJiang opened a new issue #11100:
URL: https://github.com/apache/shardingsphere/issues/11100
Hi community,
When I use DistSQL to add resource, the proxy always gives an alert because
the `useSSL` parameter is not specified when creating a connection.
> WARN: Establishing SSL connection without server's identity verification
is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements
SSL connection must be established by default if explicit option isn't set. For
compliance with existing applications not using SSL the verifyServerCertificate
property is set to 'false'. You need either to explicitly disable SSL by
setting useSSL=false, or set useSSL=true and provide truststore for server
certificate verification.
Similarly, if use the driver of version 8.0 or higher, `serverTimezone` is
also an indispensable parameter.
Therefore, I consider enhancing the `add resource` function to allow users
to configure the above parameters, as well as any other optional parameters.
#### Before:
```
ADD RESOURCE dataSource [, dataSource] ...
dataSource:
dataSourceName(HOST=hostName,PORT=port,DB=dbName,USER=user [,
PASSWORD=password])
```
#### after:
```
ADD RESOURCE dataSource [, dataSource] ...
dataSource:
dataSourceName(HOST=hostName,PORT=port,DB=dbName,USER=user [,
PASSWORD=password][,PROPERTIES("key"="value","key"="value")])
```
for example:
```
ADD RESOURCE resource_0 (
HOST=127.0.0.1,
PORT=3306,
DB=db0,
USER=root,
PASSWORD=root,
PROPERTIES("useSSL"="false","serverTimezone"="UTC")
);
```
If you have any suggestions, welcome to discuss.
reference:
- [DistSQL: DATA
SOURCE](https://shardingsphere.apache.org/document/current/en/features/dist-sql/syntax/rdl/rdl-resource/)
- [MySQL:
connector-j-connp-props-security](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-connp-props-security.html)
- [MySQL: changes with Connector/J
8.0](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-other-changes.html)
- [PostgreSQL: Initializing the
Driver](https://jdbc.postgresql.org/documentation/head/connect.html)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]