Francesco Spampinato created CAMEL-22940:
--------------------------------------------

             Summary: [camel-milo] Cannot configure certificate chain
                 Key: CAMEL-22940
                 URL: https://issues.apache.org/jira/browse/CAMEL-22940
             Project: Camel
          Issue Type: Bug
          Components: camel-milo
    Affects Versions: 4.17.0
            Reporter: Francesco Spampinato


I've configured a Camel route for fetching data from an OPCUA server

 
{code:java}
from(timer(TIMER_POLLER).period("1000"))
  .routeId(TIMER_POLLER)
 
.setHeader(MiloConstants.HEADER_NODE_IDS,constant(Arrays.asList("ns=3;i=1002")))
  .setHeader(MiloConstants.HEADER_AWAIT, constant(true))
  .enrich(miloClient("opc.tcp://localhost:53530/OPCUA/SimulationServer")
    .allowedSecurityPolicies(SecurityPolicy.Basic256Sha256.name())
    .keyStoreUrl("classpath:keystore.jks")
    .keyStorePassword("12345678")
    .keyAlias("client1")
    .keyPassword("12345678")
    .applicationUri("urn:myorg:opcua:my-app"))
  .log(">> Message from OPCUA ${body}"); {code}
I've also created a TLS client certificate for OPC server auth.

 

When i run this code i obtain this error
{code:java}
Caused by: UaException: status=Bad_ConfigurationError, message=no certificate 
chain configured  at 
org.eclipse.milo.opcua.stack.transport.client.uasc.UascClientMessageHandler.lambda$newSecureChannel$10(UascClientMessageHandler.java:729)
 ~[milo-transport-1.0.8.jar:1.0.8]  at 
java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[na:na] at 
org.eclipse.milo.opcua.stack.transport.client.uasc.UascClientMessageHandler.newSecureChannel(UascClientMessageHandler.java:727)
 ~[milo-transport-1.0.8.jar:1.0.8]    at 
org.eclipse.milo.opcua.stack.transport.client.uasc.UascClientMessageHandler.handlerAdded(UascClientMessageHandler.java:173)
 ~[milo-transport-1.0.8.jar:1.0.8]        at 
io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
 ~[netty-transport-4.1.130.Final.jar:4.1.130.Final]  at 
io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:558)
 ~[netty-transport-4.1.130.Final.jar:4.1.130.Final]        ... 12 common frames 
omitted {code}
"{*}no certificate chain configured{*}" but seems that there is now way to 
configure that chain on milo camel component.

Same code using Camel version 3.22.4 works fine.

I've setup sample code to reproduce the issue

[https://github.com/spampibridge/camel-milo.git|http://example.com/]

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to