clue-api 1.0.1.dev76__tar.gz → 1.0.1.dev78__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.0.1.dev76 → clue_api-1.0.1.dev78}/PKG-INFO +1 -1
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/config.py +1 -1
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/remote/datatypes/__init__.py +11 -2
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/remote/datatypes/cache.py +2 -2
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/pyproject.toml +1 -1
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/LICENSE +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/README.md +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/.gitignore +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/api/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/api/base.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/api/v1/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/api/v1/actions.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/api/v1/auth.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/api/v1/configs.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/api/v1/fetchers.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/api/v1/lookup.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/api/v1/registration.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/api/v1/static.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/app.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/cache/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/classification.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/classification.yml +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/dict_utils.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/exceptions.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/forge.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/json_utils.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/list_utils.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/logging/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/logging/audit.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/logging/format.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/regex.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/str_utils.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/swagger.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/common/uid.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/constants/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/constants/supported_types.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/cronjobs/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/cronjobs/plugins.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/error.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/extensions/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/extensions/config.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/gunicorn_config.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/healthz.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/helper/discover.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/helper/headers.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/helper/oauth.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/actions.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/config.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/fetchers.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/graph.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/model_list.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/network.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/results/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/results/base.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/results/graph.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/results/image.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/results/status.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/results/validation.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/selector.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/models/validators.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/patched.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/plugin/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/plugin/helpers/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/plugin/helpers/central_server.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/plugin/helpers/email_render.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/plugin/helpers/token.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/plugin/helpers/trino.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/plugin/models.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/plugin/utils.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/py.typed +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/remote/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/remote/datatypes/events.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/remote/datatypes/hash.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/remote/datatypes/queues/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/remote/datatypes/queues/comms.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/remote/datatypes/set.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/remote/datatypes/user_quota_tracker.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/security/__init__.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/security/obo.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/security/utils.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/services/action_service.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/services/auth_service.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/services/config_service.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/services/fetcher_service.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/services/jwt_service.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/services/lookup_service.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/services/type_service.py +0 -0
- {clue_api-1.0.1.dev76 → clue_api-1.0.1.dev78}/clue/services/user_service.py +0 -0
|
@@ -54,7 +54,7 @@ def get_redis():
|
|
|
54
54
|
"""
|
|
55
55
|
from clue.remote.datatypes import get_client
|
|
56
56
|
|
|
57
|
-
return get_client(config.core.redis.host, config.core.redis.port, False)
|
|
57
|
+
return get_client(config.core.redis.host, config.core.redis.port, False, password=config.core.redis.password)
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
cache = forge.cache
|
|
@@ -89,6 +89,11 @@ def get_client(host, port, private, password=None):
|
|
|
89
89
|
port = int(port or config.core.redis.port)
|
|
90
90
|
password = config.core.redis.password
|
|
91
91
|
|
|
92
|
+
if password:
|
|
93
|
+
logger.debug("Connecting to redis with password")
|
|
94
|
+
else:
|
|
95
|
+
logger.warning("Connecting to redis without authentication.")
|
|
96
|
+
|
|
92
97
|
ssl_kwargs = {}
|
|
93
98
|
|
|
94
99
|
# Automatically detect if encryption was enabled
|
|
@@ -101,16 +106,20 @@ def get_client(host, port, private, password=None):
|
|
|
101
106
|
return redis.StrictRedis(host=host, port=port, socket_keepalive=True, password=password, **ssl_kwargs)
|
|
102
107
|
else:
|
|
103
108
|
return redis.StrictRedis(
|
|
104
|
-
connection_pool=get_pool(host, port, ssl=ssl_kwargs.get("ssl", False)),
|
|
109
|
+
connection_pool=get_pool(host, port, ssl=ssl_kwargs.get("ssl", False), password=password),
|
|
105
110
|
socket_keepalive=True,
|
|
106
111
|
password=password,
|
|
107
112
|
)
|
|
108
113
|
|
|
109
114
|
|
|
110
|
-
def get_pool(host, port, ssl=False):
|
|
115
|
+
def get_pool(host: str, port: int, ssl: bool = False, password: str | None = None):
|
|
111
116
|
key = (host, port)
|
|
112
117
|
connection_class = redis.connection.Connection
|
|
113
118
|
connection_kwargs = {}
|
|
119
|
+
|
|
120
|
+
if password:
|
|
121
|
+
connection_kwargs["password"] = password
|
|
122
|
+
|
|
114
123
|
if ssl:
|
|
115
124
|
connection_class = redis.connection.SSLConnection # type: ignore[assignment]
|
|
116
125
|
connection_kwargs = _redis_ssl_kwargs(host)
|
|
@@ -9,8 +9,8 @@ DEFAULT_TTL = 60 * 60 # 1 Hour
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class RedisCache(object):
|
|
12
|
-
def __init__(self, prefix="clue_cache", host=None, port=None, ttl=DEFAULT_TTL):
|
|
13
|
-
self.c = get_client(host, port, False)
|
|
12
|
+
def __init__(self, prefix="clue_cache", host=None, port=None, ttl=DEFAULT_TTL, password=None):
|
|
13
|
+
self.c = get_client(host, port, False, password=password)
|
|
14
14
|
self.prefix = prefix
|
|
15
15
|
self.ttl = ttl
|
|
16
16
|
|
|
@@ -149,7 +149,7 @@ log_cli_level = "WARN"
|
|
|
149
149
|
[tool.poetry]
|
|
150
150
|
package-mode = true
|
|
151
151
|
name = "clue-api"
|
|
152
|
-
version = "1.0.1.
|
|
152
|
+
version = "1.0.1.dev78"
|
|
153
153
|
description = "Clue distributed enrichment service"
|
|
154
154
|
authors = ["Canadian Centre for Cyber Security <contact@cyber.gc.ca>"]
|
|
155
155
|
license = "MIT"
|
|
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
|