Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to set the config file to use taxii 2 #234

Open
Dan-Vizor opened this issue Jun 13, 2022 · 3 comments
Open

how to set the config file to use taxii 2 #234

Dan-Vizor opened this issue Jun 13, 2022 · 3 comments

Comments

@Dan-Vizor
Copy link

Dan-Vizor commented Jun 13, 2022

Here is my current config. From what I read in the docs this should set the server to use TAXII 2.0 however I can't curl /taxii2/api-bases/ or any other 2.0 endpoints.

Do I need to change the URLs in services and/or something else?

---
domain: "127.0.0.1:9000"

support_basic_auth: yes
save_raw_inbox_messages: yes
xml_parser_supports_huge_tree: yes
count_blocks_in_poll_responses: no
return_server_error_details: no
unauthorized_status: UNAUTHORIZED

auth_api:
  class: opentaxii.auth.sqldb.SQLDatabaseAPI
  parameters:
    db_connection: sqlite:////tmp/auth.db
    create_tables: yes
    secret: [REDACTED]
    token_ttl_secs: 3600

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

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

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

  - id: collection_management
    type: collection_management
    address: /services/collection-management
    description: Custom Collection Management Service description
    protocol_bindings:
      - urn:taxii.mitre.org:protocol:http:1.0
      - urn:taxii.mitre.org:protocol:https:1.0

  - id: poll
    type: poll
    address: /services/poll
    description: Custom Poll Service description
    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: collection
    available: true
    accept_all_content: true
    type: DATA_SET
    service_ids:
      - inbox
      - collection_management
      - poll

accounts:
  - username: API_user
    password: [REDACTED]
    permissions:
      collection: read
  - username: API_write
    password: [REDACTED]
    permissions:
      collection: modify

logging:
  opentaxii: info
  root: info
@Dan-Vizor
Copy link
Author

I'd like to have both taxii1 and taxii2 enabled

@whitelessk
Copy link

@Dan-Vizor did you manage to enable taxii2?

@zentavr
Copy link
Contributor

zentavr commented Oct 13, 2022

@Dan-Vizor seems like you need 2 installations for that. We created several systemd units and nginx virtualhosts in order to achieve this.

probably, you can play with location prefixes at the nginx/apache side order to make it work at the single viatualhost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants