jaaql-middleware-python 4.21.36__tar.gz → 4.21.38__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.
Files changed (73) hide show
  1. {jaaql-middleware-python-4.21.36/jaaql_middleware_python.egg-info → jaaql-middleware-python-4.21.38}/PKG-INFO +10 -10
  2. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/constants.py +1 -1
  3. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/documentation/documentation_internal.py +4 -4
  4. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/mvc/controller.py +3 -3
  5. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/mvc/model.py +10 -6
  6. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38/jaaql_middleware_python.egg-info}/PKG-INFO +10 -10
  7. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql_middleware_python.egg-info/requires.txt +9 -9
  8. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/LICENSE.txt +0 -0
  9. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/README.md +0 -0
  10. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/__init__.py +0 -0
  11. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/config/__init__.py +0 -0
  12. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/config/config-docker.ini +0 -0
  13. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/config/config-test.ini +0 -0
  14. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/config/config.ini +0 -0
  15. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/config_constants.py +0 -0
  16. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/db/__init__.py +0 -0
  17. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/db/db_interface.py +0 -0
  18. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/db/db_pg_interface.py +0 -0
  19. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/db/db_utils.py +0 -0
  20. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/db/db_utils_no_circ.py +0 -0
  21. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/documentation/__init__.py +0 -0
  22. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/documentation/documentation_public.py +0 -0
  23. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/documentation/documentation_shared.py +0 -0
  24. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/email/__init__.py +0 -0
  25. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/email/email_manager.py +0 -0
  26. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/email/email_manager_service.py +0 -0
  27. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/email/patch_ems.py +0 -0
  28. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/exceptions/__init__.py +0 -0
  29. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/exceptions/custom_http_status.py +0 -0
  30. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/exceptions/http_status_exception.py +0 -0
  31. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/exceptions/not_yet_implement_exception.py +0 -0
  32. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/interpreter/__init__.py +0 -0
  33. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/interpreter/interpret_jaaql.py +0 -0
  34. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/jaaql.py +0 -0
  35. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/migrations/__init__.py +0 -0
  36. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/migrations/migration_history.sql +0 -0
  37. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/migrations/migrations.py +0 -0
  38. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/mvc/__init__.py +0 -0
  39. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/mvc/base_controller.py +0 -0
  40. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/mvc/base_model.py +0 -0
  41. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/mvc/controller_interface.py +0 -0
  42. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/mvc/exception_queries.py +0 -0
  43. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/mvc/generated_queries.py +0 -0
  44. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/mvc/handmade_queries.py +0 -0
  45. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/mvc/model_interface.py +0 -0
  46. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/mvc/response.py +0 -0
  47. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/openapi/__init__.py +0 -0
  48. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/openapi/swagger_documentation.py +0 -0
  49. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/patch.py +0 -0
  50. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/scripts/01.install_domains.generated.sql +0 -0
  51. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/scripts/02.install_super_user.exceptions.sql +0 -0
  52. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/scripts/03.install_super_user.handwritten.sql +0 -0
  53. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/scripts/04.install_jaaql_data_structures.generated.sql +0 -0
  54. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/scripts/05.install_jaaql.exceptions.sql +0 -0
  55. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/scripts/06.install_jaaql.handwritten.sql +0 -0
  56. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/scripts/swagger_template.html +0 -0
  57. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/services/__init__.py +0 -0
  58. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/services/cached_canned_query_service.py +0 -0
  59. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/services/migrations_manager_service.py +0 -0
  60. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/services/patch_mms.py +0 -0
  61. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/services/patch_shared_var_service.py +0 -0
  62. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/services/shared_var_service.py +0 -0
  63. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/utilities/__init__.py +0 -0
  64. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/utilities/crypt_utils.py +0 -0
  65. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/utilities/options.py +0 -0
  66. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/utilities/utils.py +0 -0
  67. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/utilities/utils_no_project_imports.py +0 -0
  68. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql/utilities/vault.py +0 -0
  69. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql_middleware_python.egg-info/SOURCES.txt +0 -0
  70. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql_middleware_python.egg-info/dependency_links.txt +0 -0
  71. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/jaaql_middleware_python.egg-info/top_level.txt +0 -0
  72. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/setup.cfg +0 -0
  73. {jaaql-middleware-python-4.21.36 → jaaql-middleware-python-4.21.38}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jaaql-middleware-python
3
- Version: 4.21.36
3
+ Version: 4.21.38
4
4
  Summary: The jaaql package, allowing for rapid development and deployment of RESTful HTTP applications
5
5
  Home-page: https://github.com/JAAQL/JAAQL-middleware-python
6
6
  Author: Software Quality Measurement and Improvement bv
@@ -8,12 +8,12 @@ Author-email: aaron.tasker@sqmi.nl
8
8
  License: Mozilla Public License Version 2.0 with Commons Clause
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE.txt
11
- Requires-Dist: jaaql-monitor~=1.2.109
11
+ Requires-Dist: jaaql-monitor~=1.2.119
12
12
  Requires-Dist: psycopg[binary]~=3.1.18
13
- Requires-Dist: Pillow~=10.1.0
14
- Requires-Dist: cryptography~=41.0.5
15
- Requires-Dist: flask~=3.0.0
16
- Requires-Dist: coverage~=7.3.2
13
+ Requires-Dist: Pillow~=10.2.0
14
+ Requires-Dist: cryptography~=42.0.5
15
+ Requires-Dist: flask~=3.0.2
16
+ Requires-Dist: coverage~=7.4.3
17
17
  Requires-Dist: psycopg-pool~=3.2.1
18
18
  Requires-Dist: pyjwt~=2.8.0
19
19
  Requires-Dist: pyyaml~=6.0.1
@@ -22,13 +22,13 @@ Requires-Dist: argon2-cffi~=23.1.0
22
22
  Requires-Dist: pyotp~=2.9.0
23
23
  Requires-Dist: qrcode~=7.4.2
24
24
  Requires-Dist: gunicorn~=21.2.0
25
- Requires-Dist: gevent~=23.9.1
25
+ Requires-Dist: gevent~=24.2.1
26
26
  Requires-Dist: requests~=2.31.0
27
27
  Requires-Dist: pyzbar~=0.1.9
28
28
  Requires-Dist: parsys-requests-unixsocket~=0.3.1
29
- Requires-Dist: selenium~=4.15.1
30
- Requires-Dist: twine~=4.0.2
31
- Requires-Dist: urllib3~=2.0.7
29
+ Requires-Dist: selenium~=4.18.1
30
+ Requires-Dist: twine~=5.0.0
31
+ Requires-Dist: urllib3~=2.2.1
32
32
 
33
33
  # JAAQL-middleware-python
34
34
  Please navigate to docker/docker.md to see setup instructions
@@ -164,5 +164,5 @@ ROLE__postgres = "postgres"
164
164
 
165
165
  PROTOCOL__postgres = "postgresql://"
166
166
 
167
- VERSION = "4.21.36"
167
+ VERSION = "4.21.38"
168
168
 
@@ -207,11 +207,11 @@ DOCUMENTATION__prepare = SwaggerDocumentation(
207
207
  )
208
208
  )
209
209
 
210
- DOCUMENTATION__set_page_headers = SwaggerDocumentation(
211
- tags="Headers",
210
+ DOCUMENTATION__set_web_config = SwaggerDocumentation(
211
+ tags="Web Config",
212
212
  methods=SwaggerMethod(
213
- name="Sets page headers",
214
- description="Updates the nginx configuration to include some different headers",
213
+ name="Sets web config",
214
+ description="Updates the nginx configuration, including security headers",
215
215
  method=REST__POST
216
216
  )
217
217
  )
@@ -110,6 +110,6 @@ class JAAQLController(BaseJAAQLController):
110
110
  else:
111
111
  return self.model.finish_security_event(http_inputs)
112
112
 
113
- @self.publish_route('/internal/set-page-headers', DOCUMENTATION__set_page_headers)
114
- def set_page_headers(connection: DBInterface):
115
- self.model.set_page_headers(connection)
113
+ @self.publish_route('/internal/set-web-config', DOCUMENTATION__set_web_config)
114
+ def set_web_config(connection: DBInterface):
115
+ self.model.set_web_config(connection)
@@ -328,20 +328,24 @@ WHERE
328
328
  return requests.post("http://127.0.0.1:" + str(PORT__shared_var_service) + ENDPOINT__get_shared_var,
329
329
  json={ARG__variable: SHARED_VAR__frozen}).json()[ARG__value]
330
330
 
331
- def set_page_headers(self, connection: DBInterface):
331
+ def set_web_config(self, connection: DBInterface):
332
332
  self.is_super_admin(connection)
333
333
 
334
334
  if self.is_container:
335
335
  # Define the path to your file
336
336
  file_path = '/etc/nginx/sites-available/jaaql'
337
-
338
- config_path = "nginx.config"
337
+ override = os.environ.get("SET_WEB_CONFIG_OVERRIDE", "")
338
+ if len(override) != 0:
339
+ override += "."
340
+ config_path = f"nginx.${override}config"
339
341
  if not os.path.exists(config_path):
340
342
  config_path = "www/" + config_path
341
343
  if not os.path.exists(config_path):
342
344
  print("Could not find config file")
343
345
  return
344
346
 
347
+ new_data = open(config_path, "r").read()
348
+
345
349
  # Read the file content
346
350
  with open(file_path, 'r') as file:
347
351
  lines = file.readlines()
@@ -351,16 +355,16 @@ WHERE
351
355
  updated_lines = []
352
356
 
353
357
  for line in lines:
354
- if line.strip().startswith('add_header "Content-Security-Policy"'):
358
+ if line.strip().startswith('charset'):
355
359
  in_section = True
356
360
  updated_lines.append(line)
357
361
  continue # Skip to the next iteration
358
- elif line.strip().startswith('root /') and in_section:
362
+ elif line.startswith('}') and in_section:
359
363
  # Append new data before the end marker when in a section
360
364
  updated_lines.append(new_data)
361
365
  in_section = False
362
366
 
363
- if not in_section or line.strip().startswith('root /'):
367
+ if not in_section or line.startswith('}'):
364
368
  updated_lines.append(line)
365
369
 
366
370
  # Write the updated content back to the file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jaaql-middleware-python
3
- Version: 4.21.36
3
+ Version: 4.21.38
4
4
  Summary: The jaaql package, allowing for rapid development and deployment of RESTful HTTP applications
5
5
  Home-page: https://github.com/JAAQL/JAAQL-middleware-python
6
6
  Author: Software Quality Measurement and Improvement bv
@@ -8,12 +8,12 @@ Author-email: aaron.tasker@sqmi.nl
8
8
  License: Mozilla Public License Version 2.0 with Commons Clause
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE.txt
11
- Requires-Dist: jaaql-monitor~=1.2.109
11
+ Requires-Dist: jaaql-monitor~=1.2.119
12
12
  Requires-Dist: psycopg[binary]~=3.1.18
13
- Requires-Dist: Pillow~=10.1.0
14
- Requires-Dist: cryptography~=41.0.5
15
- Requires-Dist: flask~=3.0.0
16
- Requires-Dist: coverage~=7.3.2
13
+ Requires-Dist: Pillow~=10.2.0
14
+ Requires-Dist: cryptography~=42.0.5
15
+ Requires-Dist: flask~=3.0.2
16
+ Requires-Dist: coverage~=7.4.3
17
17
  Requires-Dist: psycopg-pool~=3.2.1
18
18
  Requires-Dist: pyjwt~=2.8.0
19
19
  Requires-Dist: pyyaml~=6.0.1
@@ -22,13 +22,13 @@ Requires-Dist: argon2-cffi~=23.1.0
22
22
  Requires-Dist: pyotp~=2.9.0
23
23
  Requires-Dist: qrcode~=7.4.2
24
24
  Requires-Dist: gunicorn~=21.2.0
25
- Requires-Dist: gevent~=23.9.1
25
+ Requires-Dist: gevent~=24.2.1
26
26
  Requires-Dist: requests~=2.31.0
27
27
  Requires-Dist: pyzbar~=0.1.9
28
28
  Requires-Dist: parsys-requests-unixsocket~=0.3.1
29
- Requires-Dist: selenium~=4.15.1
30
- Requires-Dist: twine~=4.0.2
31
- Requires-Dist: urllib3~=2.0.7
29
+ Requires-Dist: selenium~=4.18.1
30
+ Requires-Dist: twine~=5.0.0
31
+ Requires-Dist: urllib3~=2.2.1
32
32
 
33
33
  # JAAQL-middleware-python
34
34
  Please navigate to docker/docker.md to see setup instructions
@@ -1,9 +1,9 @@
1
- jaaql-monitor~=1.2.109
1
+ jaaql-monitor~=1.2.119
2
2
  psycopg[binary]~=3.1.18
3
- Pillow~=10.1.0
4
- cryptography~=41.0.5
5
- flask~=3.0.0
6
- coverage~=7.3.2
3
+ Pillow~=10.2.0
4
+ cryptography~=42.0.5
5
+ flask~=3.0.2
6
+ coverage~=7.4.3
7
7
  psycopg-pool~=3.2.1
8
8
  pyjwt~=2.8.0
9
9
  pyyaml~=6.0.1
@@ -12,10 +12,10 @@ argon2-cffi~=23.1.0
12
12
  pyotp~=2.9.0
13
13
  qrcode~=7.4.2
14
14
  gunicorn~=21.2.0
15
- gevent~=23.9.1
15
+ gevent~=24.2.1
16
16
  requests~=2.31.0
17
17
  pyzbar~=0.1.9
18
18
  parsys-requests-unixsocket~=0.3.1
19
- selenium~=4.15.1
20
- twine~=4.0.2
21
- urllib3~=2.0.7
19
+ selenium~=4.18.1
20
+ twine~=5.0.0
21
+ urllib3~=2.2.1