You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/08/03 06:47:00 UTC

[jira] [Assigned] (OFBIZ-13476) MultiTrustManager does not perform real X.509 chain validation, breaking outbound HTTPS to external servers.

     [ https://issues.apache.org/jira/browse/OFBIZ-13476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Pathak reassigned OFBIZ-13476:
-------------------------------------

    Assignee: Mridul Pathak

> MultiTrustManager does not perform real X.509 chain validation, breaking outbound HTTPS to external servers.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-13476
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13476
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: 24.09.07
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Major
>
> {\{MultiTrustManager.isTrusted()}} (\{{framework/base/src/main/java/org/apache/ofbiz/base/util/MultiTrustManager.java}}, lines 130-149) trusts a certificate only if it is byte-equal to one already sitting in a configured KeyStore. It never validates the chain up to a trusted root, so any certificate signed by a trusted CA but not itself pre-stored verbatim -- essentially every real, rotating external certificate -- is rejected even though the correct root CA is present and trusted.
> Confirmed live: an HTTPS call to \{{oauth2.googleapis.com}} failed with "No trusted certificate found", while the JDK's own default trust manager accepted the exact same certificate chain using the exact same \{{cacerts}} truststore. Same applies to any custom root CA added via a component's \{{is-truststore="true"}} keystore -- installing the CA isn't enough, since only literal cert matches are trusted.
> Affects all outbound HTTPS via \{{HttpClient}}/\{{SSLUtil.getTrustManagers()}} -- webhooks, REST integrations, and the OAuth2 token-refresh flow in OFBIZ-13474.
> h3. Suggested fix
> Build an in-memory KeyStore from the same trust anchors \{{getAcceptedIssuers()}} already collects, initialize a standard \{{TrustManagerFactory}} with it, and delegate \{{checkClientTrusted}}/\{{checkServerTrusted}} to the resulting real \{{X509TrustManager}}.



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