Deploying Supervisor in the App Server
Deploying Supervisor in the App Server in Supervisor Installation and Configuration Guide.
Deploying Supervisor in the App Server#
Deploy the Supervisor in the app server to collect forensic data from the Oracle DB remotely, as below:
1. Create a Supervisor for the DB server.
2. Navigate to the directory below.
<Installation_Path>/supervisor/config
3. Edit the config.json file
Provide the IP address of the DB server to collect the forensics in the host address field.
For example:
{
"name": "Linux_20004",
"hostBoxName": "localhost",
"supervisorTypeName": "UnixSupervisor",
"version": "1.0",
"hostAddress": "192.0.2.39",
"status": true
}
4. The application server has a Supervisor and a forensic agent running on it. Configure another Supervisor in the App server. Do the configurations in the config.json file.
Note: There is no need to deploy another Forensic agent.
Security Constraints#
The Supervisor executes the start and stop processes after signature verification for the respective scripts.
If you modify any script externally post-deployment, then signature verification fails.
The supervisor tracks these scripts using the corresponding .sig files.
Before executing any script, the Supervisor checks if the script has been modified or not. The Supervisor checks the signatures of these scripts. If you modify any script externally, then the signature verification fails. In this case, the Supervisor logs an error, and the Supervisor does not execute the script.
The Supervisor tracks the binary file present inside the Supervisor folder using the file checksum.
If the Supervisor binary file is tampered with, then Supervisor.sh does not start the Supervisor.
Note: We do not recommend you to modify any script or binary file.
Discovery Agent Scheduler#
This scheduler is required to trigger the Discovery Agent on the target machine to monitor the component list actively. A scheduler will be introduced to the Supervisor to schedule the Discovery Agent’s execution at a configurable interval.
Discovery Agent Scheduling Types#
1. Discovery-agent scheduling in Supervisor.
2. The Discovery Agent can be scheduled via the Control Center (CC) through the Supervisor.
Prerequisites#
1. Provide the root privileges to execute and identify all the components running on the target machine.
2. The sudo utility will be utilized to run the script with root privileges.
3. The following must be installed: Component Agent, Discovery Agent, and Java.
4. The agent installer directory must be properly organized to manage installations efficiently.
For Information: If a cacerts file is available, the Discovery Agent will be triggered online. Otherwise, it creates a JSON file offline.
Discovery Agent Scheduler Configuration#
Follow the steps below to configure the Discovery Agent Scheduler:
1. Direct Execution: Run the script directly or pass the Discovery Agent directory as an argument.
a. Directory Lookup: If executed directly, the script looks for the Discovery Agent directory based on the agent installation structure.
b. Argument-based Execution: If the Discovery Agent directory is provided as an argument, the script searches for the discovery-agent jar file within that directory.
2. Dependency Check: The script checks for dependencies and, if met, triggers the Discovery Agent.
The Config File
Config filename: scheduling.config.json
For example:
{
"Tasks":[
{
"supervisorIdentifier": "Supervisor",
"agentIdentifier": "7d28e065-a960-40b7-9b11-cb7cbd16ea58",
"commandJobID": "60dbb53e-6255-48a1-ab25-0664d102eb76",
"commandType": "AgentOperationCmds",
"commandOutputType": "Blob",
"commandExecType": "Execute",
"triggerSource": "ControlCenter",
"userDetailsId": "7640123a-fbde-4fe5-9812-581cd1e3a9c1",
"retryNumber": 3,
"triggerTime": 1723787015354,
"supervisorCtrlTTL": 300000,
"commandTimeout": 300000,
"violationTime": 1723787015354,
"metaData": {
"accountId": "example",
"agentType": "Supervisor",
"discovery_agent_path": "/scripts",
"scriptName": "RunDiscoveryAgent",
"interval": "2",
"runAsSudo": "true",
"commandId": "enable_schedule",
"status": "In-progress"
},
"command": "enableSchedule",
"agentType": "Supervisor",
"arguments": {
"discovery_agent_path": "/home/user/Agents/discovery-agent"
},
"envArgs": {}
}
]
}
Discovery Agent Scheduling and Execution in Supervisor#
Below are the steps for Discovery Agent scheduling and execution in the Supervisor:
1. Initialization: When the Supervisor starts and successfully connects to the Control Center (CC) via the Supervisor Controller, the Discovery Agent is scheduled as a task.
2. Immediate Execution: The Discovery Agent executes immediately upon initial startup.
3. Interval-Based Execution: The Discovery Agent will execute at regular intervals based on the configuration file after the initial run. The default execution interval is 1440 minutes (24 hours).
4. Scheduling Types:
a. enableSchedule: Starts the Discovery Agent task and schedules the next run.
b. disableSchedule: Stops and disables the Discovery Agent schedule.
5. Dynamic Scheduling: Any modification to the schedule via CC will discard the previous task and issue a new task with an updated schedule.
Modifying the enableSchedule type triggers an immediate execution of the discovery agent, followed by the updated schedule.
6. Root Privilege Execution: By default, the supervisor attempts to run the Discovery Agent as a sudo user.
This is configurable through the JSON config file.
7. Execution as Root or Non-Root: Commands sent from the CC specify whether to execute as root or non-root.
a. Non-root: Follows the existing execution flow.
b. Root: The supervisor uses the SudoHelper utility to execute the below command.
RunDiscoveryAgent.sh