You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SSL ValidateCertificates Still Attempts to Validate When Set to False #204
We've been doing some work with the Splunk SDK, and we've found that the new parameter that is supposed to disable SSL certificate validation seems to have no effect. The result is that on testing machines we get the following error:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
We have found a workaround, however, I wanted to flag this for your team as you might want to fix it.
Hi @cgivre Sorry for the delay in response.
As per the analysis we found that the sequence in which the code statements are executed is resulting in exception. Ref
The required sequence is to call setValidateCertificates before setSslSecurityProtocol method i.e:-
Request you to update the code as per the above sequence and let us know if you still face the issue.
Also thanks for bringing this to our notice we will work on updating this information in the docs to avoid such issues in future.
@cgivre@ashah-splunk changing the call sequence as suggested above is only a workaround to this bug if an SSL protocol that is different to the one set previously is provided in the call to HttpService.setSslSecurityProtocol. Only in this case the creation of a new SSLSocketFactory will be triggered and the validateCertificates option applied.
@jnturton yes changing the sequence is a workaround. We have already made the necessary changes in the SDK on the similar lines that you described (Ref PR). The changes will be available in the next Release, till that we request you to apply the workaround. Will update you once we have a new release published.
@cgivre , @jnturton the necessary changes have been merged in the latest release of the Splunk Java SDK request you to test with the latest version and let us know if you are still facing the issue. sorry for the delay in the update.
Activity
ashah-splunk commentedon Jan 5, 2023
Hi @cgivre Sorry for the delay in response.
As per the analysis we found that the sequence in which the code statements are executed is resulting in exception. Ref
The required sequence is to call
setValidateCertificatesbeforesetSslSecurityProtocolmethod i.e:-Request you to update the code as per the above sequence and let us know if you still face the issue.
Also thanks for bringing this to our notice we will work on updating this information in the docs to avoid such issues in future.
jnturton commentedon Jan 10, 2023
@cgivre @ashah-splunk changing the call sequence as suggested above is only a workaround to this bug if an SSL protocol that is different to the one set previously is provided in the call to HttpService.setSslSecurityProtocol. Only in this case the creation of a new SSLSocketFactory will be triggered and the validateCertificates option applied.
ashah-splunk commentedon Jan 11, 2023
@jnturton yes changing the sequence is a workaround. We have already made the necessary changes in the SDK on the similar lines that you described (Ref PR). The changes will be available in the next Release, till that we request you to apply the workaround. Will update you once we have a new release published.
ashah-splunk commentedon Jun 9, 2023
@cgivre , @jnturton the necessary changes have been merged in the latest release of the Splunk Java SDK request you to test with the latest version and let us know if you are still facing the issue. sorry for the delay in the update.