You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Hiram Chirino (JIRA)" <ji...@apache.org> on 2018/08/14 01:32:00 UTC

[jira] [Commented] (CAMEL-12728) Configured SSL Context on Undertow component not honored by camel-rest-swagger

    [ https://issues.apache.org/jira/browse/CAMEL-12728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16579111#comment-16579111 ] 

Hiram Chirino commented on CAMEL-12728:
---------------------------------------

I took a peek and this seems smelly:
https://github.com/apache/camel/blob/master/components/camel-rest-swagger/src/main/java/org/apache/camel/component/rest/swagger/RestSwaggerEndpoint.java#L282
 
We create the endpoint and configure it there (skip starting the endpoint) and then create a Producer.  The configured SSLContext is created in the UndertowEndpoint doStart method:
 
https://github.com/apache/camel/blob/master/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java#L393
 

> Configured SSL Context on Undertow component not honored by camel-rest-swagger
> ------------------------------------------------------------------------------
>
>                 Key: CAMEL-12728
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12728
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-rest-swagger
>    Affects Versions: 2.22.0
>            Reporter: Hiram Chirino
>            Priority: Major
>
> Say you have:
> {code:java}
>     <camel:sslContextParameters id="sslContextParameters">
>         <camel:trustManagers>
>             <camel:keyStore password="redhat123" type="JKS" ... />
>         </camel:trustManagers>
>     </camel:sslContextParameters>
> .. and ..
>     <bean id="myundertow" class="org.apache.camel.component.undertow.UndertowComponent">
>         <property name="sslContextParameters" value="#{sslContextParameters}"/>
>     </bean>
> .. and ..
>     <to id="_to1" pattern="InOut" uri="rest-swagger:swagger.json#getMembersList?basePath=/membersweb/rest/v2&amp;componentName=myundertow&amp;host=https://myapp.demolab.local:443”/>{code}
> It will fail with
> {code}
> java.io.IOException: UT000065: SSL must be specified to connect to a https URL
> 	at io.undertow.client.http.HttpClientProvider.connect(HttpClientProvider.java:72)
> 	at io.undertow.client.http.HttpClientProvider.connect(HttpClientProvider.java:60)
> 	at io.undertow.client.UndertowClient.connect(UndertowClient.java:133)
> 	at org.apache.camel.component.undertow.UndertowProducer.process(UndertowProducer.java:165)
> 	at org.apache.camel.component.rest.RestProducer.process(RestProducer.java:86)
> 	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> 	at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197)
> 	at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79)
> 	at java.util.TimerThread.mainLoop(Timer.java:555)
> 	at java.util.TimerThread.run(Timer.java:505)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)