Skip to main content

Build certificate delivery plugins

Certificate delivery plugins are used to request and deliver certificates to remote systems using the Admin web request feature in DigiCert​​®​​ Trust Lifecycle Manager. Each certificate delivery plugin defines how to manage certificates for a particular system type. This article covers the Java classes and development process for building certificate delivery plugins.

Before you begin

  • Follow the steps in the Prepare your development environment topic to:

    • Access the example repository for this plugin type.

    • Configure the required development tools and settings.

    • Run a test build.

  • Make sure you understand the common project files for custom plugins.

  • Review the README file for the example plugin repository in detail.

Plugin development

To develop a certificate delivery plugin, create a branch of the example repository and update the Java class definitions with your custom logic:

  • Each plugin should target a particular type of system, for example a specific server application or load balancer model.

  • The target system must support remote management through APIs, SSH, or similar mechanisms. Your custom logic specifies how to connect to that system type to deliver certificates and perform any custom post-delivery work.

  • The certificate delivery workflow is initiated via the web-based Admin web request function in Trust Lifecycle Manager and must include steps to:

    • Generate the certificate signing request (CSR) on the DigiCert sensor host and return the CSR to Trust Lifecycle Manager to initiate certificate issuance.

    • Download the resulting certificate from Trust Lifecycle Manager to the sensor, deliver it to the target system, and perform any required post-delivery work.

Java classes

The example plugin repository provides the following Java classes under src/main/java/com/example/certdelivery and its subdirectories. To create your custom plugin, modify or extend the applicable class or method definitions in these files.

ヒント

Review the included Javadocs in the source files for details about expected inputs, outputs, and behavior for each method.

MyCertDeliveryPlugin.java

Description

The primary class that defines the custom logic for each certificate delivery plugin. It extends the AbstractCertificateDeliveryWorkflow class and performs tasks for requesting and delivering certificates for a particular system type via the Admin web request function in Trust Lifecycle Manager.

Customizations

To implement custom certificate request and delivery logic, update the code in the following methods, annotated with @Override.

MyCertDeliveryPluginHelper.java

Description

Provides static utility methods for CSR generation and certificate downloads and extraction.

Helper methods

The helper class provides the following public utility methods, which you can use in your custom plugin code.

MyCertDeliveryPluginRunner.java

Description

Acts as the entry point for the plugin, invoking the plugin object defined in MyCertDeliveryPlugin.java, along with the required SDK context object for sharing information across different methods and storing results at different execution points.

Customizations

This class should not typically be modified. If you do customize it, make sure the fully qualified class name matches the one in the pom.xml file.

MyPluginConfiguration.java

Description

Found in the extended/configuration subdirectory, this class defines the main configuration properties for the plugin instance. All properties you define here should have matching fields in the config_settings section of the configuration.json file for the plugin. This ensures that users provide values for these properties when configuring each instance (connector) of the plugin in Trust Lifecycle Manager.

Customizations

By default, this class defines variables to store user credentials (userName and password) for accessing the target system.

To customize:

  • Adjust the default variables if the target system uses an authentication method other than user credentials.

  • Add one or more variables to store any required network properties for connecting to the target system, such as its URL or IP address.

  • Define additional variables as needed to configure different settings for connecting and using each instance of the custom plugin.

Build the plugin ZIP file

重要

Before building the plugin, make sure your development environment includes the required software and settings. For details, see Prepare your development environment.

After adding your custom logic, build the plugin ZIP file on the development system as follows:

  1. From the top-level project directory, run the build script by making the ./build.sh command.

  2. The script prints status messages to the console as it executes. At the end, it generates and prints the SHA-256 checksum for the ZIP file, confirming a successful build.

  3. Find the final ZIP file for the plugin in the plugin-dist subdirectory. The ZIP file contains the plugin JAR file and metadata JSON file required by Trust Lifecycle Manager.

What's next

To add the plugin to Trust Lifecycle Manager, you must upload both the plugin ZIP file and corresponding JSON configuration file.

For details about the required JSON configuration format, see Create the plugin configuration.