Creating Plugins

To, for example, extend the RA functionality considerably, possibly including additional database tables as well, you may consider using the EJBCA plugin scheme which provides custom applications with the core EJBCA environment data. In the directory src/samples/plug-ins you will find a couple of complete demo plugins that can be added to an existing EJBCA installation without any configuration.

Including your own plugins in EJBCA

There are two methods of creating plugins for EJBCA:

Including External JARs on the Classpath

This may be the easier method for some and involves pre-compiling your own JAR (preferably using one of our plugin interfaces and a manifest file, see below) and making sure it's available on the classpath. To enable this:

  1. Modify the file plugin.properties.sample (renaming it to for example widget.properties) and place it in either conf/plugins in your local EJBCA directory, or under ejbca_custom/conf/plugins if you're using an external configuration directory.

  2. Make sure that the file contains the following line:

    plugin.ejbca.lib.dir=/home/demo/myplugin/dist/

    where the directory points to the location of your compiled JAR file.

Including External Source Directories

The other variant is to create a source directory alongside EJBCA from which EJBCA can copy source files from. While this variant may be simpler to maintain due to sourcing the EJBCA libs directly from EJBCA, it may also be more difficult to set up a development environment against. To enable this:

  1. Modify the file plugin.properties.sample (renaming it to for example widget.properties) and place it in either conf/plugins in your local EJBCA directory, or under ejbca_custom/conf/plugins if you're using an external configuration directory.

  2. Make sure that the file contains the following line:

    plugin.ejbca.ant.file=/home/demo/myplugin/build.xml

    which points to the build file of your plugin.

For more information on setting this up, see plugin.properties.sample.

Plugin Interfaces

There are several plugin interfaces where you can extend functionality using your own classes. Using any of the interfaces mentioned below, including a manifest file in the JAR and making sure that the JAR is available on the class path (see above) during construction of the EJBCA EAR will lead to the plugins automatically appearing where relevant.

  • Developing Custom Publishers: For more information, see Custom Publishers in Publishers.

  • Writing Customized Services: It is possible to write customized component plugins that can be used with other standards (or customized plugins). For more information, see Writing Customized Services in Services.

  • User Data Sources: The User Data Sources framework allows importing user data from existing databases and enables importing user data from an LDAP and AD. For more information, see User Data Sources.

  • Custom Certificate Extensions: Customized Extensions can be added and removed in the Custom Certificate Extensions tab in the System Configuration page. For more information, see Custom Certificate Extensions.

  • Custom email notification recipients: E-mail notification can be sent when a status changes for an end entity, for example when a new user is added. For more information, see E-mail Notifications.

Since it is open source, you can modify anything you like, or use any of the interfaces and create your own add-ons. See below for how to easily manage such add-ons and plugins.