-
Notifications
You must be signed in to change notification settings - Fork 1
/
aggregator.prod.py
78 lines (70 loc) · 2.25 KB
/
aggregator.prod.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import re
from openeo_driver.users.oidc import OidcProvider
from openeo_aggregator.config import AggregatorBackendConfig
_DEFAULT_OIDC_CLIENT_EGI = {
"id": "openeo-platform-default-client",
"grant_types": [
"authorization_code+pkce",
"urn:ietf:params:oauth:grant-type:device_code+pkce",
"refresh_token",
],
"redirect_urls": [
"https://editor.openeo.cloud",
"http://localhost:1410/",
"https://editor.openeo.org",
],
}
_DEFAULT_EGI_SCOPES = [
"openid",
"email",
"eduperson_entitlement",
"eduperson_scoped_affiliation",
]
oidc_providers = [
OidcProvider(
id="egi",
title="EGI Check-in",
issuer="https://aai.egi.eu/auth/realms/egi/",
scopes=_DEFAULT_EGI_SCOPES,
default_clients=[_DEFAULT_OIDC_CLIENT_EGI],
),
]
ZK_HOSTS = "epod-master1.vgt.vito.be:2181,epod-master2.vgt.vito.be:2181,epod-master3.vgt.vito.be:2181"
config = AggregatorBackendConfig(
id="openeo-platform-aggregator-prod",
capabilities_title="openEO Platform",
capabilities_description="openEO Platform, provided through openEO Aggregator Driver.",
oidc_providers=oidc_providers,
aggregator_backends={
"vito": "https://openeo.vito.be/openeo/1.1/",
"eodc": "https://openeo.eodc.eu/openeo/1.1.0/",
# Sentinel Hub OpenEO by Sinergise
"sentinelhub": "https://openeo.sentinel-hub.com/production/",
},
collection_allow_list=[
# Special case: only consider Terrascope for SENTINEL2_L2A
{"collection_id": "SENTINEL2_L2A", "allowed_backends": ["vito"]},
# Still allow all other collections
re.compile("(?!SENTINEL2_L2A).*"),
],
zookeeper_prefix="/openeo/aggregator/",
partitioned_job_tracking={
"zk_hosts": ZK_HOSTS,
},
memoizer={
# See `memoizer_from_config` for more details
"type": "chained",
"config": {
"parts": [
{"type": "dict", "config": {"default_ttl": 5 * 60}},
{
"type": "zookeeper",
"config": {
"zk_hosts": ZK_HOSTS,
"default_ttl": 24 * 60 * 60,
},
},
]
},
},
)