Skip to content

Installing the CodeLogic Java Agent (Windows)

The agents send metadata to the CodeLogic Server, they are installed on the servers upon which the applications or databases are running. The applications and databases to be scanned are specified in the agent configuration files.

  1. Install a Certificate
  2. Download the Windows Java Agent
  3. Run the Installer
  4. Execute or Start the Agent
  5. Authorize the Agent

Install a Certificate

Important

If you are using HTTPS you will need to install a certificate. If you are not using HTTPS skip to the next step.

Importing root/intermediate certificate to JDK

& 'C:\Program Files (x86)\CodeLogic\java\AdoptOpenJDK\bin\keytool.exe' -keystore "C:\Program Files (x86)\CodeLogic\java\AdoptOpenJDK\lib\security\cacerts" -storepass changeit-alias codelogic -file path\to\yourCertificate.cer

Download the Windows Java Agent

  1. Click Admin and then select the Installers tab.

    CodeLogic Admin Installers Page

  2. Click Download on WindowsJavaAgent to download the Windows installer package.

Run the Installer

  1. Double-click the downloaded codelogic-java.msi icon to begin installation.
  2. Read and Accept the License Agreement and click Next.
  3. Enter the IP address of the CodeLogic Server and click Next.
  4. Optionally, enter a descriptive name for the agent.
  5. Complete the installation.

Execute or Start the Agent

The CodeLogicJava Agent (Windows) can be executed through a Command-Line Interface (CLI) or started through the Graphical User Interface (GUI).

The Windows CLI is in C:\Program Files (x86)\CodeLogic\java\run_agent.bat.

Note

The agent must not be running for an interactive session to start.

The examples assume that java is Java 11.

A list of commands executed while in the shell is saved in a text file of the current working directory.

You may be required to start a cmd terminal as an Administrator.

Commands

cd "C:\Program Files (x86)\CodeLogic\java"  
SET JAVA_HOME="%CD%\AdoptOpenJDK"  
%JAVA_HOME%\bin\java -Dspring.profiles.active=interactive -jar "%CD%\cc-java-agent-main.jar"
Alternatively, the run_agent.bat script is used to run the agent interactively.

Commands

"C:\Program Files (x86)\CodeLogic\java\run_agent.bat"

Double-click the Java Agent CLI shortcut on the desktop or from the Start menu below CodeLogic.

The agent will start and await registration confirmation from the CodeLogic Server. When the agent is approved by the CodeLogic Server, the agent is run interactively. Executing Agents Interactively via the CLI

Interactive Agent Session

Important

If the application.yml file is not configured, the agent will not start:

Configure application.yml file

Authorize the Agent

For security, agents must be authorized before they will send metadata to the CodeLogic Server.

  • Click Admin and then select the Agents tab.
  • Locate the agent in the list.

Note

The Request Status will be listed as OPEN.

  • Click the more menu icon in the Actions column and select Approve/Reject.

    • The Approve window opens.
  • Optionally, enter a name for the agent in the Agent Name field.

  • Click Approve to complete the authorization process.
    Windows Java Agent Approve Window

Next Steps To run a scan, see Binary Scanning via Command Line (Java).