eclecticiq / OpenTAXII

TAXII server implementation in Python from EclecticIQ
BSD 3-Clause "New" or "Revised" License
185 stars 88 forks source link

How to configure Opentaxii to use TAXII2 #249

Open Tyrell20 opened 1 year ago

Tyrell20 commented 1 year ago

Hello, I am facing an issue to configure opentaxii to use taxii2. Below my configuration file:

default.yml `---

domain: "myserver.com:9000"

support_basic_auth: yes return_server_error_details: no

auth_api: class: opentaxii.auth.sqldb.SQLDatabaseAPI parameters: db_connection: sqlite:////tmp/auth.db create_tables: yes secret: SECRET-STRING-NEEDS-TO-BE-CHANGED token_ttl_secs: 3600

taxii1:

taxii2: persistence_api: class: opentaxii.persistence.sqldb.SQLDatabaseAPI parameters: db_connection: sqlite:////tmp/data.db create_tables: yes

logging: opentaxii: info root: info `

data-configuration.yml (version 1 tested) `apiroots:

collections:

accounts:

**data-configuration.yml (version 2 tested)**

`---

domain: myserver.com:9000

services:

collections:

accounts:

With both data-configuration.yml the command: opentaxii-sync-data opentaxii/data-configuration.yml do not work, reporting the error: AttributeError: 'NoneType' object has no attribute 'persistence'

Starting server with gunicorn: gunicorn opentaxii.http:app --bind myserver.com:9000 --config python:opentaxii.http does not show any error. Trying to query the server via taxii2-client I obtained the error below: requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://myserver.com:9000/taxii2/

Could you please help me to validate the configuration files e and how can I start and use the taxii2 on opentaxii?

andrewbeard commented 1 year ago

I've been playing around with the same thing and there are some undocumented options and fixes required. I'm in the process of submitting PRs for the issues I can find as I work through them but out of the box you're going to have a bad time.

I'm not sure how quickly PRs get accepted by the project, but in the mean time my source branch is here: https://github.com/andrewbeard/OpenTAXII/tree/dev