[
https://issues.apache.org/jira/browse/CAMEL-25645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-25645 started by Andrea Cosentino.
------------------------------------------------
> camel-milo - let the OPC UA client validate the server certificate against a
> trust list
> ---------------------------------------------------------------------------------------
>
> Key: CAMEL-25645
> URL: https://issues.apache.org/jira/browse/CAMEL-25645
> Project: Camel
> Issue Type: Bug
> Components: camel-milo
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.24.0
>
>
> milo-client and milo-browse create the Eclipse Milo client configuration in
> {{MiloClientConfiguration.mapToClientConfiguration}} without setting a
> certificate validator. The configuration therefore keeps Milo's builder
> default, {{CertificateValidator.InsecureCertificateValidator}}, and the
> server certificate of a Sign or SignAndEncrypt endpoint is not checked. The
> {{UsernameProvider}} instances created in
> {{SubscriptionManager.performConnect}} use the two-argument constructor,
> which has the same default. Unlike milo-server
> ({{defaultCertificateValidator}}), the client has no option to configure
> trust material.
> Proposed changes:
> * Add client options to configure server certificate validation: a trust list
> directory, using Milo's file based trust list layout as milo-server does, and
> a {{CertificateValidator}} bean reference (explicit, not autowired).
> * Validate the server certificate by default when the selected endpoint uses
> a security policy other than None, and fail with a clear message when no
> trust material is configured. Accepting any server certificate stays
> available only through an explicit {{trustAllCertificates}} option marked
> {{security = "insecure:ssl"}}.
> * Pass the configured validator to the {{UsernameProvider}} instances.
> * Document how to configure trust in milo-client-component.adoc, recommend
> restricting {{allowedSecurityPolicies}}, and correct the note about
> configuring custom certificate validators.
> * Add an upgrade guide entry: clients that use a secured security policy need
> trust material, or the explicit option, after upgrading.
> _Claude Code on behalf of Andrea Cosentino_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)