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

Taxii2 config docs and defaults #250

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,12 @@ Properties
- ``db_connection`` — the database connetion string
- ``create_tables`` — boolean, if true, create tables on startup

- ``max_content_length`` — the maximum size of the request body in bytes that the server can support
- ``max_content_length`` — the maximum size of the request body in bytes that the server can support. Required field
- ``allow_custom_properties`` — boolean, if true, allow custom stix2 properties when posting objects (default: true)
- ``public_discovery`` - boolean, if true, do not require authentication for discovery of api roots (default: false)
- ``title`` - title of the server, returned as part of the discovery of api roots. Required field
- ``contact`` - contact for the server, returned as part of the discovery of api roots
- ``description`` - description of the server, returned as part of the discovery of api roots

- ``logging`` — logging configuration.

Expand Down
2 changes: 1 addition & 1 deletion opentaxii/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def handle_request(self, endpoint: Callable[[], Response]):

@register_handler(r"^/taxii2/$", handles_own_auth=True)
def discovery_handler(self):
if context.account is None and not self.config["public_discovery"]:
if context.account is None and not self.config.get("public_discovery", False):
raise Unauthorized()
response = {
"title": self.config["title"],
Expand Down