Java SDK disable SSL
I am developing a Java app with Novu SDK on my local machine. it can't connect to the remote Novu due to "javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". Is there a way for me to disable SSL ?
3 Replies
Hi @Mandy, I'm an AI assistant for Novu. While a team member reviews this question, I'll look through relevant sources and see if I can provide suggestions. Please tag @Ask Inkeep with any follow-up questions.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Messages
* Delete layout
* API Overview
* Java
-----------------------------
Answer
Disabling SSL for the purpose of bypassing
SSLHandshakeException
in a Java application is generally not recommended due to the security implications. Instead, the proper approach involves ensuring your application trusts the SSL certificate of the server it's trying to connect to. This can be achieved by importing the server's certificate into your Java application's truststore or configuring your application to trust all certificates (which should only be done in a development environment due to security risks).
However, based on the information sources available, there is no specific guidance from Novu documentation or community discussions that explicitly describes how to disable SSL or bypass SSL verification errors within the context of using the Novu SDK in a Java application (1) .
For local development purposes, if you're encountering SSL issues, consider reviewing your Java application's SSL/TLS configuration to ensure it properly trusts the server's certificate, or consider using HTTP for local development if Novu supports it and you're strictly in a controlled environment. Remember, any approach that bypasses SSL verification poses security risks and should not be used in production environments.
If you're dealing with a self-signed certificate or a certificate issued by a private CA for local development, you might need to import that certificate into your Java keystore using the keytool
command included with the JDK.
For more detailed guidance or support specific to the Novu SDK and SSL configurations, consider reaching out through official Novu support channels or the community for more targeted assistance.Glad I could be helpful. Feel free to create a new thread with any new questions you may have.