Dynamic Runtime Scanning (Java)
Instrument Your Application
Section titled “Instrument Your Application”Download the Java dynamic instrumentation agent JAR from your Lineai server:
wget http://your_server/lineai/server/packages/java-dynamic-agent.jarReplace your_server with your Lineai server hostname. Save the jar file in a location your application can access.
Add the following to your application’s JVM options:
-javaagent:"/path/to/java-dynamic-agent.jar" -Xbootclasspath/a:"/path/to/java-dynamic-agent.jar"-Dlineai.url=http://serverhost.app.lineai.com/lineai/server-Dlineai.username="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"-Dlineai.password="agentpassword"-Dlineai.namespaces=com.example,com.secondexample-Dlineai.scanSpaceName=Default
Run your application.
Authorize the Agent
Section titled “Authorize the Agent”For security, agents must be authorized before they will send metadata to Lineai.
Obtain AGENT_UUID and AGENT_PASSWORD from your Lineai administrator, or set these environment variables before starting the agent. If credentials are not pre-provisioned, the agent may register with the server and await administrator approval before scans are accepted.
Stop the Scan
Section titled “Stop the Scan”Stop your application to stop the scan.