Eyeglass Solutions Publication

Centreon Zero Trust Alert Integration

Home



 

Overview

Customers using Centreon can leverage this integration to send real time zero trust alerts using webhooks and maintain full payload parsing using json defined fields.   The Centreon Alert Ingestion Connector capability within the platform allows inbound webhook json payload to be parsed and turned into host status updates. 


Support Statement

  1. NOTE:  This documentation is provided "as is" without support for 3rd party software.  The level of support for this integration guide is best effort without any SLA on response time.  No 3rd party product support can be provided by Superna directly.  3rd party components require support contracts

Limitations


Solution Overview

Superna Data Security Edition  Zero Trust API is the cornerstone technology used to integrate with SIEM and SOAR platforms.    This integration offers alerts mapped to a NAS storage host created in the Centreon platform.


What is Centreon?

Centreon provides an AIOps-ready, business-aware IT monitoring platform that offers unified, end-to-end observability across complex, converging infrastructures, from cloud-to-edge, for organizations of all sizes.

Integration Architecture



Solution Configuration in Centreon and Defender Zero Trust

Prerequisites

  1. Installed Data Security Edition subscription product
  2. Eyeglass OS appliance version 15.5
    1. cat /etc/os-release
  3. License key for the Zero Trust API  
  4. Centreon on premise configured with https


Configuration in Centreon

  1. Login to the console

  2. Create a new host for your storage 
    1. Enter a name for your storage device and ip address (or one of the IP addresses on your storage device). 
    2.  
    3. Save the host entry
    4. The url at the top will show the host_ID at the end. Record this value
      1.  http://x.x.x.x/centreon/main.php?p=60101&o=c&host_id=5 
    5. Update the poller
      1. Click Export Configuration
      2. Select the poller in the drop down list
      3. Check the boxes as shown and restart option and click export
      4. This will add the host to the poller to allow updates API to host status.
  3. Create api token
    1.  
    2. Enter the correct username in the drop down with permissions to update hosts.  Consult documentation or contact Centreon support for specific permissions.
    3. Record the API token for steps below
  4. Done.

Configuration Steps on Eyeglass Virtual Machine

High Level steps

  1. Create python location to run the application on the Eyeglass vm
  2. Create python main application script
  3. Create linux systemd service and set to auto start
  4. Create Zero Trust configuration in Defender
  5. Update the main script to customize with Centreon  python code
  6. Test the script is running as a service
  7. Create a test event in Defender to validate the alerts appear as indexed parsed events in Centreon

Configuration Step by Step

  1. Login to the eyeglass VM as admin user
  2. Follow the steps below
Configure the Service start and python integration files
# Integration Deployment Instructions

Login to the Eyeglass VM via SSH as the admin user:
ssh admin@<your-vm-ip>

# Become root
sudo -s
mkdir -p /opt/superna/cgi-bin
chown -R sca:users /opt/superna/cgi-bin
chmod -R u+rwX,g+rwX /opt/superna/cgi-bin

# Switch to the SCA user
sudo -u sca -s
cd /opt/superna/cgi-bin

# Create Python virtual environment for the integration
python3 -m venv venv-centreon
source venv-centreon/bin/activate

# Install required Python packages
pip install flask boto3 requests logging
deactivate

# Create integration script files
touch centreon.py
touch centreon.sh
chmod +x centreon.py
chmod +x centreon.sh

# Create the centreon.sh launch script
nano /opt/superna/cgi-bin/centreon.sh
# Paste the following into the file:
#!/bin/bash
export PATH="/opt/.pyenv/bin:$PATH"
source /opt/superna/cgi-bin/venv-centreon/bin/activate
exec python /opt/superna/cgi-bin/centreon.py

# Make the script executable
chmod +x /opt/superna/cgi-bin/centreon.sh

# Exit back to root
exit
whoami # confirm you are root

# Create the systemd service unit file
nano /etc/systemd/system/.service
# Paste the following into the file:
[Unit]
Description=Webhook listener for Zero Trust API translations and integrations
After=network.target

[Service]
Type=simple
User=sca
Group=users
WorkingDirectory=/opt/superna/cgi-bin
ExecStart=/bin/bash /opt/superna/cgi-bin/centreon.sh
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

# Reload systemd to register the new service
systemctl daemon-reload

# Enable the service to start on boot (do NOT start it yet)
systemctl enable
Configure the python packages and customize the centreon integration python code


  1. Customize the application code by downloading the python code from this link to download (right click download as)
    1. Open the python template file in a text editor. NOTE: make sure to only replace the yellow values (ip address of your Centreon endpoint, the api token, and the host ID of your storage host created above)
    2. Locate this section in the file
      1. CENTREON_BASE = "https://x.x.x.x/centreon"
        CENTREON_API_TOKEN = "yyyyyyyyy"

        CENTREON_VERIFY_SSL = False
        HTTP_TIMEOUT = 15

        # 👇 Manual storage device host ID (must already exist in Centreon)
        STORAGE_HOST_ID = 5

    3. Paste the updated script into the production file
      1. nano /opt/superna/cgi-bin/centreon.py
      2. Open the file locally in Windows OS notepad and use control-A or select all the text.
      3. Paste the clipboard into the ssh terminal session with the open nano editor file
      4. save the file
        1. press control+x
        2. Answer yes to save and exit the nano editor 
  2. Start the service and verify it is running
    1. systemctl start centreon
    2. systemctl status -l centreon 
    3. Verify the service is started successfully and returns "active and running".
  3. If the service does not start do not proceed and double check the steps above are completed. 

Configure Defender Zero Trust Webhooks

  1. The next step creates an Zero Trust Webhook URL.    
    1. Configure Zero Trust endpoint in Ransomware Defender Zero Trust tab.
      1. Recommended Configuration: Only Critical and Major events and only the webhooks that set lockout or delayed lockout.   Customers can customize based on specific requirements. The goal is to send findings versus a list of alarms that do not pinpoint a security incident.
      2.    
      3. The endpoint url above will use localhost and will send Webhooks to the application service listening on port 5000. URL to use in the configuration
        1. http://localhost:5000/webhook
        2. Add the Content-Type header with value of application/json as shown above to complete the webhook configuration.
        3. Click save to commit the configuration.
        4. Click save on the main Webhook configuration page
  2. Test the configuration is working following the next section

How to test the Integration with Centreon

  1. To test the integration follow these steps
    1. download this curl command template and open with a text editor
    2. Copy all the text
    3. ssh to the eyeglass vm as the admin user
    4. paste the entire cli command to the ssh prompt to send sample data to the running Zero Trust application.  This will send test data directly to the application to be processed and sent to Centreon.
    5. The output of a successfully processed webhook test will return this text in the ssh terminal
      1. done sending event to abssiem and check for http 200 and success count in response
    6. How to review the process logs from the web application
      1. sudo -s 
      2. journalctl -f -u swimlansoc 
      3. This allows you to view the logs generated by the application.
      4. To log to a file and review with nano showing only the most recent 250 lines.
      5. journalctl -f -n 250 -u   > /tmp/ztwebhook.log
      6. nano /tmp/.log
      7. In the log below the response code from the Centreon api call should show http 200 status code and successCount 1 to indicate the Finding was successfully created.
      8.   You can also view .log for specific error messages.
    7. Login to the Centreon Main Dashboard to run a search for all supernaZT source messages.  enter a search with sourcetype="supernaZT" to locate events sent from testing.
  2. Done


Centreon SecOps administrators Integration Experience


  1. Timeline shows the history of alerts raised against the storage device and each entry represents a client IP and details of each alert.
    1.  



© Superna Inc