clue-api 1.0.1.dev83__tar.gz → 1.0.1.dev91__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.dev83 → clue_api-1.0.1.dev91}/PKG-INFO +4 -7
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/README.md +2 -5
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/api/v1/auth.py +1 -1
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/api/v1/registration.py +1 -1
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/api/v1/static.py +1 -1
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/services/user_service.py +4 -2
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/pyproject.toml +2 -2
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/LICENSE +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/.gitignore +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/api/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/api/base.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/api/v1/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/api/v1/actions.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/api/v1/configs.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/api/v1/fetchers.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/api/v1/lookup.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/app.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/cache/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/classification.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/classification.yml +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/dict_utils.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/exceptions.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/forge.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/json_utils.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/list_utils.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/logging/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/logging/audit.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/logging/format.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/regex.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/str_utils.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/swagger.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/common/uid.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/config.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/constants/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/constants/supported_types.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/cronjobs/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/cronjobs/plugins.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/error.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/extensions/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/extensions/config.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/gunicorn_config.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/healthz.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/helper/discover.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/helper/headers.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/helper/oauth.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/actions.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/config.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/fetchers.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/graph.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/model_list.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/network.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/results/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/results/base.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/results/graph.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/results/image.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/results/status.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/results/validation.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/selector.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/models/validators.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/patched.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/plugin/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/plugin/helpers/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/plugin/helpers/central_server.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/plugin/helpers/email_render.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/plugin/helpers/token.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/plugin/helpers/trino.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/plugin/models.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/plugin/utils.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/py.typed +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/remote/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/remote/datatypes/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/remote/datatypes/cache.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/remote/datatypes/events.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/remote/datatypes/hash.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/remote/datatypes/queues/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/remote/datatypes/queues/comms.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/remote/datatypes/set.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/remote/datatypes/user_quota_tracker.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/security/__init__.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/security/obo.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/security/utils.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/services/action_service.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/services/auth_service.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/services/config_service.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/services/fetcher_service.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/services/jwt_service.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/services/lookup_service.py +0 -0
- {clue_api-1.0.1.dev83 → clue_api-1.0.1.dev91}/clue/services/type_service.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clue-api
|
|
3
|
-
Version: 1.0.1.
|
|
3
|
+
Version: 1.0.1.dev91
|
|
4
4
|
Summary: Clue distributed enrichment service
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -20,7 +20,7 @@ Provides-Extra: server
|
|
|
20
20
|
Requires-Dist: PyYAML (>=6.0.1,<7.0.0) ; extra == "server"
|
|
21
21
|
Requires-Dist: Werkzeug (>=3.0.2,<4.0.0) ; extra == "server"
|
|
22
22
|
Requires-Dist: apscheduler (>=3.10.4,<4.0.0) ; extra == "server"
|
|
23
|
-
Requires-Dist: authlib (<
|
|
23
|
+
Requires-Dist: authlib (<2.0.0) ; extra == "server"
|
|
24
24
|
Requires-Dist: bcrypt (>=4.1.2,<5.0.0) ; extra == "server"
|
|
25
25
|
Requires-Dist: beautifulsoup4 (>=4.13.3,<5.0.0)
|
|
26
26
|
Requires-Dist: cart (>=1.2.3,<2.0.0)
|
|
@@ -56,9 +56,6 @@ Description-Content-Type: text/markdown
|
|
|
56
56
|
To start the API for clue, check to ensure that:
|
|
57
57
|
|
|
58
58
|
1. Docker is composed up through `dev/docker-compose.yml`
|
|
59
|
-
1. Note that you may need to set up uchimera container connections if you have not tyet done so:
|
|
60
|
-
2. `az login && az acr login -n uchimera`
|
|
61
|
-
3. If you do not have permission, reach out to APA2B.
|
|
62
59
|
2. `cd clue/api`
|
|
63
60
|
3. Run `poetry install` within the clue/api folder to install all dependencies
|
|
64
61
|
4. You may need to run `poetry install --with test,dev,types,plugins --all-extras`
|
|
@@ -88,7 +85,7 @@ Troubleshooting:
|
|
|
88
85
|
|
|
89
86
|
## Contributing
|
|
90
87
|
|
|
91
|
-
See [CONTRIBUTING.md](
|
|
88
|
+
See [CONTRIBUTING.md](docs/CONTRIBUTING.en.md) for more information
|
|
92
89
|
|
|
93
90
|
## FAQ
|
|
94
91
|
|
|
@@ -98,7 +95,7 @@ Run `sudo chmod a+rw /var/log/clue/` and `sudo chmod a+rw /etc/clue/conf/`.
|
|
|
98
95
|
|
|
99
96
|
### How can I add dependencies for my plugin?
|
|
100
97
|
|
|
101
|
-
See [this section](
|
|
98
|
+
See [this section](docs/CONTRIBUTING.en.md#external-dependencies) of CONTRIBUTING.md.
|
|
102
99
|
|
|
103
100
|
### Email rendering does not seem to be working?
|
|
104
101
|
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
To start the API for clue, check to ensure that:
|
|
4
4
|
|
|
5
5
|
1. Docker is composed up through `dev/docker-compose.yml`
|
|
6
|
-
1. Note that you may need to set up uchimera container connections if you have not tyet done so:
|
|
7
|
-
2. `az login && az acr login -n uchimera`
|
|
8
|
-
3. If you do not have permission, reach out to APA2B.
|
|
9
6
|
2. `cd clue/api`
|
|
10
7
|
3. Run `poetry install` within the clue/api folder to install all dependencies
|
|
11
8
|
4. You may need to run `poetry install --with test,dev,types,plugins --all-extras`
|
|
@@ -35,7 +32,7 @@ Troubleshooting:
|
|
|
35
32
|
|
|
36
33
|
## Contributing
|
|
37
34
|
|
|
38
|
-
See [CONTRIBUTING.md](
|
|
35
|
+
See [CONTRIBUTING.md](docs/CONTRIBUTING.en.md) for more information
|
|
39
36
|
|
|
40
37
|
## FAQ
|
|
41
38
|
|
|
@@ -45,7 +42,7 @@ Run `sudo chmod a+rw /var/log/clue/` and `sudo chmod a+rw /etc/clue/conf/`.
|
|
|
45
42
|
|
|
46
43
|
### How can I add dependencies for my plugin?
|
|
47
44
|
|
|
48
|
-
See [this section](
|
|
45
|
+
See [this section](docs/CONTRIBUTING.en.md#external-dependencies) of CONTRIBUTING.md.
|
|
49
46
|
|
|
50
47
|
### Email rendering does not seem to be working?
|
|
51
48
|
|
|
@@ -125,7 +125,7 @@ def login(**_) -> dict[str, Any]: # noqa: C901
|
|
|
125
125
|
uri = urlparse(referer if referer else request.host_url)
|
|
126
126
|
port_portion = ":" + str(uri.port) if uri.port else ""
|
|
127
127
|
redirect_uri = f"{uri.scheme}://{uri.hostname}{port_portion}/login?provider={oauth_provider}"
|
|
128
|
-
return provider.authorize_redirect(redirect_uri=redirect_uri)
|
|
128
|
+
return provider.authorize_redirect(redirect_uri=redirect_uri, nonce=request.args.get("nonce", None))
|
|
129
129
|
|
|
130
130
|
# At this point we know the code exists, so we're good to use that to exchange for an JSON Web Token with
|
|
131
131
|
# user data in it. token_data contains the access token, expiry, refresh token, and id token,
|
|
@@ -40,7 +40,7 @@ def register_application(**kwargs):
|
|
|
40
40
|
"classification": "TLP:CLEAR",
|
|
41
41
|
"max_classification": "TLP:CLEAR",
|
|
42
42
|
"url": "http://localhost:5008/",
|
|
43
|
-
"maintainer": "
|
|
43
|
+
"maintainer": "Example <example@example.com>",
|
|
44
44
|
"datahub_link": "http://example.com",
|
|
45
45
|
"documentation_link": "http://example.com"
|
|
46
46
|
},
|
|
@@ -69,7 +69,7 @@ def serve_documentation_file(filename: str, **kwargs) -> dict[str, str]:
|
|
|
69
69
|
None
|
|
70
70
|
|
|
71
71
|
Result Example:
|
|
72
|
-
URL Link: /api/v1/static/docs/
|
|
72
|
+
URL Link: /api/v1/static/docs/howler-docs.md
|
|
73
73
|
|
|
74
74
|
{"markdown": "Markdown documentation of howler-docs.md"}
|
|
75
75
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
3
|
import elasticapm
|
|
4
|
-
from flask import current_app
|
|
4
|
+
from flask import current_app, request
|
|
5
5
|
|
|
6
6
|
from clue.common.exceptions import (
|
|
7
7
|
AccessDeniedException,
|
|
@@ -49,7 +49,9 @@ def parse_user_data(
|
|
|
49
49
|
provider = oauth.create_client(oauth_provider)
|
|
50
50
|
|
|
51
51
|
if "id_token" in data:
|
|
52
|
-
data = provider.parse_id_token(
|
|
52
|
+
data = provider.parse_id_token(
|
|
53
|
+
data, nonce=request.args.get("nonce", data.get("userinfo", {}).get("nonce", None))
|
|
54
|
+
)
|
|
53
55
|
|
|
54
56
|
oauth_provider_config = config.auth.oauth.providers[oauth_provider]
|
|
55
57
|
|
|
@@ -146,7 +146,7 @@ log_cli_level = "WARN"
|
|
|
146
146
|
[tool.poetry]
|
|
147
147
|
package-mode = true
|
|
148
148
|
name = "clue-api"
|
|
149
|
-
version = "1.0.1.
|
|
149
|
+
version = "1.0.1.dev91"
|
|
150
150
|
description = "Clue distributed enrichment service"
|
|
151
151
|
authors = ["Canadian Centre for Cyber Security <contact@cyber.gc.ca>"]
|
|
152
152
|
license = "MIT"
|
|
@@ -205,7 +205,7 @@ prometheus-client = { version = "^0.20.0", optional = true }
|
|
|
205
205
|
apscheduler = { version = "^3.10.4", optional = true }
|
|
206
206
|
pytz = { version = "^2024.1", optional = true }
|
|
207
207
|
passlib = { version = "^1.7.4", optional = true }
|
|
208
|
-
authlib = { version = "<
|
|
208
|
+
authlib = { version = "<2.0.0", optional = true }
|
|
209
209
|
flask-cors = { version = ">=4.0.1,<7.0.0", optional = true }
|
|
210
210
|
flasgger = { version = "^0.9.7.1", optional = true }
|
|
211
211
|
trino = "^0.336.0"
|
|
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
|