[CONJ-485] No SSL certificate verification on connect to MySQL 5.1.73 Created: 2017-06-01 Updated: 2017-11-21 Resolved: 2017-11-21 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | documentation |
| Affects Version/s: | 2.0.2 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | J. Lewis Muir | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Using Java 8 and MariaDB Connector/J 2.0.2-SNAPSHOT to connect to a MySQL 5.1.73 database using SSL does not appear to do server certificate verification. The connection is created like this:
where url is this (but with a different host name and DB name):
No exception is thrown. The default Java TrustStore has not been altered. A dedicated TrustStore has not been specified with the trustStore and trustStorePassword URL options. And the trustServerCertificate URL option has not been specified, so it should default to false, and an exception should be thrown according to the "One way SSL authentication" section of Using TLS/SSL with MariaDB Connector/J which says:
The server certificate has been signed by a trusted CA (i.e., Entrust). I don't think this matters, but I'm mentioning it just in case. It would be awesome if Connector/J could verify the server certificate without requiring a dedicated TrustStore (i.e., verify the certificate chain all the way to the root that exists in the default Java TrustStore), but the above referenced documentation does not say it can do this, so my understanding is that it cannot and hence cannot explain what's happening here. |
| Comments |
| Comment by Diego Dupin [ 2017-06-01 ] |
|
In this case, this is normal : Entrust root certificates are already in java default trustore. This task must not be close : documentation Using TLS/SSL with MariaDB Connector/J must be improved :
|
| Comment by Diego Dupin [ 2017-11-21 ] |
|
documentation updated |