clue-api 1.5.0.dev259__tar.gz → 1.5.0.dev262__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/PKG-INFO +1 -1
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/plugin/__init__.py +15 -3
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/pyproject.toml +2 -2
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/LICENSE +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/README.md +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/.gitignore +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/api/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/api/base.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/api/v1/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/api/v1/actions.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/api/v1/auth.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/api/v1/configs.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/api/v1/fetchers.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/api/v1/lookup.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/api/v1/registration.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/api/v1/static.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/api/v1/sync.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/app.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/cache/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/bytes_utils.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/classification.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/classification.yml +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/dict_utils.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/exceptions.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/forge.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/json_utils.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/list_utils.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/logging/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/logging/audit.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/logging/format.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/regex.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/str_utils.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/swagger.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/common/uid.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/config.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/constants/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/constants/env.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/constants/supported_types.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/cronjobs/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/cronjobs/plugins.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/error.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/extensions/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/extensions/config.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/gunicorn_config.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/healthz.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/helper/discover.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/helper/headers.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/helper/oauth.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/actions.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/config.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/fetchers.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/graph.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/model_list.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/network.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/results/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/results/base.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/results/file.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/results/graph.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/results/image.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/results/status.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/results/validation.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/schema.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/selector.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/sync.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/models/validators.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/patched.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/plugin/celery_app.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/plugin/helpers/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/plugin/helpers/central_server.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/plugin/helpers/email_render.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/plugin/helpers/token.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/plugin/helpers/trino.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/plugin/models.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/plugin/utils.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/py.typed +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/remote/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/remote/datatypes/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/remote/datatypes/cache.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/remote/datatypes/events.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/remote/datatypes/hash.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/remote/datatypes/queues/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/remote/datatypes/queues/comms.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/remote/datatypes/set.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/remote/datatypes/user_quota_tracker.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/security/__init__.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/security/obo.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/security/utils.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/services/action_service.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/services/auth_service.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/services/config_service.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/services/fetcher_service.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/services/jwt_service.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/services/lookup_service.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/services/mongo_service.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/services/type_service.py +0 -0
- {clue_api-1.5.0.dev259 → clue_api-1.5.0.dev262}/clue/services/user_service.py +0 -0
|
@@ -861,7 +861,11 @@ class CluePlugin:
|
|
|
861
861
|
|
|
862
862
|
token: str | None = None
|
|
863
863
|
if self.validate_token:
|
|
864
|
-
|
|
864
|
+
try:
|
|
865
|
+
token, error = self.validate_token()
|
|
866
|
+
except Exception as e:
|
|
867
|
+
self.logger.exception("Catastrophic error in validate_token")
|
|
868
|
+
return self.make_api_response(None, f"Something went wrong: {e}", 500)
|
|
865
869
|
|
|
866
870
|
if error:
|
|
867
871
|
return self.make_api_response(None, f"Error on token validation: {error}", status_code=401)
|
|
@@ -998,7 +1002,11 @@ class CluePlugin:
|
|
|
998
1002
|
if self.validate_token:
|
|
999
1003
|
self.logger.debug("Executing plugin-provided token validator")
|
|
1000
1004
|
|
|
1001
|
-
|
|
1005
|
+
try:
|
|
1006
|
+
token, error = self.validate_token()
|
|
1007
|
+
except Exception as e:
|
|
1008
|
+
self.logger.exception("Catastrophic error in validate_token")
|
|
1009
|
+
return self.make_api_response(None, f"Something went wrong: {e}", 500)
|
|
1002
1010
|
|
|
1003
1011
|
if error:
|
|
1004
1012
|
return self.make_api_response(None, f"Error on token validation: {error}", status_code=401)
|
|
@@ -1043,7 +1051,11 @@ class CluePlugin:
|
|
|
1043
1051
|
self.logger.warning("Selector not present in bulk result, skipping cache step")
|
|
1044
1052
|
# Default bulk lookup
|
|
1045
1053
|
else:
|
|
1046
|
-
|
|
1054
|
+
try:
|
|
1055
|
+
self.__default_bulk_lookup(bulk_result, remaining_items, params, token)
|
|
1056
|
+
except Exception as e:
|
|
1057
|
+
self.logger.exception("Catastrophic error in default bulk lookup")
|
|
1058
|
+
return self.make_api_response(None, f"Something went wrong when enriching: {e}", 500)
|
|
1047
1059
|
|
|
1048
1060
|
# Calculate how close we came to the deadline (positive = time remaining, negative = overrun)
|
|
1049
1061
|
variance = params.deadline - time.time()
|
|
@@ -141,7 +141,7 @@ log_cli_level = "WARN"
|
|
|
141
141
|
[tool.poetry]
|
|
142
142
|
package-mode = true
|
|
143
143
|
name = "clue-api"
|
|
144
|
-
version = "1.5.0.
|
|
144
|
+
version = "1.5.0.dev262"
|
|
145
145
|
description = "Clue distributed enrichment service"
|
|
146
146
|
authors = ["Canadian Centre for Cyber Security <contact@cyber.gc.ca>"]
|
|
147
147
|
license = "MIT"
|
|
@@ -238,7 +238,7 @@ type_check = "build_scripts.type_check:main"
|
|
|
238
238
|
coverage_report = "build_scripts.coverage_reports:main"
|
|
239
239
|
|
|
240
240
|
[tool.poetry.group.test.dependencies]
|
|
241
|
-
pytest = "
|
|
241
|
+
pytest = ">=8.1.1,<10.0.0"
|
|
242
242
|
mypy = "^1.9.0"
|
|
243
243
|
pytest-cov = "^5.0.0"
|
|
244
244
|
coverage = { extras = ["toml"], version = "^7.4.4" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|