Skip to main content

Prepare your development environment

This article helps you set up your development environment to ensure you have the required software and access to build custom plugins for DigiCert​​®​​ Trust Lifecycle Manager. It also shows you how to verify your development environment by running a test build of the example plugin repository.

Required software

Your development system must support cloning Git repositories and executing Bash shell scripts:

  • The example repositories for developing custom plugins are hosted on GitHub.

  • The build script for each plugin type is a Bash shell script.

Notice

Windows users

You can clone the example repositories using GitHub Desktop or another Git client. To run the build script using Git Bash, you also need Git for Windows.

The example plugin repositories are Java projects based on the Apache Maven build system. The development system where you build the plugin must include the following software versions. If not already installed, use the links to download each package.

Important

Make sure you have a JAVA_HOME environment variable pointing at the Java installation directory.

To view and work on the example plugin repository, DigiCert recommends using an integrated development environment (IDE) such as IntelliJ IDEA, Eclipse, or VS Code. The IDE helps resolve dependencies and ensures the project development environment is configured correctly.

Notice

The instructions on this page focus on IntelliJ IDEA. Configuration of other IDEs follows a similar process. Consult your IDE's official documentation for details.

Before you begin

Make sure you've read the Plugins overview and understand the type of plugin you're building. Trust Lifecycle Manager supports three different types of plugins:

  • Discovery: Import discovery data from external scan services and providers.

  • Automation: Manage certificates installed on network appliances and cloud services.

  • Certificate delivery: Deliver certificates to different system types and perform any required post-delivery work for them.

Important

The system type targeted by your plugin must support remote management through APIs, SSH, or similar mechanisms. Your custom plugin code defines how to connect to the system over the network and perform operations on it.

You need access to the following private repositories under the DigiCert organization in GitHub, depending on which type of plugin you're building. For questions or help getting access, contact your DigiCert account representative or solutions engineer.

Once you've verified access to the example repository from your GitHub user account, set up a personal access token (classic) in GitHub to use for building your plugin. You'll need this later when configuring the project settings.

To create a new classic token in GitHub:

  1. Sign into your GitHub account.

  2. Select your avatar on the top-right, and select Settings.

  3. Scroll down and select Developer Settings on the left.

  4. Under GitHub Apps on the left, toggle open the Personal access tokens dropdown and select Tokens (classic).

  5. Open the Generate new token dropdown, and select Generate new token (classic).

  6. Configure the following options for the new classic token:

    • Note: Enter a friendly name to help identify this token.

    • Expiration: Give the token an expiration date (recommended).

    • Enable the read:packages permission. This is the only required permission. You do not need to enable the parent permission (write:packages).

  7. Select the Generate token button at bottom to finish creating the token.

  8. On the response screen, copy the new token and save it somewhere safe for later use.

  9. Select Configure SSO next to the token.

  10. In the Single sign-on organizations dialog, under Available to authorize, select digicert to authorize access to the DigiCert organization using this token.

  11. Select Continue to authorize access.

Set up your environment

Step 1: Add Maven to your PATH

Make sure your PATH environment variable includes the Apache Maven bin subdirectory. The plugin build process uses the mvn command from here.

For example, if you installed the Apache Maven software to the /opt/maven directory on Linux, update your PATH as follows:

export PATH=/opt/maven/bin:$PATH

If your PATH is set up correctly, the following command should execute and show the current Maven version:

mvn -version 

Important

The command response should show Maven version 3.6 or later and Java version 17 or later. If not, upgrade your software.

Step 2: Set up the GitHub repository

  1. Clone one of the example GitHub repositories to your development system, depending on which type of plugin you plan to build. The SDK repository does not need to be cloned; these libraries are automatically downloaded during the build process.

  2. After cloning the example repository, create a new branch of it on your system to use for custom development work.

  3. To facilitate building the project, create the following system environment variables:

    Variable name

    Value

    GITHUB_ACTOR

    Your GitHub username.

    GITHUB_TOKEN

    Your GitHub personal access token (classic). For details, see GitHub access.

    For example, use commands like the following to create these environment variables on Linux:

    export GITHUB_ACTOR="my-github-username"
    export GITHUB_TOKEN="ghp_XXXXXXXXXXXXXXXX"

Step 3: Open the project in your IDE

Follow these steps to import the example plugin project into IntelliJ IDEA. The process is similar for other Java IDEs.

  1. From IntelliJ IDEA, select the option to Open an existing project.

  2. Select the folder where you cloned the GitHub repo for the example plugin.

  3. Select Trust Project in the modal that opens.

    The project loads and displays the files in the browser pane on the left.

  4. From the File menu, select Project Structure.

  5. Open the SDK dropdown, and select the Java Development Kit (JDK) version to use.

    Important

    Must be Java version 17 or later. If you have not installed Java yet, download and install it before you proceed. Make sure you have a JAVA_HOME environment variable pointing at the Java installation directory.

  6. Select Apply to save your change.

Run a test build

To build the plugin, use the Bash shell to execute the build.sh script in the project root directory.

Using IntelliJ IDEA:

  1. Configure the default shell under File > Settings > Tools > Terminal > Shell path. For example:

    • Windows: C:\Program Files\Git\bin\bash.exe (Git Bash)

    • Linux or macOS: /bin/bash

    • Adjust the shell path as needed based on your system setup.

  2. Open the Terminal tab from the bottom panel.

  3. Use the pwd and ls commands to make sure you're in the project root directory. You should see the build.sh script listed.

  4. To ensure the build script is executable, make the chmod +x build.sh command.

  5. Build the project with the ./build.sh command. The build process:

    • Verifies your GitHub credentials.

    • Downloads the required dependencies from the plugins SDK.

    • Builds the Zip file and calculates the checksum for it.

  6. To verify the build, change into the plugin-dist subdirectory. You should see the plugin Zip file and checksums files here. The Zip file is the one you will upload into Trust Lifecycle Manager after customizing your plugin for use in production.

What's next