9. Using audit data into plugins for WAPT package compliance and for external services WAPT Enterprise feature only

9.1. Displaying host audit data in the WAPT Console WAPT Enterprise feature only

You can manage audit output and display the audit result if you activate the option in the View ‣ Display Preferences Tab. Check the Show host audit data tab to see the tab Audit Data on each client.

Window showing the advanced preferences

Window showing the advanced preferences

To use audits in WAPT packages, visit this page to manage audit_data.

9.1.1. Displaying encrypted data with a certificate in the audit data tab

With audit function, it is possible to encrypt sensitive data coming from remote hosts; it will be possible to read the encrypted sensitive with a certificate installed on the WAPT Administrator’s host. This way, the WAPT Server may store sensitive inventory data without the WAPT Server becoming a sensitive asset.

This method is particularly useful for example for securely managing LAPS random passwords in WAPT.

In setup.py, you can use a function to encrypt data with a certificate. If you have the private key matching the certificate that was used to encrypt the data, the data will be decrypted and it will appear in a readable form.

Here is an example of code:

# -*- coding: utf-8 -*-
from setuphelpers import *
from waptcrypto import print_encrypted_data

def audit():
  randompassword = '1234'
  print_encrypted_data(randompassword, glob.glob('*.crt'))

This code will encrypt the password 1234 with all certificates present on the host that is used to manage WAPT. From the WAPT Console, you will see in the audit_data tab the crypted version and you can decipher the data with your private key associated to the public certificate that was used to encrypt the data.

Audit data result showing crypted and decrypted version

9.2. Synchronizing WAPT inventories to GLPI WAPT Enterprise feature only

9.2.1. Working principle

WAPT Enterprise offers synchronization between the inventories of your hosts and GLPI ITSM Software.

The method automatically synchronizes changes on your IT infrastructure with the GLPI server.

WAPT can synchronize with GLPI 10 using the native JSON API. WAPT can synchronize with GLPI version 9.x using the FusionInventory plugin with XML format.

Attention

GPLI on WAPT does not work with Kerberos authentification for GLPI.

If you use Kerberos for GLPI, exclude glpi/plugins/fusioninventory/ from the Nginx authentification.

9.2.2. Installing the required dependencies for GLPI 9.x

In order to receive inventories on the GLPI server, the FusionInventory plugin will need to be installed on the GLPI server. This is not required for GLPI 10 which has its own native JSON API.

After installing FusionInventory on the GLPI server, an endpoint needs to be configured on the WAPT Server to send the inventories to the GLPI server:

http:/glpi.mydomain.lan/glpi/plugins/fusioninventory/

9.2.3. Configuring WAPTAgent and sync package

Install and configure the WAPT Agent on the computer that will run the synchronization. The WAPTAgent is installed by default on the WAPTServer, it just need to be configured.

To configure the WAPTAgent, please refer to the corresponding documentation.

Then you need to install the GLPI sync package:

You need to configure an audit schedule on the agent

[global]
...
waptaudit_task_period=120m
...

With the chosen package, it will create two ini file in your $WAPT_INSTALL_DIR/private (linux : /opt/wapt/private, windows : C:Program Files (x86)waptprivate`). Connect to the host and modify glpi.ini and wapt_api.ini files.

  • For GLPI9:

    [glpi]
    username = glpi
    password = xxxxxxx
    url = https://glpi.xx.xxxxx.xx/plugins/fusioninventory/
    
  • For GLPI10:

    [glpi]
    username = glpi
    password = xxxxxxx
    url = https://glpi.xx.xxxxx.xx/front/inventory.php
    

For GLPI10, please also ensure inventory is enabled.

For both GLPI9 and GLPI10:

[wapt]
username = waptregister
password = waptregister2023!
url = https://srvwapt.ad.tranquil.it

To test the current configuration, you can trigger an audit

wapt-get audit tis-glpi-plugin-export-to-glpi9
# or
wapt-get audit tis-glpi-plugin-export-to-glpi10

9.2.4. Current items sent by WAPT to the GLPI server

Description of items

Value

Sent

Not sent

Computer name

Feature available

User name

Feature available

Description

Feature available

OS name

Feature available

OS version

Feature available

Language

Feature available

CPU

Feature available

Memory

Feature available

Battery

Feature available

Chassis type

Feature available

Physical or virtual

Feature available

Network card configuration

Feature available

Printer list and properties

Feature available

Installed software [1]

Feature available

Network drives

Feature available

Environment variables [2]

Feature available

Display screens references

Feature available

Mouse and keyboard references

Feature not available

Controllers card references (except graphic card)

Feature not available

Antivirus version

Feature not available

Firewall state

Feature not available

Local group list

Feature not available

Memory bank list and state

Feature not available

USB ports list and connected devices

Feature not available

Printer status

Feature not available

Card readers

Feature not available

System wide Appx list

Feature not available

Footnotes

9.2.5. Possible errors in reported inventory on the GLPI server

Inventories uploaded by the WAPT Server to the GLPI server may be incomplete or may have errors when compared to inventories uploaded directly by the FusionInventory agent deployed on hosts. One reason is that WAPT aims to report only the most important values.

If you feel that important items are missing or are reported in a wrong way, please report the issue to the Tranquil IT dev team.

To report the issue, you will need to send 2 .xml files.

  1. First, install the FusionInventory agent on the computer on which you are observing a missing or wrongly reported inventory item.

  2. Run the FusionInventory agent and extract the report into a .xml file.

"C:\Program Files\FusionInventory-Agent\fusioninventory-inventory" > %TEMP%\inventory.xml
  1. Set the debug directory in the waptserver.ini.

glpi_inventory_debug_directory = /tmp/glpi
  1. Restart the WAPT Server

  2. Retrieve the /tmp/glpi/UUID.xml file from the WAPT Server, the UUID being the identifier of the host.

  3. Send the 2 files to the Tranquil IT dev team.

9.3. Synchronizing WAPT inventories to Cyberwatch for security breaches WAPT Enterprise feature only

9.3.1. Working principle

WAPT Enterprise offers synchronization between the inventories of your hosts and Cyberwatch ISVM Software.

The method automatically synchronizes information about updates or installed softwares to Cyberwatch tool in order to scan and alert you about detected vulnerabilities.

9.3.2. Configuring Cyberwatch server side

  • Connect to your Cyberwatch server and go to your profile.

  • In the API section, click on See my API Keys.

  • Click on Add and name your API access key for WAPT.

    Enter API key name, access_level and expiration
  • Set the access level to Full and give an expiration date. If you don’t give one, the key will never expire.

This key with its API access key ID will allow you to use the Cyberwatch API for our WAPT package.

9.3.3. Configuring WAPTAgent and sync packages

Install and configure the WAPT Agent on the computer that will run the synchronization. The WAPTAgent is installed by default on the WAPTServer, it just need to be configured.

To configure the WAPTAgent, please refer to the corresponding documentation.

Yu can have two packages :

You need to configure an audit schedule on the agent

[global]
...
waptaudit_task_period=120m
...

With the package, whichever you chose (you can oblviously choose both), it will create two ini files in your $WAPT_INSTALL_DIR/private (linux : /opt/wapt/private, windows : C:Program Files (x86)waptprivate`). Connect to the host and modify cyberwatch_api.ini and wapt_api.ini files.

[cyberwatch]
api_key =
secret_key =
url = https://cyberwatch.mydomain.lan
[wapt]
username = waptregister
password = waptregister2023!
url = https://srvwapt.ad.tranquil.it

To test the current configuration, you can trigger an audit

wapt-get audit tis-cyberwatch-plugin-import-from-cyberwatch
# and/or
wapt-get audit tis-cyberwatch-plugin-export-to-cyberwatch-airgap