-
Epic
-
Resolution: Fixed
-
Major
-
Split Trilead out from Jenkins Core
-
-
Jenkins 2.186
Jenkins core currently bundles version 8 of the Jenkins fork of Trilead to provide SSH client functionality. Multiple plugins depend on this provision to utilize Trilead classes, so don't bundle Trilead directly. A new version of Trilead has recently been released containing a number of security enhancements (strong MAC algorithms, strong key exchange methods, curve based cryptographic keys etc), but this requires one of the following:
- Jenkins core to update the bundled Trilead library. This means anyone using the weekly release from the point we include a new bundled library gets the new features, but users who only upgrade plugins or who are on an LTS release are stuck with an old Trilead version
- Any plugin that wants hardened SSH capabilities bundles Trilead directly, but then potentially breaks functionality shared between plugins: SSH credentials uses `Class.isAssignableFrom` to check it can provide credentials, which stops this plugin working if the plugin needing credentials hasn't loaded Trilead from the same classloader (currently core).
Since nothing in Jenkins core actually needs Trilead or the supporting classes that have been added to core for it, the logical change would be
- Copy the Trilead library and supporting classes into a plugin
- Update plugins that require Trilead so they depend on this new plugin
- Remove Trilead from the core and bundle the new Trilead plugin as a detached plugin
More plugins will be added to the components list for this issue as investigation is performed into what plugins depend on Trilead. Some plugins may be updated to remove references to Trilead classes where they're only using utility methods from Trilead, such as Base64 methods and `IOUtils.closeQuitely`.
Current changes required:
Component | Changes | PR Raised | PR Merged | Change Released |
---|---|---|---|---|
Jenkins Core (Phase 1) |
|
Yes | Yes | Yes |
Jenkins Core (Phase 2) |
|
Yes | Yes | Yes |
Token Macro Plugin | Remove unused import to com.trilead.ssh2.crypto.digest.MAC from JobDescriptionMacro | Yes | Yes | Yes |
SSHD Module |
|
Yes | Yes | Yes |
SSH CLI Auth Module |
|
Yes | Yes | Yes |
Credentials Plugin | Replace references to Trilead Base64 in CertificateCredentialsImpl.java with hudson.remoting.Base64 | Yes | Yes | Yes |
Trilead API Plugin | Create new plugin containing Trilead library from Jenkins core and release it to update centre | Yes | Yes | Yes |
Other changed to be confirmed
- causes
-
JENKINS-58483 Jenkins 2.185 won't connect to SSH agents
- Resolved
- links to