sovereign 0.29.3__py3-none-any.whl → 0.30.0__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.
Potentially problematic release.
This version of sovereign might be problematic. Click here for more details.
- sovereign/__init__.py +34 -40
- sovereign/app.py +11 -10
- sovereign/context.py +37 -24
- sovereign/discovery.py +8 -9
- sovereign/dynamic_config/deser.py +1 -2
- sovereign/dynamic_config/loaders.py +1 -2
- sovereign/logging/access_logger.py +14 -1
- sovereign/logging/application_logger.py +0 -1
- sovereign/logging/base_logger.py +3 -27
- sovereign/logging/bootstrapper.py +1 -1
- sovereign/middlewares.py +3 -2
- sovereign/modifiers/lib.py +1 -0
- sovereign/schemas.py +86 -37
- sovereign/sources/inline.py +1 -0
- sovereign/sources/lib.py +1 -0
- sovereign/sources/poller.py +8 -8
- sovereign/static/panel.js +56 -0
- sovereign/static/search_filter.js +20 -0
- sovereign/templates/resources.html +39 -36
- sovereign/tracing.py +52 -52
- sovereign/utils/crypto/suites/base_cipher.py +5 -10
- sovereign/utils/dictupdate.py +2 -1
- sovereign/views/admin.py +1 -0
- sovereign/views/crypto.py +2 -1
- sovereign/views/healthchecks.py +2 -1
- sovereign/views/interface.py +22 -6
- {sovereign-0.29.3.dist-info → sovereign-0.30.0.dist-info}/METADATA +46 -47
- {sovereign-0.29.3.dist-info → sovereign-0.30.0.dist-info}/RECORD +31 -31
- {sovereign-0.29.3.dist-info → sovereign-0.30.0.dist-info}/WHEEL +1 -1
- {sovereign-0.29.3.dist-info → sovereign-0.30.0.dist-info}/entry_points.txt +2 -0
- sovereign/configuration.py +0 -66
- sovereign/templates/ul_filter.html +0 -22
- {sovereign-0.29.3.dist-info → sovereign-0.30.0.dist-info}/LICENSE.txt +0 -0
sovereign/views/interface.py
CHANGED
|
@@ -6,7 +6,8 @@ from fastapi.encoders import jsonable_encoder
|
|
|
6
6
|
from fastapi.requests import Request
|
|
7
7
|
from fastapi.responses import HTMLResponse, JSONResponse, RedirectResponse, Response
|
|
8
8
|
|
|
9
|
-
from sovereign import XDS_TEMPLATES, html_templates,
|
|
9
|
+
from sovereign import XDS_TEMPLATES, html_templates, poller, config
|
|
10
|
+
from sovereign.response_class import json_response_class
|
|
10
11
|
from sovereign.discovery import DiscoveryTypes
|
|
11
12
|
from sovereign.utils.mock import mock_discovery_request
|
|
12
13
|
from sovereign.views.discovery import perform_discovery
|
|
@@ -18,6 +19,12 @@ all_types = [t.value for t in DiscoveryTypes]
|
|
|
18
19
|
|
|
19
20
|
@router.get("/")
|
|
20
21
|
async def ui_main(request: Request) -> HTMLResponse:
|
|
22
|
+
if poller is not None:
|
|
23
|
+
last_update = str(poller.last_updated)
|
|
24
|
+
else:
|
|
25
|
+
# TODO: incorporate with cache? template context?
|
|
26
|
+
last_update = ""
|
|
27
|
+
|
|
21
28
|
try:
|
|
22
29
|
return html_templates.TemplateResponse(
|
|
23
30
|
request=request,
|
|
@@ -25,7 +32,7 @@ async def ui_main(request: Request) -> HTMLResponse:
|
|
|
25
32
|
media_type="text/html",
|
|
26
33
|
context={
|
|
27
34
|
"all_types": all_types,
|
|
28
|
-
"last_update":
|
|
35
|
+
"last_update": last_update,
|
|
29
36
|
},
|
|
30
37
|
)
|
|
31
38
|
except IndexError:
|
|
@@ -37,7 +44,7 @@ async def ui_main(request: Request) -> HTMLResponse:
|
|
|
37
44
|
"title": "No resource types configured",
|
|
38
45
|
"message": "A template should be defined for every resource "
|
|
39
46
|
"type that you want your envoy proxies to discover.",
|
|
40
|
-
"doc_link": "https://
|
|
47
|
+
"doc_link": "https://developer.atlassian.com/platform/sovereign/tutorial/templates/#templates",
|
|
41
48
|
},
|
|
42
49
|
)
|
|
43
50
|
|
|
@@ -89,7 +96,7 @@ async def resources(
|
|
|
89
96
|
envoy_version: str = Cookie(
|
|
90
97
|
"__any__", title="The clients envoy version to emulate in this XDS request"
|
|
91
98
|
),
|
|
92
|
-
debug:
|
|
99
|
+
debug: int = Query(0, title="Show debug information on errors"),
|
|
93
100
|
) -> HTMLResponse:
|
|
94
101
|
ret: Dict[str, List[Dict[str, Any]]] = defaultdict(list)
|
|
95
102
|
response = None
|
|
@@ -109,6 +116,15 @@ async def resources(
|
|
|
109
116
|
ret["resources"] = [{"sovereign_error": str(e)}]
|
|
110
117
|
else:
|
|
111
118
|
ret["resources"] = response.deserialize_resources()
|
|
119
|
+
|
|
120
|
+
if poller is not None:
|
|
121
|
+
last_update = str(poller.last_updated)
|
|
122
|
+
match_keys = poller.match_keys
|
|
123
|
+
else:
|
|
124
|
+
# TODO: incorporate with cache? template context?
|
|
125
|
+
last_update = ""
|
|
126
|
+
match_keys = config.expected_service_clusters
|
|
127
|
+
|
|
112
128
|
return html_templates.TemplateResponse(
|
|
113
129
|
request=request,
|
|
114
130
|
name="resources.html",
|
|
@@ -123,8 +139,8 @@ async def resources(
|
|
|
123
139
|
"version": envoy_version,
|
|
124
140
|
"available_versions": list(XDS_TEMPLATES.keys()),
|
|
125
141
|
"service_cluster": service_cluster,
|
|
126
|
-
"available_service_clusters":
|
|
127
|
-
"last_update":
|
|
142
|
+
"available_service_clusters": match_keys,
|
|
143
|
+
"last_update": last_update,
|
|
128
144
|
},
|
|
129
145
|
)
|
|
130
146
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sovereign
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.30.0
|
|
4
4
|
Summary: Envoy Proxy control-plane written in Python
|
|
5
5
|
Home-page: https://pypi.org/project/sovereign/
|
|
6
6
|
License: Apache-2.0
|
|
@@ -19,6 +19,7 @@ Classifier: Operating System :: POSIX :: Linux
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
23
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
24
|
Classifier: Programming Language :: Python :: 3.8
|
|
24
25
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -40,70 +41,80 @@ Requires-Dist: cashews[redis] (>=6.3.0,<7.0.0) ; extra == "caching"
|
|
|
40
41
|
Requires-Dist: croniter (>=1.4.1,<2.0.0)
|
|
41
42
|
Requires-Dist: cryptography (>=42.0.0,<43.0.0)
|
|
42
43
|
Requires-Dist: datadog (>=0.47.0,<0.48.0) ; extra == "statsd"
|
|
43
|
-
Requires-Dist: fastapi (>=0.
|
|
44
|
+
Requires-Dist: fastapi (>=0.115.2,<0.116.0)
|
|
44
45
|
Requires-Dist: glom (>=23.3.0,<24.0.0)
|
|
45
46
|
Requires-Dist: gunicorn (>=22.0.0,<23.0.0)
|
|
46
47
|
Requires-Dist: httptools (>=0.6.0,<0.7.0) ; extra == "httptools"
|
|
47
48
|
Requires-Dist: orjson (>=3.9.15,<4.0.0) ; extra == "orjson"
|
|
48
49
|
Requires-Dist: pydantic (>=2.7.2,<3.0.0)
|
|
49
|
-
Requires-Dist: pydantic-settings (
|
|
50
|
+
Requires-Dist: pydantic-settings (<2.6.0)
|
|
50
51
|
Requires-Dist: redis (<=5.0.0)
|
|
51
52
|
Requires-Dist: requests (>=2.31.0,<3.0.0)
|
|
52
53
|
Requires-Dist: sentry-sdk (>=2.14.0,<3.0.0) ; extra == "sentry"
|
|
54
|
+
Requires-Dist: starlette-context (>=0.3.6,<0.4.0)
|
|
53
55
|
Requires-Dist: structlog (>=23.1.0,<24.0.0)
|
|
54
56
|
Requires-Dist: ujson (>=5.8.0,<6.0.0) ; extra == "ujson"
|
|
55
57
|
Requires-Dist: uvicorn (>=0.23.2,<0.24.0)
|
|
56
58
|
Requires-Dist: uvloop (>=0.19.0,<0.20.0)
|
|
57
|
-
Project-URL: Documentation, https://
|
|
59
|
+
Project-URL: Documentation, https://developer.atlassian.com/platform/sovereign/
|
|
58
60
|
Project-URL: Repository, https://bitbucket.org/atlassian/sovereign/src/master/
|
|
59
61
|
Description-Content-Type: text/markdown
|
|
60
62
|
|
|
61
63
|
sovereign
|
|
62
64
|
=========
|
|
63
65
|
|
|
66
|
+
|
|
64
67
|
Mission statement
|
|
65
68
|
-----------------
|
|
66
69
|
This project implements a JSON control-plane based on the [envoy](https://envoyproxy.io) [data-plane-api](https://github.com/envoyproxy/data-plane-api)
|
|
67
70
|
|
|
68
|
-
The purpose of `sovereign` is to supply downstream envoy proxies with
|
|
69
|
-
|
|
71
|
+
The purpose of `sovereign` is to supply downstream envoy proxies with dynamic configuration.
|
|
72
|
+
|
|
70
73
|
|
|
71
74
|
Mechanism of Operation
|
|
72
75
|
----------------------
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
Sovereign allows you to define templates that represent each resource type
|
|
77
|
+
provided by Envoy. For example, clusters, routes, listeners, secrets,
|
|
78
|
+
extension_configs, etc.
|
|
79
|
+
|
|
80
|
+
In order to enrich the templates with data, Sovereign has ways of polling data
|
|
81
|
+
out-of-band which it then includes as variables that can be accessed within the
|
|
82
|
+
templates.
|
|
83
|
+
|
|
84
|
+
This allows Sovereign to provide configuration to Envoy that changes over time
|
|
85
|
+
depending on the data sources, without needing to redeploy the control-plane.
|
|
79
86
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
uses the data to generate envoy configuration from either python code, or jinja2 templates.
|
|
87
|
+
Sovereign provides some built-in ways of polling data (such as over HTTP, or
|
|
88
|
+
on-disk) but also exposes extension points, allowing you to write your own
|
|
89
|
+
plugins in Python.
|
|
84
90
|
|
|
85
|
-
This is performed in a semi-stateless way, where the only state is data cached in memory.
|
|
86
91
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
Support
|
|
93
|
+
------------
|
|
94
|
+
[Submit new issues here](https://bitbucket.org/atlassian/sovereign/issues/new)
|
|
95
|
+
|
|
96
|
+
If you're unable to submit an issue on Bitbucket, send an email to [vsyrakis@atlassian.com](mailto:vsyrakis@atlassian.com)
|
|
97
|
+
|
|
90
98
|
|
|
91
|
-
|
|
92
|
-
|
|
99
|
+
Release
|
|
100
|
+
------------
|
|
101
|
+
See [RELEASE.md]
|
|
93
102
|
|
|
94
|
-
Both modifiers and sources are pluggable, i.e. it's easy to write your own and
|
|
95
|
-
plug them into Sovereign for your use-case.
|
|
96
103
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
104
|
+
Roadmap
|
|
105
|
+
------------
|
|
106
|
+
* Performance improvements
|
|
107
|
+
* Data persistence
|
|
108
|
+
* Push API (versus polling)
|
|
109
|
+
* Client for Sovereign
|
|
110
|
+
* gRPC
|
|
100
111
|
|
|
101
|
-
The JSON configuration can be viewed in real-time with Sovereign's read-only web interface.
|
|
102
112
|
|
|
103
113
|
Requirements
|
|
104
114
|
------------
|
|
105
115
|
* Python 3.8+
|
|
106
116
|
|
|
117
|
+
|
|
107
118
|
Installation
|
|
108
119
|
------------
|
|
109
120
|
```
|
|
@@ -112,62 +123,52 @@ pip install sovereign
|
|
|
112
123
|
|
|
113
124
|
Documentation
|
|
114
125
|
-------------
|
|
115
|
-
[Read the docs here!](https://
|
|
126
|
+
[Read the docs here!](https://developer.atlassian.com/platform/sovereign/)
|
|
116
127
|
|
|
117
|
-
:new: Read-only user interface
|
|
118
|
-
------------------------
|
|
119
|
-
Added in `v0.5.3`!
|
|
120
128
|
|
|
121
|
-
This interface allows you to browse the resources currently returned by Sovereign.
|
|
122
|
-
|
|
123
|
-

|
|
124
129
|
|
|
125
130
|
Local development
|
|
126
131
|
=================
|
|
127
132
|
|
|
133
|
+
|
|
128
134
|
Requirements
|
|
129
135
|
------------
|
|
136
|
+
* Poetry
|
|
130
137
|
* Docker
|
|
131
138
|
* Docker-compose
|
|
132
139
|
|
|
140
|
+
|
|
133
141
|
Installing dependencies for dev
|
|
134
142
|
-------------------------------
|
|
135
|
-
|
|
136
|
-
|
|
143
|
+
Dependencies and creation of virtualenv is handled by poetry
|
|
137
144
|
```
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
pip install -r requirements-dev.txt
|
|
145
|
+
poetry install
|
|
146
|
+
poetry shell
|
|
141
147
|
```
|
|
142
148
|
|
|
143
149
|
Running locally
|
|
144
150
|
---------------
|
|
145
151
|
Running the test env
|
|
146
|
-
|
|
147
152
|
```
|
|
148
153
|
make run
|
|
149
154
|
```
|
|
150
155
|
|
|
151
156
|
Running the test env daemonized
|
|
152
|
-
|
|
153
157
|
```
|
|
154
158
|
make run-daemon
|
|
155
159
|
```
|
|
156
160
|
|
|
157
161
|
Pylint
|
|
158
|
-
|
|
159
162
|
```
|
|
160
163
|
make lint
|
|
161
164
|
```
|
|
162
165
|
|
|
163
166
|
Unit tests
|
|
164
|
-
|
|
165
167
|
```
|
|
166
168
|
make unit
|
|
167
169
|
```
|
|
168
170
|
|
|
169
171
|
Acceptance tests
|
|
170
|
-
|
|
171
172
|
```
|
|
172
173
|
make run-daemon acceptance
|
|
173
174
|
```
|
|
@@ -175,7 +176,6 @@ make run-daemon acceptance
|
|
|
175
176
|
|
|
176
177
|
Contributors
|
|
177
178
|
============
|
|
178
|
-
|
|
179
179
|
Pull requests, issues and comments welcome. For pull requests:
|
|
180
180
|
|
|
181
181
|
* Add tests for new features and bug fixes
|
|
@@ -204,7 +204,6 @@ those contributing as an individual.
|
|
|
204
204
|
|
|
205
205
|
License
|
|
206
206
|
========
|
|
207
|
-
|
|
208
207
|
Copyright (c) 2018 Atlassian and others.
|
|
209
208
|
Apache 2.0 licensed, see [LICENSE.txt](LICENSE.txt) file.
|
|
210
209
|
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
sovereign/__init__.py,sha256=
|
|
2
|
-
sovereign/app.py,sha256=
|
|
3
|
-
sovereign/configuration.py,sha256=BCezlWYIpTsFRZwQIBwU-XrfBk1MdjTKMLA8huN-VPg,2484
|
|
1
|
+
sovereign/__init__.py,sha256=AEvYuDWafstmB6K9OqBA_hf1RPFUqiq9_PeVCfpshso,2994
|
|
2
|
+
sovereign/app.py,sha256=WIetM8_4m5nZ6eD12Kd_jDKeUkcDRqdkk7L4wCKyP40,4257
|
|
4
3
|
sovereign/constants.py,sha256=qdWD1lTvkaW5JGF7TmZhfksQHlRAJFVqbG7v6JQA9k8,46
|
|
5
|
-
sovereign/context.py,sha256=
|
|
6
|
-
sovereign/discovery.py,sha256=
|
|
4
|
+
sovereign/context.py,sha256=qeo1Alb26kuyD3mDqJleh3MTJviQqdm7HE5lvHpVAF4,7009
|
|
5
|
+
sovereign/discovery.py,sha256=iQ3QJzXuxB6su79dDqgjmlzhVWAGrxq4XOrCwwwIPi8,6373
|
|
7
6
|
sovereign/dynamic_config/__init__.py,sha256=QoRNcuCAqV26zeyHm0iavsR55K3TwMohabWpPGIq_rM,2838
|
|
8
|
-
sovereign/dynamic_config/deser.py,sha256=
|
|
9
|
-
sovereign/dynamic_config/loaders.py,sha256=
|
|
7
|
+
sovereign/dynamic_config/deser.py,sha256=N3iUvDpuNHWjxUbGFydMVKicx4o8DyfvNukorqnQdt8,1834
|
|
8
|
+
sovereign/dynamic_config/loaders.py,sha256=gPkxTL7gep20HIMRvjgOqAdUWqtb3970VBCAcUrIM4c,2915
|
|
10
9
|
sovereign/error_info.py,sha256=r2KXBYq9Fo7AI2pmIpATWFm0pykr2MqfrKH0WWW5Sfk,1488
|
|
11
|
-
sovereign/logging/access_logger.py,sha256=
|
|
12
|
-
sovereign/logging/application_logger.py,sha256=
|
|
13
|
-
sovereign/logging/base_logger.py,sha256=
|
|
14
|
-
sovereign/logging/bootstrapper.py,sha256=
|
|
10
|
+
sovereign/logging/access_logger.py,sha256=G-R6kSPDQlrunSh34qXIT3LwbamAhdASuPgPOaXCRdM,2983
|
|
11
|
+
sovereign/logging/application_logger.py,sha256=HjrGTi2zZ06AaToDVdSv4MNIF6aWN6vFW5heAdfqwlk,1800
|
|
12
|
+
sovereign/logging/base_logger.py,sha256=ScOzHs8Rt1RZaUZGvaJSAlDEjD0BxkD5sLKSm2GgM0I,1243
|
|
13
|
+
sovereign/logging/bootstrapper.py,sha256=m2arNfP0MgAeZC1slp3Sqtcwpye8pnZ-i5VTzYt50mo,1185
|
|
15
14
|
sovereign/logging/types.py,sha256=rGqJAEVvgvzHy4aPfvEH6yQ-yblXNkEcWG7G8l9ALEA,282
|
|
16
|
-
sovereign/middlewares.py,sha256=
|
|
15
|
+
sovereign/middlewares.py,sha256=tQazHAtIdUc1hWhopg33x83-g-JcilU4HdjzoxFe6NU,3053
|
|
17
16
|
sovereign/modifiers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
sovereign/modifiers/lib.py,sha256=
|
|
17
|
+
sovereign/modifiers/lib.py,sha256=Cx0VrpTKbSjb3YmHyG4Jy6YEaPlrwpeqNaom3zu1_hw,2885
|
|
19
18
|
sovereign/response_class.py,sha256=beMAFV-4L6DwyWzJzy71GkEW4gb7fzH1jd8-Tul13cU,427
|
|
20
|
-
sovereign/schemas.py,sha256=
|
|
19
|
+
sovereign/schemas.py,sha256=XY5UQiAwy3TgxMqZt0HxsiytRnvaIx-rgBe3stEMYJg,33473
|
|
21
20
|
sovereign/server.py,sha256=z8Uz1UYIZix0S40Srk774WIMDN2jl2SozO8irib0wc4,1402
|
|
22
21
|
sovereign/sources/__init__.py,sha256=g9hEpFk8j5i1ApHQpbc9giTyJW41Ppgsqv5P9zGxOJk,78
|
|
23
22
|
sovereign/sources/file.py,sha256=prUThsDCSPNwZaZpkKXhAm-GVRZWbBoGKGU0It4HHXs,690
|
|
24
|
-
sovereign/sources/inline.py,sha256=
|
|
25
|
-
sovereign/sources/lib.py,sha256=
|
|
26
|
-
sovereign/sources/poller.py,sha256=
|
|
23
|
+
sovereign/sources/inline.py,sha256=pP77m7bHjqE3sSoqZthcuw1ARVMf9gooVwbz4B8OAek,1003
|
|
24
|
+
sovereign/sources/lib.py,sha256=0hk_G6mKJrB65WokVZnqF5kdJ3vsQZMNPuJqJO0mBsI,1031
|
|
25
|
+
sovereign/sources/poller.py,sha256=SdpWRb79-ronyNjX-bYVviQ9r-z12MQxbOTmKR1uESw,10891
|
|
26
|
+
sovereign/static/panel.js,sha256=fgAGJo2d_MvAG5rcraY9rvY-TgmTtBbCs4SvzugYssE,2005
|
|
27
27
|
sovereign/static/sass/style.scss,sha256=tPHPEm3sZeBFGDyyn3pHcA-nbaKT-h-UsSTsf6dHNDU,1158
|
|
28
|
+
sovereign/static/search_filter.js,sha256=StfTXTu9mGnkwObkIbuWk1DfwFTheXzrQ6OVq_7E3v4,697
|
|
28
29
|
sovereign/static/style.css,sha256=vG8HPsbCbPIZfHgy7gSeof97Pnp0okkyaXyJzIEEW-8,447517
|
|
29
30
|
sovereign/statistics.py,sha256=Xfj4oWMfCkbYc2ibF7rDUpbw6Zw6dI4N5BpCLDQc4j4,2336
|
|
30
31
|
sovereign/templates/base.html,sha256=5vw3-NmN291pXRdArpCwhSce9bAYBWCJVRhvO5EmE9g,2296
|
|
31
32
|
sovereign/templates/err.html,sha256=a3cEzOqyqWOIe3YxfTEjkxbTfxBxq1knD6GwzEFljfs,603
|
|
32
|
-
sovereign/templates/resources.html,sha256=
|
|
33
|
-
sovereign/templates/ul_filter.html,sha256=LrzZv5408Qq5UP4lcHVRwY2G6lXd3IiSNiJn1aH7Yqo,666
|
|
33
|
+
sovereign/templates/resources.html,sha256=feN7iClAUccPu7WQ-xIOyDZ7qEaTK5l5NahxzFGv2Wg,7803
|
|
34
34
|
sovereign/testing/loaders.py,sha256=mcmErhI9ZkJUBZl8jv2qP-PCBRFeAIgyBFlfCgU4Vvk,199
|
|
35
35
|
sovereign/testing/modifiers.py,sha256=7_c2hWXn_sYJ6997N1_uSWtClOikcOzu1yRCY56-l-4,361
|
|
36
|
-
sovereign/tracing.py,sha256=
|
|
36
|
+
sovereign/tracing.py,sha256=Xo3npgh6yesACSlynv9j6qnXxvYEBzXv5LL4Zkc1QDw,2446
|
|
37
37
|
sovereign/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
38
|
sovereign/utils/auth.py,sha256=sQC8eLPWtk0RIXKwwxnYqILUvUCOaEGtGrtdJflat8E,1692
|
|
39
39
|
sovereign/utils/crypto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
40
|
sovereign/utils/crypto/crypto.py,sha256=s6qYB3cmY5f4Sacq1LlSARzIWMTys7l2o9mMsCGLfmU,4526
|
|
41
41
|
sovereign/utils/crypto/suites/__init__.py,sha256=smMvNa1VsQ0PvsNj6lnRNh4ktB7dMnas1CqeTOFqgGA,526
|
|
42
42
|
sovereign/utils/crypto/suites/aes_gcm_cipher.py,sha256=Yjfj1LCQDGTzHBjrZR3-koh29L_N34v65kPoIfta0aw,1239
|
|
43
|
-
sovereign/utils/crypto/suites/base_cipher.py,sha256=
|
|
43
|
+
sovereign/utils/crypto/suites/base_cipher.py,sha256=kUOZh_ZIILyo5zv99-qzbJZDpeMmt76vhkBDEPvAt4A,454
|
|
44
44
|
sovereign/utils/crypto/suites/disabled_cipher.py,sha256=0_vzydVdVIUlX4pYEAMgB_RvHpyZ25uDC4pz1jRJ5wE,573
|
|
45
45
|
sovereign/utils/crypto/suites/fernet_cipher.py,sha256=rP6M5ys1vctyadOxDGNFoyerWPUOunLQdZ2jjS1pxzc,701
|
|
46
|
-
sovereign/utils/dictupdate.py,sha256=
|
|
46
|
+
sovereign/utils/dictupdate.py,sha256=Bi7QaC7en-k3EOepwNJqpOKRNBgp6ZsBZVOvH_0nMtc,2558
|
|
47
47
|
sovereign/utils/eds.py,sha256=sCEDj1y-0Crs40cHZLiPGVb7ed1f8vFqgHLY5R2LMbw,4377
|
|
48
48
|
sovereign/utils/entry_point_loader.py,sha256=BEVodk-um70RvT1nSOu_IB-hr1K4ppthXod0VZEiZJ8,526
|
|
49
49
|
sovereign/utils/mock.py,sha256=M4hvNKSS3c4wYwHgVaHtwMspoufzZR4rCx_3TB-HD4U,1261
|
|
@@ -53,13 +53,13 @@ sovereign/utils/timer.py,sha256=_dUtEasj0BKbWYuQ_T3HFIyjurXXj-La-dNSMAwKMSo,795
|
|
|
53
53
|
sovereign/utils/version_info.py,sha256=vbAiUyz6v3-zSOoS-7HwrvJie729RgIKy0Bt091Z6RE,349
|
|
54
54
|
sovereign/utils/weighted_clusters.py,sha256=bPzuRE7Qgvv04HcR2AhMDvBrFlZ8AfteweLKhY9SvWg,1166
|
|
55
55
|
sovereign/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
|
-
sovereign/views/admin.py,sha256=
|
|
57
|
-
sovereign/views/crypto.py,sha256=
|
|
56
|
+
sovereign/views/admin.py,sha256=B_uG5WE9UEEPw-Ax5fyBEhC0bSQ2c4aZt0AwdKJzDnY,4326
|
|
57
|
+
sovereign/views/crypto.py,sha256=7y0eHWtt-bbr2CwHEkH7odPaJ1IEviU-71U-MYJD0Kc,3360
|
|
58
58
|
sovereign/views/discovery.py,sha256=BmsHsBe_N33_VahkLQda3CfuIqJZAHSA0Bndg9KagQM,6187
|
|
59
|
-
sovereign/views/healthchecks.py,sha256=
|
|
60
|
-
sovereign/views/interface.py,sha256=
|
|
61
|
-
sovereign-0.
|
|
62
|
-
sovereign-0.
|
|
63
|
-
sovereign-0.
|
|
64
|
-
sovereign-0.
|
|
65
|
-
sovereign-0.
|
|
59
|
+
sovereign/views/healthchecks.py,sha256=8BA11nigm1btnBOdtXGN1B04Ow2uswWNNsuKoPLXgh0,1393
|
|
60
|
+
sovereign/views/interface.py,sha256=KoLB3YIZGulrYOV6MA6ucmQzlmSDrYEO8uq045awy1Q,7712
|
|
61
|
+
sovereign-0.30.0.dist-info/LICENSE.txt,sha256=2X125zvAb9AYLjCgdMDQZuufhm0kwcg31A8pGKj_-VY,560
|
|
62
|
+
sovereign-0.30.0.dist-info/METADATA,sha256=Aa-cjhsMmS6_6MiwVsCC1TboUlR_-y6Yqxp_fhd00O4,6194
|
|
63
|
+
sovereign-0.30.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
64
|
+
sovereign-0.30.0.dist-info/entry_points.txt,sha256=CTCjlomxNz2Ii4hYbN-gEZPBrZNUCcmJcb7NYqm4Nn8,1328
|
|
65
|
+
sovereign-0.30.0.dist-info/RECORD,,
|
|
@@ -5,7 +5,9 @@ sovereign=sovereign.server:main
|
|
|
5
5
|
jinja=sovereign.dynamic_config.deser:JinjaDeserializer
|
|
6
6
|
jinja2=sovereign.dynamic_config.deser:JinjaDeserializer
|
|
7
7
|
json=sovereign.dynamic_config.deser:JsonDeserializer
|
|
8
|
+
none=sovereign.dynamic_config.deser:PassthroughDeserializer
|
|
8
9
|
orjson=sovereign.dynamic_config.deser:OrjsonDeserializer
|
|
10
|
+
passthrough=sovereign.dynamic_config.deser:PassthroughDeserializer
|
|
9
11
|
raw=sovereign.dynamic_config.deser:PassthroughDeserializer
|
|
10
12
|
string=sovereign.dynamic_config.deser:StringDeserializer
|
|
11
13
|
ujson=sovereign.dynamic_config.deser:UjsonDeserializer
|
sovereign/configuration.py
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from typing import Any, Mapping
|
|
3
|
-
|
|
4
|
-
from pydantic import ValidationError
|
|
5
|
-
|
|
6
|
-
from sovereign import dynamic_config
|
|
7
|
-
from sovereign.context import TemplateContext
|
|
8
|
-
from sovereign.logging.bootstrapper import LoggerBootstrapper
|
|
9
|
-
from sovereign.schemas import SovereignAsgiConfig, SovereignConfig, SovereignConfigv2
|
|
10
|
-
from sovereign.sources import SourcePoller
|
|
11
|
-
from sovereign.statistics import configure_statsd
|
|
12
|
-
from sovereign.utils.crypto.crypto import CipherContainer
|
|
13
|
-
from sovereign.utils.dictupdate import merge # type: ignore
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def parse_raw_configuration(path: str) -> Mapping[Any, Any]:
|
|
17
|
-
ret: Mapping[Any, Any] = dict()
|
|
18
|
-
for p in path.split(","):
|
|
19
|
-
spec = dynamic_config.Loadable.from_legacy_fmt(p)
|
|
20
|
-
ret = merge(obj_a=ret, obj_b=spec.load(), merge_lists=True)
|
|
21
|
-
return ret
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def load_sovereign_configuration() -> SovereignConfigv2:
|
|
25
|
-
config_path = os.getenv("SOVEREIGN_CONFIG", "file:///etc/sovereign.yaml")
|
|
26
|
-
try:
|
|
27
|
-
return SovereignConfigv2(**parse_raw_configuration(config_path))
|
|
28
|
-
except ValidationError:
|
|
29
|
-
old_config = SovereignConfig(**parse_raw_configuration(config_path))
|
|
30
|
-
return SovereignConfigv2.from_legacy_config(old_config)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
CONFIG = load_sovereign_configuration()
|
|
34
|
-
ASGI_CONFIG = SovereignAsgiConfig()
|
|
35
|
-
XDS_TEMPLATES = CONFIG.xds_templates()
|
|
36
|
-
|
|
37
|
-
LOGS = LoggerBootstrapper(CONFIG)
|
|
38
|
-
STATS = configure_statsd(config=CONFIG.statsd)
|
|
39
|
-
ENCRYPTION_CONFIGS = CONFIG.authentication.encryption_configs
|
|
40
|
-
CIPHER_CONTAINER = CipherContainer.from_encryption_configs(
|
|
41
|
-
encryption_configs=ENCRYPTION_CONFIGS,
|
|
42
|
-
logger=LOGS.application_logger.logger,
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
POLLER = SourcePoller(
|
|
46
|
-
sources=CONFIG.sources,
|
|
47
|
-
matching_enabled=CONFIG.matching.enabled,
|
|
48
|
-
node_match_key=CONFIG.matching.node_key,
|
|
49
|
-
source_match_key=CONFIG.matching.source_key,
|
|
50
|
-
source_refresh_rate=CONFIG.source_config.refresh_rate,
|
|
51
|
-
logger=LOGS.application_logger.logger,
|
|
52
|
-
stats=STATS,
|
|
53
|
-
)
|
|
54
|
-
TEMPLATE_CONTEXT = TemplateContext(
|
|
55
|
-
refresh_rate=CONFIG.template_context.refresh_rate,
|
|
56
|
-
refresh_cron=CONFIG.template_context.refresh_cron,
|
|
57
|
-
refresh_num_retries=CONFIG.template_context.refresh_num_retries,
|
|
58
|
-
refresh_retry_interval_secs=CONFIG.template_context.refresh_retry_interval_secs,
|
|
59
|
-
configured_context=CONFIG.template_context.context,
|
|
60
|
-
poller=POLLER,
|
|
61
|
-
encryption_suite=CIPHER_CONTAINER,
|
|
62
|
-
logger=LOGS.application_logger.logger,
|
|
63
|
-
stats=STATS,
|
|
64
|
-
)
|
|
65
|
-
POLLER.lazy_load_modifiers(CONFIG.modifiers)
|
|
66
|
-
POLLER.lazy_load_global_modifiers(CONFIG.global_modifiers)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
function filter_results(id, list) {
|
|
3
|
-
// Declare variables
|
|
4
|
-
let input, filter, container, iterable, resource, i, txtValue;
|
|
5
|
-
input = document.getElementById(id);
|
|
6
|
-
filter = input.value.toUpperCase();
|
|
7
|
-
|
|
8
|
-
container = document.getElementById(list);
|
|
9
|
-
iterable = container.getElementsByTagName("a");
|
|
10
|
-
|
|
11
|
-
// Loop through all list items, and hide those who don't match the search query
|
|
12
|
-
for (i = 0; i < iterable.length; i++) {
|
|
13
|
-
resource = iterable[i];
|
|
14
|
-
txtValue = resource.textContent;
|
|
15
|
-
if (txtValue.toUpperCase().indexOf(filter) > -1) {
|
|
16
|
-
iterable[i].style.display = "";
|
|
17
|
-
} else {
|
|
18
|
-
iterable[i].style.display = "none";
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
</script>
|
|
File without changes
|