Jump to content

KUMA: How to import assets exported from KSC CC to KUMA using API


Description

When we use Kaspersky Security Center Cloud Console (KSC CC), we cannot directly integrate KUMA with the KSC Server for collecting the asset information.

In this article, we will look at the steps to import assets from KSC CC.

Steps – plan

  1. Assets/Devices to be exported from the KSC CC

    Before exporting the data, make sure to select the columns: Name, IP Address, Domain, DNS domain, DNS name, IPV6 Address, and Operating System.

  2. Create an API token with the required access rights from KUMA Web interface.
  3. Modify the attached script with the IP address, API port, tenant ID, and API token.

  4. Copy files to the KUMA server and execute the script.

  5. Verify the assets in the KUMA WebUI.

Steps - detailed

1. Exporting the Assets from the KSC CC

  1. Login to your account at KSC CC and open your workspace.
  2. Navigate to Assets (Devices)  Managed Devices.
  3. Press on a gear icon to open a list of the displayed columns:
     
    image-2025-6-17_17-17-28.thumb.png.b6f3ea31d8b35d0e3a95d38ac84e67f2.png
  4. Press Select all or select these columns:
    • Name;
    • Operating System;
    • IP address;
    • Domain;
    • DNS domain;
    • DNS name;
    • IPV6 address.
  5. Select all devices and click Export to CSV.
    image-2025-6-17_17-17-28.thumb.png.b6f3ea31d8b35d0e3a95d38ac84e67f2.png
  6. Copy the downloaded CSV file to the KUMA server. Rename the file, if required.

2. Creating an API token from KUMA WebUI

  1. Login to your KUMA Core server.
  2. Navigate to Settings  Users. In the right part of the Settings section, Users will be displayed.
  3. Select the relevant user and click the API access rights button in the details area that opens on the right.
  4. Select/Clear the check box for the required operation. Alternatively, you can select all operations.
  5. Click on Generate token button in details area. A New token window opens.
  6. If necessary, set the token expiration date or select the No expiration date check box.
  7. Click Generate token, copy the generated token and save in a file. If you did not copy the token before closing the window, you will have to generate a new token.
  8. Click Save.

3. Getting information about Tenant ID

  1. Login to your KUMA Core server.
  2. Navigate to Settings  Tenants.
  3. Click on Export with All fields.
  4. Open the exported file named tenants.csv and take a note of the value for Main tenant.

4. Modifying the script

1. Download the attached file: assets_import.py

2. Modify these lines:

FILE_PATH = Put the path of the file CSV file from the KUMA server.

TOKEN = Token generated from above section (Create API Token from KUMA WebUI).

ADDRESS = IP Address/Hostname of the KUMA server.

PORT = 7223, This is the API port in Standalone KUMA.

TENANT_ID = Tenant ID exported from the Main Tenant.

Don't remove the single quotes ' from the line items, your values of parameters should be within single quotes 'value'

5. Copying files to KUMA and execute the script

  1. Connect to your KUMA server using WinSCP
  2. Copy the script assets_import.py and export.csv to any directory.
  3. From SSH session of KUMA server, navigate to directory with the files and provide execute permissions to the assets_import.py
    chmod +x assets_import.py
  4. Execute the script on the KUMA server with the below command.
    sudo python3 assets_import.py
  5. Verify the results of the command execution. Here is what the successful results look like:
    image-2025-5-21_14-2-22.thumb.png.a4fe9a14034573d38cb13cabb14ecc0c.png

6. Verify the Assets in the KUMA WebUI

  1. Login to your KUMA Core server.
  2. Navigate to Assets → All Tenants.
  3. Click on an Asset and check the details. For example, Asset source: Created manually.

image-2025-5-21_14-6-3.thumb.png.b53522a8fbb7f00c3c0043775ceba24f.png

Sample Screenshot for the Assets

Additional notes for Assets

  • Create categories based on the site name, if the assets need to be grouped by sites in KUMA. Additional criteria can be configured in the condition to move the endpoints based on a hostname/IP address to assign the category;
  • Export the assets group-wise from KSC CC, and then use dedicated scripts to manually assign the endpoints to a category;
  • Rename the files with group name before copying to KUMA server so you can identify them easily;
  • Follow the steps, suggested in this article, to import the assets weekly/monthly basis. New assets will be added to KUMA and existing assets will remain as it is. The assigned category for the existing assets will not be impacted as well.

image-2025-6-17_17-12-17.png

0 Comments


Recommended Comments

There are no comments to display.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...