Coder Social home page Coder Social logo

jtnord / bouncycastle-api-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jenkinsci/bouncycastle-api-plugin

0.0 2.0 0.0 209 KB

This Jenkins plugin provides an stable API to Bouncy Castle related tasks

Home Page: https://plugins.jenkins.io/bouncycastle-api

Java 100.00%

bouncycastle-api-plugin's Introduction

Jenkins Bouncy Castle API Plugin

Jenkins Plugin GitHub release Jenkins Plugin Installs

This plugin provides a stable API to Bouncy Castle related tasks. Plugins using Bouncy Castle should depend on this plugin and not directly on Bouncy Castle.

Implementation

The implementation of this plugin does not expose any classes from Bouncy Castle, only JCA, allowing plugins to not depend on the specifics of Bouncy Castle.

Later some other actions would have to be taken in order to fully solve this situation, like having one version of the plugin for each version of Bouncy Castle, etc.

Release notes

Motivation

Dependency to multiple Bouncy Castle versions from jenkins core and plugins is causing problems due to the binary incompatibility between versions, the different supported algorithms, etc. See JENKINS-35291 for the full context.

On Jenkins core 1.648, Bouncy Castle was bumped from version 1.47 to 1.54 as a result of a change in instance-identity module

Problems found:

  • Plugins running in Jenkins < 1.648 get 1.47 from the parent class loader (in the default class loading strategy). If they include a later version in their own classpath, only "new" classes are seen from their referenced JAR.
  • Plugins running in Jenkins >= 1.648 get 1.54 from the parent class loader (in the default class loading strategy). If they include an earlier version in their own classpath, only "removed" classes are seen from their referenced JAR.
  • If the plugin is using JCA instead of BC classes directly usually the plugin works, but if ran in an BC 1.47 Jenkins core, there will be missing algorithms.
  • Plugins are introducing different versions of BC which adds to de mix, potentially producing unpredictable results

Some considerations:

  • Many plugins are only introducing BC dependency to do PEM encoding/decoding. This API got changed by the BC bump.
  • instance-identity-module is using BC only for PEM encoding/decoding, removing this dependency from the core is possible

Proposed solution A possible solution to this problem would to create a plugin (this plugin) from which plugins using BC will depend. Responsible for:

  • Load BC into uber class loader.
  • Register BC as a JVM security provider in order to allow other plugins to use JCA API with BC algorithms.
  • Provide an API to do common tasks like PEM Encoding/Decoding ensuring its stability among BC versions.

bouncycastle-api-plugin's People

Contributors

alvarolobato avatar amuniz avatar batmat avatar dependabot[bot] avatar dwnusbaum avatar jeffret-b avatar jglick avatar oleg-nenashev avatar recena avatar res0nance avatar sicarri avatar stephenc avatar thomasgl-orange avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.