Skip to content

How to configure Opentaxii to use TAXII2 #249

@Tyrell20

Description

@Tyrell20

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:

  • id: test_api_root
    default: true
    title: Test API Root
    description: Main API Root
    is_public: true

collections:

  • id: collection
    api_root_id: test_api_root
    title: Main Collection
    description: Main collection Information
    is_public: true
    is_public_write: true

accounts:

  • username: test
    password: test
    permissions:
    collection-a: modify
  • username: admin
    password: admin
    is_admin: yes
    `

data-configuration.yml (version 2 tested)

`---

domain: myserver.com:9000

services:
- id: inbox
type: inbox
address: /services/inbox
description: Inbox Service
destination_collection_required: yes
accept_all_content: yes
authentication_required: yes
supported_content:
- urn:stix.mitre.org:json:2.1
protocol_bindings:
- urn:taxii.mitre.org:protocol:http:1.0

- id: discovery
  type: discovery
  address: /services/discovery
  description: Discovery Service
  advertised_services:
    - inbox
    - discovery
    - collection_management
    - poll
  protocol_bindings:
    - urn:taxii.mitre.org:protocol:http:1.0

- id: collection_management
  type: collection_management
  address: /services/collection-management
  description: Collection Management Service
  protocol_bindings:
    - urn:taxii.mitre.org:protocol:http:1.0
 - id: poll
  type: poll
  address: /services/poll
  description: Poll Service
  subscription_required: no
  max_result_count: 100
  max_result_size: 10
  authentication_required: yes
  protocol_bindings:
    - urn:taxii.mitre.org:protocol:http:1.0

collections:

  • name: test
    available: true
    accept_all_content: true
    supported_content:
    • urn:stix.mitre.org:json:2.1
      service_ids:
    • inbox
    • collection_management
    • poll

accounts:

  • username: test
    password: test
    permissions:
    test: modify
    `

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions