Eclipse SSL trust management: no UI mechanism for temporary host trust exceptions
0 reputation · 08 May 2020, 21:29 UTC
0 reputation · 08 May 2020, 21:29 UTC
Eclipse's Communication Framework (ECF) and p2 update mechanism delegate all HTTPS certificate validation to the Java Runtime Environment's JSSE provider. The platform does not maintain a separate trust store nor expose a per-host trust exception UI, meaning certificate chain failures surface as PKIX path building errors regardless of whether the endpoint is a Marketplace update site, a Maven repository accessed through m2e, or a Git remote operated by EGit.
This design creates uncertainty for deployments in CI containers, corporate environments with custom JDK distributions, or scenarios involving MITM proxies that re-sign certificates with internal CAs. Error text varies across JRE vendors while the root cause remains a trust-store mismatch. Furthermore, the m2e connector may cache repository metadata from a previously successful connection, masking intermittent validation failures until cache expiry or a forced metadata refresh.
Given the project's current architecture, what would be required to implement a per-project or per-repository trust store preference within Eclipse's stack? How can distribution packages isolate SSL trust configuration from the host JRE without resorting to VM arguments or manual keytool imports? Is there a viable architectural path toward a UI-driven trust exception model that respects the platform's delegation model?
35275 reputation · 09 May 2020, 00:52 UTC
Eclipse has no per-host trust exception UI because nothing in its networking stack owns certificate trust. ECF, p2, m2e, and EGit/JGit all delegate TLS validation to the JVM's default SSLContext (JSSE), which consults the process-wide trust store — typically $JAVA_HOME/lib/security/cacerts or whatever javax.net.ssl.trustStore points at. A PKIX path building error is the JRE talking, not Eclipse, and Eclipse has no preference page, no trust store, and no callback hook that intercepts that failure. Implementing per-project or per-repository trust requires new platform code, not configuration.
Because the SSLContext is process-wide, every consumer — p2 update fetches, m2e repository access, JGit operations — shares one trust decision. That explains two things in your scenario:
mvn -U or "Update Project"). That is Maven caching behavior, not an Eclipse SSL feature.There is no supported preference for this today. The realistic architectural path is an ECF-level contribution:
SSLContextFactory via ECF's filetransfer SSL extension (see org.eclipse.ecf.provider.filetransfer.httpclient4 for the existing hook).TrustManager: on validation failure, check a project- or host-scoped certificate store persisted in IEclipsePreferences (instance scope).SSLContext.Two hard caveats: replacing the SSLContext dynamically is not thread-safe against already-open connections, and a custom ECF factory does not cover EGit — JGit uses the JVM context independently and would need its own configuration.
Without code changes, the only working mechanism is launch-time, not UI-time:
cacerts and launch with -Djavax.net.ssl.trustStore=... in eclipse.ini — still a VM argument, but packaged, not manual.Run Eclipse with -Djavax.net.debug=ssl:trustmanager and trigger a p2 update to confirm exactly which trust store is consulted. Note that Eclipse 2024-09+ requires Java 21, whose JSSE disabled-algorithm defaults differ from Java 11/17 — validate any prototype against the JRE you actually ship.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.