howler-api 3.1.0.dev392__py3-none-any.whl → 3.1.0.dev395__py3-none-any.whl
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.
- howler/common/loader.py +3 -1
- howler/datastore/store.py +13 -0
- howler/odm/models/config.py +3 -0
- {howler_api-3.1.0.dev392.dist-info → howler_api-3.1.0.dev395.dist-info}/METADATA +1 -1
- {howler_api-3.1.0.dev392.dist-info → howler_api-3.1.0.dev395.dist-info}/RECORD +7 -7
- {howler_api-3.1.0.dev392.dist-info → howler_api-3.1.0.dev395.dist-info}/WHEEL +0 -0
- {howler_api-3.1.0.dev392.dist-info → howler_api-3.1.0.dev395.dist-info}/entry_points.txt +0 -0
howler/common/loader.py
CHANGED
|
@@ -39,7 +39,9 @@ def get_classification(yml_config: Optional[str] = None): # noqa: C901
|
|
|
39
39
|
log = logging.getLogger(f"{APP_NAME}.common.loader")
|
|
40
40
|
|
|
41
41
|
if not yml_config:
|
|
42
|
-
|
|
42
|
+
root_path = Path("/etc") / APP_NAME.replace("-dev", "").replace("-stg", "") / "conf"
|
|
43
|
+
yml_config_path = Path(os.environ.get("HWL_CONF_FOLDER", root_path)) / "classification.yml"
|
|
44
|
+
|
|
43
45
|
if yml_config_path.is_symlink():
|
|
44
46
|
log.info("%s is a symbolic link!", yml_config_path)
|
|
45
47
|
if str(yml_config_path.readlink()).startswith("..data"):
|
howler/datastore/store.py
CHANGED
|
@@ -69,6 +69,7 @@ class ESStore(object):
|
|
|
69
69
|
self._password: Optional[str] = None
|
|
70
70
|
self._hosts = []
|
|
71
71
|
self._cert: str | None = None
|
|
72
|
+
self._fingerprint: str | None = None
|
|
72
73
|
|
|
73
74
|
for host in config.datastore.hosts:
|
|
74
75
|
self._hosts.append(str(host))
|
|
@@ -85,6 +86,15 @@ class ESStore(object):
|
|
|
85
86
|
"it for the first host."
|
|
86
87
|
)
|
|
87
88
|
|
|
89
|
+
if host.fingerprint:
|
|
90
|
+
if self._fingerprint is None:
|
|
91
|
+
self._fingerprint = host.fingerprint
|
|
92
|
+
logger.info("Using certificate fingerprint %s for elasticsearch network traffic", self._fingerprint)
|
|
93
|
+
else:
|
|
94
|
+
logger.error(
|
|
95
|
+
"Only a single certificate fingerprint is supported - ignoring additional fingerprints."
|
|
96
|
+
)
|
|
97
|
+
|
|
88
98
|
if os.getenv(f"{host.name.upper()}_HOST_APIKEY_ID", None) is not None:
|
|
89
99
|
self._apikey = (
|
|
90
100
|
os.environ[f"{host.name.upper()}_HOST_APIKEY_ID"],
|
|
@@ -106,6 +116,7 @@ class ESStore(object):
|
|
|
106
116
|
self.client = elasticsearch.Elasticsearch(
|
|
107
117
|
hosts=self._hosts, # type: ignore
|
|
108
118
|
ca_certs=self._cert, # type: ignore
|
|
119
|
+
ssl_assert_fingerprint=self._fingerprint, # type: ignore
|
|
109
120
|
api_key=self._apikey,
|
|
110
121
|
max_retries=0,
|
|
111
122
|
request_timeout=TRANSPORT_TIMEOUT,
|
|
@@ -114,6 +125,7 @@ class ESStore(object):
|
|
|
114
125
|
self.client = elasticsearch.Elasticsearch(
|
|
115
126
|
hosts=self._hosts, # type: ignore
|
|
116
127
|
ca_certs=self._cert, # type: ignore
|
|
128
|
+
ssl_assert_fingerprint=self._fingerprint, # type: ignore
|
|
117
129
|
basic_auth=(self._username, self._password),
|
|
118
130
|
max_retries=0,
|
|
119
131
|
request_timeout=TRANSPORT_TIMEOUT,
|
|
@@ -122,6 +134,7 @@ class ESStore(object):
|
|
|
122
134
|
self.client = elasticsearch.Elasticsearch(
|
|
123
135
|
hosts=self._hosts, # type: ignore
|
|
124
136
|
ca_certs=self._cert, # type: ignore
|
|
137
|
+
ssl_assert_fingerprint=self._fingerprint, # type: ignore
|
|
125
138
|
max_retries=0,
|
|
126
139
|
request_timeout=TRANSPORT_TIMEOUT,
|
|
127
140
|
)
|
howler/odm/models/config.py
CHANGED
|
@@ -63,6 +63,9 @@ class Host(BaseModel):
|
|
|
63
63
|
apikey_secret: Optional[str] = Field(description="Secret data of the API Key to use when connecting", default=None)
|
|
64
64
|
scheme: Optional[str] = Field(description="Scheme to use when connecting", default="http")
|
|
65
65
|
host: str = Field(description="URL to connect to")
|
|
66
|
+
fingerprint: str | None = Field(
|
|
67
|
+
description="Optional certificate fingerprint to validate against when connecting to datastore", default=None
|
|
68
|
+
)
|
|
66
69
|
|
|
67
70
|
def __repr__(self):
|
|
68
71
|
result = ""
|
|
@@ -37,7 +37,7 @@ howler/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
37
37
|
howler/common/classification.py,sha256=AUl33PJX6O9d9XzxHbyyJah2ffD7Q7J2yYqIwz7OqKY,39342
|
|
38
38
|
howler/common/classification.yml,sha256=3VBqzKYkiqz8bCsSuqNvqxeqUPN1NmXBKHusGFO3hbg,4092
|
|
39
39
|
howler/common/exceptions.py,sha256=An8MW-qB8g7EYLTxddnoIiyxNDQAqU9AmH8MrDFfnwQ,5804
|
|
40
|
-
howler/common/loader.py,sha256=
|
|
40
|
+
howler/common/loader.py,sha256=BKwibMg-EK9X0MdDPbcOft9_vL1WV7S5RtVr1ihQqQg,5453
|
|
41
41
|
howler/common/logging/__init__.py,sha256=kJ3Wi0TfB1zypeb7u5ReRzip6mxJgLR_SAMQQzvvngU,7855
|
|
42
42
|
howler/common/logging/audit.py,sha256=iR42dJ8hhuXQFN60yyXcms31dPtgZSHBQlHH_VZTEZc,3528
|
|
43
43
|
howler/common/logging/format.py,sha256=UnkOJ5lw0m0XIT57CQHV9OCrOPGC8_2GVg1rD_jM4qg,1138
|
|
@@ -60,7 +60,7 @@ howler/datastore/howler_store.py,sha256=kW7FKM-tILcfTmrjSB1yZm-ZnumPS_tiQEZUDaQo
|
|
|
60
60
|
howler/datastore/migrations/fix_process.py,sha256=J0FxqcXbQ161sgmQ5teyEcPuX7WYB9wqs0CO8m1jk0U,1218
|
|
61
61
|
howler/datastore/operations.py,sha256=5WdJBewXRIG71ZexQcYASv0IYoDi1m9ia8332u5mXSs,3919
|
|
62
62
|
howler/datastore/schemas.py,sha256=kuxqYVWMgqnrdU-ypkDxoSzEtECUrRCKXjU_R5Kg7X4,3158
|
|
63
|
-
howler/datastore/store.py,sha256=
|
|
63
|
+
howler/datastore/store.py,sha256=NsUU9TEmxRBTKi1fm2j2UUagw6iCPapvt5f96VmUTn0,9005
|
|
64
64
|
howler/datastore/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
65
65
|
howler/datastore/support/build.py,sha256=iBVfWophzoPlx6rvR5w3Axb6gjqLuDeDBpKj7lO-1l0,7877
|
|
66
66
|
howler/datastore/support/schemas.py,sha256=kuxqYVWMgqnrdU-ypkDxoSzEtECUrRCKXjU_R5Kg7X4,3158
|
|
@@ -95,7 +95,7 @@ howler/odm/models/assemblyline.py,sha256=_wcTiX3A6bhA2SGlK9tDF0v-uwLpIabXE8j2Fw9
|
|
|
95
95
|
howler/odm/models/aws.py,sha256=pJVadJqubdgT27riCfp7bEKVP4XsMZB0ZUnKAbmCMd0,895
|
|
96
96
|
howler/odm/models/azure.py,sha256=o7MZMMo9jh1SB8xXCajl_YSKP2nnnWsjx_DPT6LnQKg,710
|
|
97
97
|
howler/odm/models/cbs.py,sha256=onUiJOGUxK3iy_-4XkGGwHxFiFq9Td_p59Kum4XaR-w,1366
|
|
98
|
-
howler/odm/models/config.py,sha256=
|
|
98
|
+
howler/odm/models/config.py,sha256=mDjO8Wpfu0RtdJosL6cQIKIIRTRqB9PRWBOGG2uIOb0,21884
|
|
99
99
|
howler/odm/models/dossier.py,sha256=Ob2qROrG2-DYzmVo2XVe4NJ8HjWGCoRAu2gPo6p9XGU,1244
|
|
100
100
|
howler/odm/models/ecs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
101
101
|
howler/odm/models/ecs/agent.py,sha256=idSooyFCLuQAB7_RyEWTYW4-x9w5a3wpy2ct_-EDRQs,713
|
|
@@ -192,7 +192,7 @@ howler/utils/path.py,sha256=DfOU4i4zSs4wchHoE8iE7aWVLkTxiC_JRGepF2hBYBk,690
|
|
|
192
192
|
howler/utils/socket_utils.py,sha256=nz1SklC9xBHUSfHyTJjpq3mbozX1GDf01WzdGxfaUII,2212
|
|
193
193
|
howler/utils/str_utils.py,sha256=HE8Hqh2HlOLaj16w0H9zKOyDJLp-f1LQ50y_WeGZaEk,8389
|
|
194
194
|
howler/utils/uid.py,sha256=p9dsqyvZ-lpiAuzZWCPCeEM99kdk0Ly9czf04HNdSuw,1341
|
|
195
|
-
howler_api-3.1.0.
|
|
196
|
-
howler_api-3.1.0.
|
|
197
|
-
howler_api-3.1.0.
|
|
198
|
-
howler_api-3.1.0.
|
|
195
|
+
howler_api-3.1.0.dev395.dist-info/METADATA,sha256=GUWbW1RkQm4G-3STRN4z5xRskpEQWzU5ra2b-CuLGck,2804
|
|
196
|
+
howler_api-3.1.0.dev395.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
|
|
197
|
+
howler_api-3.1.0.dev395.dist-info/entry_points.txt,sha256=Lu9SBGvwe0wczJHmc-RudC24lmQk7tv3ZBXon9RIihg,259
|
|
198
|
+
howler_api-3.1.0.dev395.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|