|
4 | 4 | # performance processing of geographical data that uses GRASS GIS for
|
5 | 5 | # computational tasks. For details, see https://actinia.mundialis.de/
|
6 | 6 | #
|
7 |
| -# Copyright (c) 2016-2018 Sören Gebbert and mundialis GmbH & Co. KG |
| 7 | +# Copyright (c) 2016-2023 Sören Gebbert and mundialis GmbH & Co. KG |
8 | 8 | #
|
9 | 9 | # This program is free software: you can redistribute it and/or modify
|
10 | 10 | # it under the terms of the GNU General Public License as published by
|
|
34 | 34 | __license__ = "GPLv3"
|
35 | 35 | __author__ = "Sören Gebbert, Anika Weinmann"
|
36 | 36 | __copyright__ = (
|
37 |
| - "Copyright 2016-2022, Sören Gebbert and mundialis GmbH & Co. KG" |
| 37 | + "Copyright 2016-2023, Sören Gebbert and mundialis GmbH & Co. KG" |
38 | 38 | )
|
39 | 39 | __maintainer__ = "mundialis GmbH & Co. KG"
|
40 | 40 |
|
@@ -320,6 +320,8 @@ def __init__(self):
|
320 | 320 | self.PLUGINS = []
|
321 | 321 | # ENDPOINTS_CONFIG: configuration csv file for endpoints
|
322 | 322 | self.ENDPOINTS_CONFIG = None
|
| 323 | + # AUTHENTICATION: If set False no authentication is needed |
| 324 | + self.AUTHENTICATION = True |
323 | 325 |
|
324 | 326 | """
|
325 | 327 | KEYCLOAK: has only to be set if keycloak server is configured with
|
@@ -560,6 +562,7 @@ def write(self, path=DEFAULT_CONFIG_PATH):
|
560 | 562 | config.set("API", "FORCE_HTTPS_URLS", str(self.FORCE_HTTPS_URLS))
|
561 | 563 | config.set("API", "PLUGINS", str(self.PLUGINS))
|
562 | 564 | config.set("API", "ENDPOINTS_CONFIG", str(self.ENDPOINTS_CONFIG))
|
| 565 | + config.set("API", "AUTHENTICATION", str(self.AUTHENTICATION)) |
563 | 566 |
|
564 | 567 | config.add_section("KEYCLOAK")
|
565 | 568 | config.set(
|
@@ -810,6 +813,10 @@ def read(self, path=DEFAULT_CONFIG_PATH):
|
810 | 813 | self.ENDPOINTS_CONFIG = config.get(
|
811 | 814 | "API", "ENDPOINTS_CONFIG"
|
812 | 815 | )
|
| 816 | + if config.has_option("API", "AUTHENTICATION"): |
| 817 | + self.AUTHENTICATION = config.getboolean( |
| 818 | + "API", "AUTHENTICATION" |
| 819 | + ) |
813 | 820 |
|
814 | 821 | if config.has_section("KEYCLOAK"):
|
815 | 822 | if config.has_option("KEYCLOAK", "CONFIG_PATH"):
|
|
0 commit comments