diff --git a/docs/configuration.rst b/docs/configuration.rst index f6899e9f..28275226 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -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. diff --git a/opentaxii/server.py b/opentaxii/server.py index 928ae033..01b4bbc4 100644 --- a/opentaxii/server.py +++ b/opentaxii/server.py @@ -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"],