howler-sentinel-plugin 0.2.0.dev19__tar.gz → 0.2.0.dev21__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.
- {howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/PKG-INFO +1 -1
- {howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/pyproject.toml +1 -1
- {howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/sentinel/routes/ingest.py +5 -4
- {howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/LICENSE +0 -0
- {howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/README.md +0 -0
- {howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/sentinel/__init__.py +0 -0
- {howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/sentinel/odm/hit.py +0 -0
- {howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/sentinel/odm/models/sentinel.py +0 -0
- {howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/sentinel/routes/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "howler-sentinel-plugin"
|
|
3
|
-
version = "0.2.0.
|
|
3
|
+
version = "0.2.0.dev21"
|
|
4
4
|
description = "A howler plugin for integration with Microsoft's Sentinel API"
|
|
5
5
|
authors = [{ name = "CCCS", email = "analysis-development@cyber.gc.ca" }]
|
|
6
6
|
license = { text = "MIT" }
|
{howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/sentinel/routes/ingest.py
RENAMED
|
@@ -28,11 +28,12 @@ def ingest_alert(**kwargs):
|
|
|
28
28
|
|
|
29
29
|
Result Example:
|
|
30
30
|
"""
|
|
31
|
-
|
|
32
|
-
logger.info("Recieved authorization header with value %s", re.sub(r"^(.{3}).+(.{3})$", r"\1...\2", apikey))
|
|
31
|
+
apikey = request.headers.get("Authorization", "Basic ", type=str).split(" ")[1]
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
if not apikey or apikey != SECRET:
|
|
34
|
+
return unauthorized(err="API Key does not match expected value.")
|
|
35
|
+
|
|
36
|
+
logger.info("Recieved authorization header with value %s", re.sub(r"^(.{3}).+(.{3})$", r"\1...\2", apikey))
|
|
36
37
|
|
|
37
38
|
sentinel_alert = request.json
|
|
38
39
|
|
|
File without changes
|
|
File without changes
|
{howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/sentinel/__init__.py
RENAMED
|
File without changes
|
{howler_sentinel_plugin-0.2.0.dev19 → howler_sentinel_plugin-0.2.0.dev21}/sentinel/odm/hit.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|