cerebrate-project / cerebrate

Cerebrate is an open-source platform meant to act as a trusted contact information provider and interconnection orchestrator for other security tools.
https://www.cerebrate-project.org/
GNU Affero General Public License v3.0
83 stars 16 forks source link

Import of "ENISA CSIRT inventory" fails with Validation errors #62

Open ghost opened 3 years ago

ghost commented 3 years ago

After fixing #60, the import fails with

Validation errors, please fix before importing

Full output attached, it has 16388 lines. cerebrate-import.log

The command was:

sudo -u www-data /var/www/cerebrate/bin/cake Importer --yes /var/www/cerebrate/config-enisa-csirts-inventory.json https://www.enisa.europa.eu/topics/csirts-in-europe/csirt-inventory/certs-by-country-interactive-map/tool_data.json
mokaddem commented 3 years ago

Hey, Where you able to import the data using the template 089c68c7-d97e-4f21-a798-159cd10f7864 ? Looking at the log file, UUID for organisations are not generated.

ghost commented 3 years ago

My /var/www/cerebrate/config-enisa-csirts-inventory.json is:

{   
    "format": "json",
    "mapping": {
        "name": "data.{n}.short-team-name",
        "url": "data.{n}.website",
        "contacts": "data.{n}.email",
        "ISO 3166-1 Code": "data.{n}.country-code",
        "website": "data.{n}.website",
        "enisa-geo-group": "data.{n}.enisa-geo-group",
        "is-approved": "data.{n}.is_approved",
        "first-member-type": "data.{n}.first-member-type",
        "team-name": "data.{n}.team-name",
        "oes-coverage": "data.{n}.oes-coverage",
        "enisa-tistatus": "data.{n}.enisa-tistatus",
        "csirt-network-status": "data.{n}.csirt-network-status",
        "constituency": "data.{n}.constituency",
        "establishment": "data.{n}.establishment",
        "email": "data.{n}.email",
        "country-name": "data.{n}.country-name",
        "short-team-name": "data.{n}.short-team-name",
        "key": "data.{n}.key"
    },
    "metaTemplateUUID": "089c68c7-d97e-4f21-a798-159cd10f7864"
}

(the UUIDs match).

I've updated the installation to v0.2-204-ge32dae2 and get a ton of errors with 16388 lines.