I am getting the following error while trying to connect to JBOSS via JNDI on SSL -
javax.naming.CommunicationException: WFNAM00018: Failed to connect to remote host [Root exception is javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]
I have tried the following code -
namingEnvironment.put(Context.SECURITY_PROTOCOL, "TLSv1.2");
namingEnvironment.put("javax.net.ssl.keyStoreType", "JKS");
namingEnvironment.put("javax.net.ssl.keyStore", "jboss.jks");
namingEnvironment.put("javax.net.ssl.keyStorePassword", "***");
namingEnvironment.put("javax.net.ssl.trustStoreType", "pkcs12");
I do not want to use -
System.setProperty(..)
-Djavax.net.ssl.keyStore=path/to/keystore.jks
I need to know the name of the property that is taken by the JBOSS to identify the values required for JNDI SSL lookup, like -
"jboss.naming.client.security..."
"jboss.naming.client.connect..."
Please help me with the property names used for "keystore", "keystore password" and any other if required for JNDI SSL connection to JBOSS.
I am using wildfly-26.1.3.