mkopylec / charon-spring-boot-starter

Reverse proxy implementation in form of a Spring Boot starter.
Apache License 2.0
247 stars 55 forks source link

HTTPS not working by default #44

Closed DejanNS closed 5 years ago

DejanNS commented 6 years ago

When I try to proxy to HTTPS destination I'm getting:

`2018.03.08;12:17:26 [http-nio-8043-exec-8] [rootId: parentId: eventId: ] INFO o.a.coyote.http11.Http11Processor java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:421) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:667) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)

Trying this from SoapUI with url https://something/something and forward to https://something/something

If I try with HTTP everything goes OK. Is this expected behaviour? Why is HTTPS not being recognized?

Thanks in advance

mkopylec commented 6 years ago

Hi, this is probably not a Charon issue. There is already a test case that tests proxying requests to https destination, see here and here The issue you have was already posted on stackoverflow, here and here

DejanNS commented 6 years ago

I've finally managed to resolve the issue with certificates, but it's still not working, getting 403 permission denied from server side, then I realized that it is using Rest so it's not possible to use it as proxy for SOAP messages to act like a proxy between SOAP webservice client and server. Please correct me if I'm wrong? Also you can close the ticket.

Thanks in advance

mkopylec commented 6 years ago

If the transporting protocol for your SOAP messages is HTTP then Charon should work for you. Charon doesn't care about request body formats, it's just forwarding bytes. Checkout 2.4.0 version, there have been some SSL improvements merged in.

RichardBradley commented 6 years ago

This was likely fixed in 2.4.0, as @mkopylec comments. Please could you retest?

mkopylec commented 6 years ago

@RichardBradley thanks for all updates in issues :)

mkopylec commented 5 years ago

Closing because of no response