-
Hi, I'm trying to connect an app to a cluster with ssl enabled. I'm providing below properties while connecting.
But I get the error |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hello @ashetkar , Typically, the error "No subject alternative names present" appears when the server certificate's CN does not match the server hostname and there is no alternative names in the certificate potentially matching the hostname. By default, when using the JSSE properties as you did, the connection will be established using the
(See: https://docs.datastax.com/en/developer/java-driver/4.14/manual/core/ssl/) I probably should add an additional parameter in a future version to allow disabling the hostname validation when using the JSSE properties and avoid such error when the certificate's CN/SAN do not match the hostname (which is not really a good practice though). As explained here: https://github.com/ing-bank/cassandra-jdbc-wrapper#secure-connection-with-ssl, it is also possible to provide a custom An other alternative consists in using a standard Cassandra configuration file including the |
Beta Was this translation helpful? Give feedback.
-
Thanks @maximevw for the prompt response. Yes, I too was looking for a way to ensure the host-verification. But it seems that I need to either relook at the certificates or implement the |
Beta Was this translation helpful? Give feedback.
Hello @ashetkar ,
Typically, the error "No subject alternative names present" appears when the server certificate's CN does not match the server hostname and there is no alternative names in the certificate potentially matching the hostname.
By default, when using the JSSE properties as you did, the connection will be established using the
DefaultSslEngineFactory
in which the hostname verification is activated by default:(See: https://docs.datastax.com/en/developer/java-driver…