connectors icon indicating copy to clipboard operation
connectors copied to clipboard

[ImportDocument]The connector does not work at all

Open Ken-Abruzzi opened this issue 3 years ago • 1 comments

Description

The import-document connector is shown on the "connector" web page. image But it is not shown on the "Enabled import connetors" panel. Screenshot from 2022-07-25 18-19-23 When I launch an import, the "import-document" is not shown in the connector list. image When I import a pdf or csv file using the import-document connector, nothing useful is recorded in the log. Screenshot from 2022-07-25 18-25-20

Environment

  1. OS: Ubuntu 20.04.4
  2. OpenCTI version: 5.3.7

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. I export the indicators of the "Conti" intrusion set using the export-file-csv connector and the export-file-stix2 connector. The csv file contains hostname "www.wayeyoy.com". Screenshot from 2022-07-25 18-37-35
  2. I then delete all "www.wayeyoy.com" entities in the opencti. Screenshot from 2022-07-25 18-43-04
  3. I import the csv file which contains "www.wayeyoy.com". Screenshot from 2022-07-25 18-44-35
  4. I search "www.wayeyoy.com" and noting is found. Screenshot from 2022-07-25 18-43-04
  5. I import the json file which contains "www.wayeyoy.com" using the "import-file-stix" connector. Screenshot from 2022-07-25 18-54-32 Why does the successfully uploaded json file show up in the "pending files" panel, but the uploaded csv file not? image
  6. The json file is imported successfully. Screenshot from 2022-07-25 18-50-52

Ken-Abruzzi avatar Jul 26 '22 01:07 Ken-Abruzzi

Hey @Ken-Abruzzi

Could you please share your connector config? It seems like the connector is active, but the scope isn't properly defined

Regards

nor3th avatar Aug 13 '22 12:08 nor3th

Hey @Ken-Abruzzi

Could you please share your connector config? It seems like the connector is active, but the scope isn't properly defined

Regards

Hello, @nor3th . Please check my configuration. Thank you! connector-import-document: image: opencti/connector-import-document:5.3.1 environment: - OPENCTI_URL=http://opencti:8080 - OPENCTI_TOKEN=${OPENCTI_ADMIN_TOKEN} - CONNECTOR_ID=${CONNECTOR_IMPORT_FILE_PDF_OBSERVABLES_ID} - CONNECTOR_TYPE=INTERNAL_IMPORT_FILE - CONNECTOR_NAME=ImportDocument - CONNECTOR_VALIDATE_BEFORE_IMPORT=true # Validate any bundle before import - CONNECTOR_SCOPE=application/pdf,text/plain,text/html,text/csv,text/markdown - CONNECTOR_AUTO=true # Enable/disable auto-import of file - CONNECTOR_ONLY_CONTEXTUAL=true # Only extract data related to an entity (a report, a threat actor, etc.) - CONNECTOR_CONFIDENCE_LEVEL=100 # From 0 (Unknown) to 100 (Fully trusted) - CONNECTOR_LOG_LEVEL=debug - IMPORT_DOCUMENT_CREATE_INDICATOR=false restart: always logging: driver: "json-file" options: max-size: "10m"

Ken-Abruzzi avatar Oct 20 '22 07:10 Ken-Abruzzi