issue with https while overriding submit button

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

issue with https while overriding submit button

nkvangip
Hi,
      We are trying to override send button to post data to our service and we are able to do it by changing property
<property as="xs:string" name="oxf.fr.detail.process.send.*.*" value='require-valid then save then send(content="pdf-url", uri = "http://foo.com/submit") then navigate("http://foo.com/submit-form-success.jsp")'/> 

But when we try to use corresponding https uri's then we are getting unable to find valid certification path to requested target   error

Note:The certificates for formbuilder is different from the services.

Stack Trace:

+----------------------------------------------------------------------------------------------------------------------+
|An Error has Occurred                                                                                                 |
|----------------------------------------------------------------------------------------------------------------------|
|unable to find valid certification path to requested target                                                           |
|----------------------------------------------------------------------------------------------------------------------|
|Application Call Stack                                                                                                |
|----------------------------------------------------------------------------------------------------------------------|
|ge=en&valid=true&app=c4ca4238a0b923820dcc509a6f75849b&form-version=2&form=lasttest|                              |    |
|----------------------------------------------------------------------------------------------------------------------|
|Exception: sun.security.provider.certpath.SunCertPathBuilderException                                                 |
|----------------------------------------------------------------------------------------------------------------------|
|sun.security.provider.certpath.SunCertPathBuilder  |engineBuild                   |SunCertPathBuilder.java       | 196|
|java.security.cert.CertPathBuilder                 |build                         |CertPathBuilder.java          | 268|
|sun.security.validator.PKIXValidator               |doBuild                       |PKIXValidator.java            | 380|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: sun.security.validator.ValidatorException                                                                  |
|----------------------------------------------------------------------------------------------------------------------|
|sun.security.validator.PKIXValidator               |doBuild                       |PKIXValidator.java            | 385|
|sun.security.validator.PKIXValidator               |engineValidate                |PKIXValidator.java            | 292|
|sun.security.validator.Validator                   |validate                      |Validator.java                | 260|
|sun.security.ssl.X509TrustManagerImpl              |validate                      |X509TrustManagerImpl.java     | 326|
|sun.security.ssl.X509TrustManagerImpl              |checkTrusted                  |X509TrustManagerImpl.java     | 231|
|sun.security.ssl.X509TrustManagerImpl              |checkServerTrusted            |X509TrustManagerImpl.java     | 126|
|sun.security.ssl.ClientHandshaker                  |serverCertificate             |ClientHandshaker.java         |1428|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: javax.net.ssl.SSLHandshakeException      ....

Can you please help me in resolving this issue.
Please let me know if some other information is required

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: issue with https while overriding submit button

Alessandro  Vernet
Administrator
Hi Naveen,

Is the issue is when using HTTPS for URL in navigate() or send()? Also, does the URL use a self-signed certificate? I.e. can you access it from your browser without the browser prompting users about the certificate? And could you copy or attach the full stack trace (in the snippet you attached, we don't see any Orbeon classes, which makes it hard to figure what is happening)?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: issue with https while overriding submit button

nkvangip
This post was updated on .
We are facing issue on send(), URL is CA certified.The request from send() goes to load balancer and the ssl terminates at LB and the the app server is behind firewall.

PFA full stack trace  orbeon-logs.orbeon-logs

Reply | Threaded
Open this post in threaded view
|

Re: issue with https while overriding submit button

Alessandro  Vernet
Administrator
Hi Naveen,

As mentioned here (http://stackoverflow.com/a/9210661/5295), it could be many things. Could you try adding -Djavax.net.debug=ssl and see if with this you get more information about the error? Also, it is possible that the CA you're using is not known by your JRE? If that is the case you would need to add their public key to your truststore (more about this on http://stackoverflow.com/a/3980954/5295). I hope this will help you progress in the right direction.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: issue with https while overriding submit button

nkvangip
This post was updated on .
Hi Alex,

I was able to go past SunCertPathBuilderException as the cacert was imported into the wrong keystore.  But now I am getting Socket exception and I am kind of stuck.  As suggested i have enabled the debug on ssl on the jboss server.  Attached are the orbeon and the ssl logs. orbeonlogs.txt
ssllogs.txt

Looks like it is an issue with TLS protocol.
Reply | Threaded
Open this post in threaded view
|

Re: issue with https while overriding submit button

Alessandro  Vernet
Administrator
Hi Naveen,

"Connection reset" seems to indicate that the server cut the connection; would you be able to look at the logs on the server and see what it says, i.e. why it cut the connection?

Have you tried doing a wget or curl for that URL from the command line? Is it working?

Also, you can try doing a send(uri = "https://httpbin.org/post", replace = "all") to test HTTPS works in your JVM - you never know; the problem could be at that level. (I test here and it works for me.)

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet