c2cgeoportal-geoportal 2.9rc83__py3-none-any.whl → 2.9.0.352__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.
Files changed (93) hide show
  1. c2cgeoportal_geoportal/__init__.py +28 -8
  2. c2cgeoportal_geoportal/lib/__init__.py +1 -1
  3. c2cgeoportal_geoportal/lib/authentication.py +4 -1
  4. c2cgeoportal_geoportal/lib/bashcolor.py +1 -1
  5. c2cgeoportal_geoportal/lib/cacheversion.py +1 -1
  6. c2cgeoportal_geoportal/lib/caching.py +1 -1
  7. c2cgeoportal_geoportal/lib/check_collector.py +1 -1
  8. c2cgeoportal_geoportal/lib/checker.py +1 -1
  9. c2cgeoportal_geoportal/lib/dbreflection.py +1 -1
  10. c2cgeoportal_geoportal/lib/filter_capabilities.py +1 -1
  11. c2cgeoportal_geoportal/lib/fulltextsearch.py +1 -1
  12. c2cgeoportal_geoportal/lib/functionality.py +1 -1
  13. c2cgeoportal_geoportal/lib/headers.py +1 -1
  14. c2cgeoportal_geoportal/lib/i18n.py +1 -1
  15. c2cgeoportal_geoportal/lib/layers.py +1 -1
  16. c2cgeoportal_geoportal/lib/loader.py +1 -1
  17. c2cgeoportal_geoportal/lib/metrics.py +1 -1
  18. c2cgeoportal_geoportal/lib/oauth2.py +1 -1
  19. c2cgeoportal_geoportal/lib/oidc.py +109 -71
  20. c2cgeoportal_geoportal/lib/wmstparsing.py +1 -1
  21. c2cgeoportal_geoportal/lib/xsd.py +1 -1
  22. c2cgeoportal_geoportal/resources.py +1 -1
  23. c2cgeoportal_geoportal/scaffolds/advance_create/ci/config.yaml +1 -12
  24. c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/Dockerfile +3 -3
  25. c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/Makefile +1 -1
  26. c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/alembic.ini +2 -2
  27. c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/gunicorn.conf.py +1 -1
  28. c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/language_mapping +1 -0
  29. c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/webpack.apps.js +11 -1
  30. c2cgeoportal_geoportal/scaffolds/advance_update/cookiecutter.json +2 -0
  31. c2cgeoportal_geoportal/scaffolds/create/cookiecutter.json +2 -0
  32. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/.github/workflows/main.yaml +1 -1
  33. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/.github/workflows/rebuild.yaml +1 -7
  34. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/Dockerfile +1 -1
  35. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/Makefile +4 -4
  36. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/build +2 -0
  37. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/ci/config.yaml +1 -8
  38. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/ci/requirements.txt +2 -2
  39. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/docker-compose-lib.yaml +8 -4
  40. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/env.default +3 -0
  41. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/env.project +1 -5
  42. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/geoportal/vars.yaml +2 -2
  43. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/project.yaml +2 -0
  44. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/scripts/db-backup +1 -1
  45. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/scripts/db-restore +1 -1
  46. c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/tilegeneration/config.yaml.tmpl +6 -4
  47. c2cgeoportal_geoportal/scaffolds/update/cookiecutter.json +2 -0
  48. c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/CONST_CHANGELOG.txt +14 -6
  49. c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/geoportal/CONST_config-schema.yaml +2 -0
  50. c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/geoportal/CONST_vars.yaml +16 -8
  51. c2cgeoportal_geoportal/scripts/__init__.py +1 -1
  52. c2cgeoportal_geoportal/scripts/c2cupgrade.py +2 -2
  53. c2cgeoportal_geoportal/scripts/create_demo_theme.py +1 -1
  54. c2cgeoportal_geoportal/scripts/manage_users.py +1 -1
  55. c2cgeoportal_geoportal/scripts/pcreate.py +11 -5
  56. c2cgeoportal_geoportal/scripts/theme2fts.py +141 -36
  57. c2cgeoportal_geoportal/scripts/urllogin.py +1 -1
  58. c2cgeoportal_geoportal/views/__init__.py +1 -1
  59. c2cgeoportal_geoportal/views/dev.py +1 -1
  60. c2cgeoportal_geoportal/views/entry.py +4 -2
  61. c2cgeoportal_geoportal/views/fulltextsearch.py +10 -4
  62. c2cgeoportal_geoportal/views/geometry_processing.py +1 -1
  63. c2cgeoportal_geoportal/views/i18n.py +1 -1
  64. c2cgeoportal_geoportal/views/layers.py +1 -1
  65. c2cgeoportal_geoportal/views/login.py +18 -8
  66. c2cgeoportal_geoportal/views/mapserverproxy.py +1 -1
  67. c2cgeoportal_geoportal/views/memory.py +1 -1
  68. c2cgeoportal_geoportal/views/ogcproxy.py +1 -1
  69. c2cgeoportal_geoportal/views/pdfreport.py +1 -1
  70. c2cgeoportal_geoportal/views/printproxy.py +1 -1
  71. c2cgeoportal_geoportal/views/profile.py +1 -1
  72. c2cgeoportal_geoportal/views/raster.py +1 -1
  73. c2cgeoportal_geoportal/views/resourceproxy.py +1 -1
  74. c2cgeoportal_geoportal/views/shortener.py +23 -7
  75. c2cgeoportal_geoportal/views/theme.py +18 -4
  76. c2cgeoportal_geoportal/views/tinyowsproxy.py +12 -6
  77. c2cgeoportal_geoportal/views/vector_tiles.py +1 -1
  78. {c2cgeoportal_geoportal-2.9rc83.dist-info → c2cgeoportal_geoportal-2.9.0.352.dist-info}/METADATA +7 -1
  79. {c2cgeoportal_geoportal-2.9rc83.dist-info → c2cgeoportal_geoportal-2.9.0.352.dist-info}/RECORD +93 -93
  80. tests/__init__.py +1 -1
  81. tests/test_cachebuster.py +1 -1
  82. tests/test_checker.py +1 -1
  83. tests/test_decimaljson.py +1 -1
  84. tests/test_headerstween.py +1 -1
  85. tests/test_init.py +1 -1
  86. tests/test_locale_negociator.py +1 -1
  87. tests/test_mapserverproxy_route_predicate.py +1 -1
  88. tests/test_raster.py +1 -1
  89. tests/test_wmstparsing.py +1 -1
  90. tests/xmlstr.py +1 -1
  91. {c2cgeoportal_geoportal-2.9rc83.dist-info → c2cgeoportal_geoportal-2.9.0.352.dist-info}/WHEEL +0 -0
  92. {c2cgeoportal_geoportal-2.9rc83.dist-info → c2cgeoportal_geoportal-2.9.0.352.dist-info}/entry_points.txt +0 -0
  93. {c2cgeoportal_geoportal-2.9rc83.dist-info → c2cgeoportal_geoportal-2.9.0.352.dist-info}/top_level.txt +0 -0
@@ -54,7 +54,7 @@ RUN \
54
54
  && mkdir --parent /usr/local/tomcat/webapps/ROOT/ \
55
55
  && mvif /tmp/config/print /tmp/config/print/print-apps /usr/local/tomcat/webapps/ROOT/ \
56
56
  && mv /tmp/config/geoportal/{{cookiecutter.package}}_geoportal/ /etc/geomapfish/ \
57
- && mv /tmp/config/geoportal/* /etc/geomapfish/ || true \
57
+ && (mv /tmp/config/geoportal/* /etc/geomapfish/ || true) \
58
58
  && chmod g+w -R \
59
59
  /etc/geomapfish \
60
60
  /etc/mapserver \
@@ -1,4 +1,4 @@
1
- PROJECT_PUBLIC_URL?=https://example.camptocamp.com/
1
+ PROJECT_PUBLIC_URL?=https://localhost:8484/
2
2
  DUMP_FILE=dump.backup
3
3
  PACKAGE={{cookiecutter.package}}
4
4
  LANGUAGES=en fr de it
@@ -27,14 +27,14 @@ checks: prospector eslint ## Runs the checks
27
27
 
28
28
  .PHONY: prospector
29
29
  prospector: ## Runs the Prospector checks
30
- docker compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \
30
+ docker compose run --entrypoint= --rm --volume=$(CURDIR)/geoportal:/app geoportal \
31
31
  prospector --output-format=pylint --die-on-tool-error
32
32
 
33
33
  .PHONY: eslint
34
34
  eslint: ## Runs the eslint checks
35
- docker compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \
35
+ docker compose run --entrypoint= --rm --volume=$(CURDIR)/geoportal:/app geoportal \
36
36
  eslint $(find {{cookiecutter.package}} -type f -name '*.js' -print 2> /dev/null)
37
- docker compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \
37
+ docker compose run --entrypoint= --rm --volume=$(CURDIR)/geoportal:/app geoportal \
38
38
  eslint $(find {{cookiecutter.package}} -type f -name '*.ts' -print 2> /dev/null)
39
39
 
40
40
  .PHONY: qgis
@@ -149,6 +149,8 @@ def main() -> None:
149
149
  env = {"DOCKER_BUILDKIT": "1", "COMPOSE_DOCKER_CLI_BUILD": "1"}
150
150
  env.update(os.environ)
151
151
  run(args, docker_compose_build_cmd, env=env) # nosec
152
+ except KeyboardInterrupt:
153
+ sys.exit(1)
152
154
  except subprocess.CalledProcessError as e:
153
155
  print("Error with command: " + " ".join(print_args))
154
156
  sys.exit(e.returncode)
@@ -1,11 +1,4 @@
1
- # yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/c2cciutils/master/c2cciutils/schema.json
2
-
3
- checks:
4
- codespell: False
5
- required_workflows: False
6
- dependabot_config: False
7
- prospector_config: False
8
- setup: False
1
+ # yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/c2cciutils/1.7/c2cciutils/schema.json
9
2
 
10
3
  version:
11
4
  branch_to_version_re:
@@ -1,2 +1,2 @@
1
- c2cciutils[checks,publish]==1.7.3
2
- pre-commit==4.0.1
1
+ c2cciutils[checks,publish]==1.7.5
2
+ pre-commit==4.3.0
@@ -167,13 +167,13 @@ services:
167
167
  - '30'
168
168
 
169
169
  redis_master:
170
- image: bitnami/redis:7.4.2
170
+ image: bitnami/redis:7.4
171
171
  environment:
172
172
  - REDIS_REPLICATION_MODE=master
173
173
  - ALLOW_EMPTY_PASSWORD=yes
174
174
 
175
175
  redis_slave:
176
- image: bitnami/redis:7.4.2
176
+ image: bitnami/redis:7.4
177
177
  environment:
178
178
  - REDIS_REPLICATION_MODE=slave
179
179
  - REDIS_MASTER_HOST=redis_master
@@ -182,7 +182,7 @@ services:
182
182
  - redis_master
183
183
 
184
184
  redis_sentinel:
185
- image: bitnami/redis-sentinel:7.4.2
185
+ image: bitnami/redis-sentinel:7.4
186
186
  environment:
187
187
  - REDIS_MASTER_HOST=redis_master
188
188
  - REDIS_MASTER_SET=mymaster
@@ -199,6 +199,8 @@ services:
199
199
  - DEVELOPMENT
200
200
  - VISIBLE_ENTRY_POINT
201
201
  - TILEGENERATION_CONFIGFILE=/etc/tilegeneration/config.yaml
202
+ - TILECLOUD_CHAIN_SESSION_SECRET
203
+ - TILECLOUD_CHAIN_SESSION_SALT
202
204
  - AWS_ACCESS_KEY_ID
203
205
  - AWS_SECRET_ACCESS_KEY
204
206
  - AZURE_STORAGE_CONNECTION_STRING
@@ -462,7 +464,7 @@ services:
462
464
  build: *geoportal-build
463
465
 
464
466
  front:
465
- image: haproxy:2.6.7
467
+ image: haproxy:2.6
466
468
  restart: unless-stopped
467
469
  volumes:
468
470
  - ${FRONT_LOG_DIRECTORY}:/dev/log:rw
@@ -506,6 +508,8 @@ services:
506
508
  - AZURE_STORAGE_ACCESS_TOKEN
507
509
  - AZURE_STORAGE_ACCESS_KEY
508
510
  - AZURE_STORAGE_SAS_TOKEN
511
+ ports:
512
+ - 8080:8080
509
513
 
510
514
  db:
511
515
  image: camptocamp/postgres:${POSTGRES_TAG}
@@ -43,6 +43,9 @@ GEOPORTAL_INTERNAL_PORT=8080
43
43
  TILECLOUDCHAIN_INTERNAL_URL=http://tilecloudchain:8080
44
44
  TILECLOUDCHAIN_INTERNAL_HOST=tilecloudchain
45
45
  TILECLOUDCHAIN_INTERNAL_PORT=8080
46
+ TILECLOUD_CHAIN_SESSION_SECRET={{cookiecutter.tilecloud_chain_session_secret}}
47
+ TILECLOUD_CHAIN_SESSION_SALT={{cookiecutter.tilecloud_chain_session_salt}}
48
+
46
49
  # For internal print
47
50
  MAPSERVER_URL=http://mapserver:8080/
48
51
  TINYOWS_URL=http://tinyows:8080/
@@ -40,10 +40,6 @@ TILEGENERATION_SQS_QUEUE=<queue_name>
40
40
  TILEGENERATION_S3_BUCKET=<bucket_name>
41
41
  TILEGENERATION_AZURE_CONTAINER=<container_name>
42
42
 
43
- # Should be filed with a strong secret, with e.g. `pwgen --secure 16`
44
- # TILECLOUD_CHAIN_SESSION_SECRET=
45
- # TILECLOUD_CHAIN_SESSION_SALT=
46
-
47
43
  # For production
48
44
  # FRONT_INNER_PORT=80
49
45
  # FRONT_CONFIG=haproxy
@@ -69,7 +65,7 @@ C2C_AUTH_GITHUB_CLIENT_ID=210aefe26259de1e9532
69
65
  #C2C_AUTH_GITHUB_CLIENT_SECRET=<github OAuth application client secret>
70
66
  C2C_AUTH_GITHUB_SCOPE=repo
71
67
  #C2C_AUTH_GITHUB_SECRET=<secret>
72
- #C2C_AUTH_GITHUB_PROXY_URL=https://geoservicies.camptocamp.com/redirect
68
+ #C2C_AUTH_GITHUB_PROXY_URL=https://geoservices.camptocamp.com/redirect
73
69
  C2C_USE_SESSION=true
74
70
 
75
71
  # For multi-tenant
@@ -197,6 +197,8 @@ vars:
197
197
  en: english
198
198
  de: german
199
199
  it: italian
200
+ # Fallback on italian for Romansh
201
+ rm: italian
200
202
 
201
203
  shortener:
202
204
  # Used to send a confirmation email
@@ -290,8 +292,6 @@ vars:
290
292
  # longitudeFirst: True
291
293
  # layers: []
292
294
  # legend: {}
293
- phantomjs:
294
- disable: [apihelp]
295
295
 
296
296
  check_collector:
297
297
  hosts: []
@@ -10,6 +10,8 @@ template_vars:
10
10
  srid: {{cookiecutter.srid}}
11
11
  extent: {{cookiecutter.extent}}
12
12
  authtkt_secret: {{cookiecutter.authtkt_secret}}
13
+ tilecloud_chain_session_secret: {{cookiecutter.tilecloud_chain_session_secret}}
14
+ tilecloud_chain_session_salt: {{cookiecutter.tilecloud_chain_session_salt}}
13
15
  env:
14
16
  files:
15
17
  - env.default
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
 
3
- # Copyright (c) 2021-2024, Camptocamp SA
3
+ # Copyright (c) 2021-2025, Camptocamp SA
4
4
  # All rights reserved.
5
5
 
6
6
  # Redistribution and use in source and binary forms, with or without
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
 
3
- # Copyright (c) 2021-2024, Camptocamp SA
3
+ # Copyright (c) 2021-2025, Camptocamp SA
4
4
  # All rights reserved.
5
5
 
6
6
  # Redistribution and use in source and binary forms, with or without
@@ -39,15 +39,17 @@ defaults:
39
39
  layer: &layer
40
40
  type: wms
41
41
  grid: swissgrid_05
42
- # The minimum resolution to seed, useful to use with mapcache, optional.
42
+ # the minimum resolution to seed, useful to use with mapcache, optional.
43
43
  # min_resolution_seed: 1
44
44
  # the URL of the WMS server to used
45
- url: ${MAPSERVER_URL}
46
- # Set the headers to get the right virtual host, and don't get any cached result
45
+ url: ${MAPSERVER_URL}/mapserv_proxy
46
+ # don't get any cached result
47
47
  headers:
48
- ${DISABLE_LOCAL} Host: '${VISIBLE_WEB_HOST}'
49
48
  Cache-Control: no-cache, no-store
50
49
  Pragma: no-cache
50
+ # get the right Mapfile
51
+ params:
52
+ MAP: MapServer
51
53
  # file name extension
52
54
  extension: png
53
55
  # legend file name extension
@@ -5,6 +5,8 @@
5
5
  "extent": "",
6
6
  "extent_mapserver": "",
7
7
  "authtkt_secret": "",
8
+ "tilecloud_chain_session_secret": "",
9
+ "tilecloud_chain_session_salt": "",
8
10
  "unsafe_long_version": false,
9
11
  "geomapfish_version": "",
10
12
  "geomapfish_main_version": "",
@@ -26,12 +26,12 @@ Information to know before starting the upgrade
26
26
  See the related pull request: https://github.com/camptocamp/ngeo/pull/9470.
27
27
 
28
28
  3. For the OGC API, the MapServer configuration changes, now multi map files are supported by default and the URL in
29
- the admin interface should be updated, see the OGC APT - Features documentation for more information.
29
+ the admin interface should be updated, see the OGC API - Features documentation for more information.
30
30
 
31
31
  Information
32
32
  ===========
33
33
 
34
- 1. Hostname check:
34
+ 1. Hostname / Referer check:
35
35
  We add a hostname check on the `came_from` parameter, in the oauth2 login, allowed by
36
36
  `vars.authentication.allowed_hosts` and in the OGC server clear cache, allowed by `vars.admin_interface.allowed_hosts`.
37
37
  The behavior change a little bit in the `vars.shortener.allowed_hosts` and in the `vars.authorized_referers`.
@@ -65,10 +65,7 @@ Changes to apply
65
65
  be sure that you import the `gmf/controller/<interface>.scss` at the top of the file, before you
66
66
  can't use the variables.
67
67
 
68
- 2. The environment variable TILECLOUD_CHAIN_SESSION_SECRET and TILECLOUD_CHAIN_SESSION_SALT from the file
69
- `env.project` should be uncomment and filled with a strong secret, e.g. with `pwgen --secure 16`.
70
-
71
- 3. Nginject migration:
68
+ 2. Nginject migration:
72
69
  the @ngInject annotation is no more used, you should pass an array in the function or use the $inject property.
73
70
  e.g. before:
74
71
  ```javascript
@@ -95,6 +92,17 @@ Changes to apply
95
92
  Controller.$inject = ['$scope', '$injector'];
96
93
  ```
97
94
 
95
+ 3. The OGC Server 'source for image/png' is renamed to 'MapServer' and
96
+ 'source for image/jpeg' is renamed to 'MapServer_JPEG'.
97
+ This is done to be able to add them in the URL path, for OGC API compatibility.
98
+ If you use one of them in the `vars.yaml` you have to update them. Concerned variables are:
99
+ `main_ogc_server`, `api.ogc_server`, `tinyowsproxy.ogc_server`,
100
+ `interfaces_config.<interface>.routes.ngeoPermalinkOgcserverUrl.params.ogcserver`.
101
+
102
+ 5. Now MapServer will work in multi project mode by default, normally the Alembic migration script
103
+ update the MapServer OGC Server URL to `config://mapserver/mapserv_proxy/MapServer?map=MapServer`
104
+ to make it working for WMS/WFS and for OGC API.
105
+
98
106
 
99
107
  =============
100
108
  Version 2.8.0
@@ -351,6 +351,8 @@ mapping:
351
351
  themes: *header
352
352
  fulltextsearch: *header
353
353
  mapserver: *header
354
+ mapserver_ogcapi_mapserver: *header
355
+ mapserver_ogcapi_qgisserver: *header
354
356
  tinyows: *header
355
357
  layers: *header
356
358
  print: *header
@@ -310,8 +310,8 @@ vars:
310
310
  autoRotate: False
311
311
  gmfWMSSourceOptions:
312
312
  # The default value is 1.5 but it add a slight blur on the layer,
313
- # 1 is also possible but the application will do a getMap on all the pan.
314
- ratio: 2
313
+ # 2 is also possible but it uses many network and can break on some mobile devices.
314
+ ratio: 1
315
315
 
316
316
  dynamic_constants:
317
317
  interface: interface
@@ -765,7 +765,7 @@ vars:
765
765
  - name: directedFilterAttributes
766
766
  type: list
767
767
  description: >
768
- Comma-separated list of attributes names which should have rules already ready when using the
768
+ Comma-separated list of attribute names which should have rules already ready when using the
769
769
  filter tools.
770
770
  relevant_for:
771
771
  - layer_wms
@@ -805,6 +805,7 @@ vars:
805
805
  relevant_for:
806
806
  - layer_wmts
807
807
  - layer_cog
808
+ - layer_wms
808
809
  - name: printLayers
809
810
  description: >
810
811
  Comma-separated list of WMS layers used instead of the WMTS layer for printing.
@@ -842,6 +843,7 @@ vars:
842
843
  Background layer to load when this theme is selected.
843
844
  relevant_for:
844
845
  - theme
846
+ - role
845
847
  - name: default_theme
846
848
  single: true
847
849
  description: >
@@ -941,6 +943,9 @@ vars:
941
943
  fr: french
942
944
  en: english
943
945
  de: german
946
+ it: italian
947
+ # Fallback on italian for Romansh
948
+ rm: italian
944
949
 
945
950
  servers:
946
951
  internal: http://localhost/
@@ -974,8 +979,6 @@ vars:
974
979
 
975
980
  # The shortener base configuration
976
981
  shortener:
977
- # The base of created URL
978
- base_url: '{VISIBLE_WEB_PROTOCOL}://{VISIBLE_WEB_HOST}{VISIBLE_ENTRY_POINT}s/'
979
982
  length: 4
980
983
 
981
984
  # Define whether the MapServer proxy should hide the OGC capabilities.
@@ -1191,6 +1194,8 @@ vars:
1191
1194
  print: *auth_header
1192
1195
  fulltextsearch: *auth_header
1193
1196
  mapserver: *auth_header
1197
+ mapserver_ogcapi_mapserver: *auth_header
1198
+ mapserver_ogcapi_qgisserver: *auth_header
1194
1199
  tinyows: *auth_header
1195
1200
  layers:
1196
1201
  <<: *auth_header
@@ -1233,9 +1238,6 @@ vars:
1233
1238
  no_redirect: 'true'
1234
1239
  environment: *phantomjs-env
1235
1240
  level: 6
1236
- - name: apihelp
1237
- environment: *phantomjs-env
1238
- level: 6
1239
1241
  routes:
1240
1242
  disable: []
1241
1243
  routes:
@@ -1437,6 +1439,12 @@ runtime_postprocess:
1437
1439
  - headers.mapserver.access_control_max_age
1438
1440
  - headers.mapserver.cache_control_max_age
1439
1441
  - headers.mapserver.cache_control_max_age_nocache
1442
+ - headers.mapserver_ogcapi_mapserver.access_control_max_age
1443
+ - headers.mapserver_ogcapi_mapserver.cache_control_max_age
1444
+ - headers.mapserver_ogcapi_mapserver.cache_control_max_age_nocache
1445
+ - headers.mapserver_ogcapi_qgisserver.access_control_max_age
1446
+ - headers.mapserver_ogcapi_qgisserver.cache_control_max_age
1447
+ - headers.mapserver_ogcapi_qgisserver.cache_control_max_age_nocache
1440
1448
  - headers.tinyows.access_control_max_age
1441
1449
  - headers.tinyows.cache_control_max_age
1442
1450
  - headers.tinyows.cache_control_max_age_nocache
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2011-2024, Camptocamp SA
1
+ # Copyright (c) 2011-2025, Camptocamp SA
2
2
  # All rights reserved.
3
3
 
4
4
  # Redistribution and use in source and binary forms, with or without
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2014-2024, Camptocamp SA
1
+ # Copyright (c) 2014-2025, Camptocamp SA
2
2
  # All rights reserved.
3
3
 
4
4
  # Redistribution and use in source and binary forms, with or without
@@ -867,7 +867,7 @@ class C2cUpgradeTool:
867
867
  print("")
868
868
  branch = check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).decode("utf-8").strip()
869
869
  print("Now all your files are committed; you should do a git push:")
870
- print(f"git push {self.options.git_remote} {branch}.")
870
+ print(f"git push {self.options.git_remote} {branch}")
871
871
 
872
872
 
873
873
  def check_git_status_output(args: list[str] | None = None) -> str:
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2011-2024, Camptocamp SA
1
+ # Copyright (c) 2011-2025, Camptocamp SA
2
2
  # All rights reserved.
3
3
 
4
4
  # Redistribution and use in source and binary forms, with or without
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2011-2024, Camptocamp SA
1
+ # Copyright (c) 2011-2025, Camptocamp SA
2
2
  # All rights reserved.
3
3
 
4
4
  # Redistribution and use in source and binary forms, with or without
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021-2024, Camptocamp SA
1
+ # Copyright (c) 2021-2025, Camptocamp SA
2
2
  # All rights reserved.
3
3
 
4
4
  # Redistribution and use in source and binary forms, with or without
@@ -178,7 +178,9 @@ class PCreateCommand:
178
178
  context: dict[str, str | int] = {
179
179
  "project": project_name,
180
180
  "package": pkg_name,
181
- "authtkt_secret": gen_authtkt_secret(),
181
+ "authtkt_secret": gen_secret(),
182
+ "tilecloud_chain_session_secret": "secret" if os.environ.get("CI") == "true" else gen_secret(),
183
+ "tilecloud_chain_session_salt": "secret" if os.environ.get("CI") == "true" else gen_secret(16),
182
184
  }
183
185
  context.update(self.read_project_file())
184
186
  if os.environ.get("CI") == "true":
@@ -287,9 +289,13 @@ class PCreateCommand:
287
289
  return None
288
290
 
289
291
 
290
- def gen_authtkt_secret() -> str:
291
- """Generate a random authtkt secret."""
292
- return subprocess.run(["pwgen", "64"], stdout=subprocess.PIPE, check=True).stdout.decode().strip()
292
+ def gen_secret(length: int = 64) -> str:
293
+ """Generate a random secret."""
294
+ return (
295
+ subprocess.run(["pwgen", "--secure", str(length)], stdout=subprocess.PIPE, check=True)
296
+ .stdout.decode()
297
+ .strip()
298
+ )
293
299
 
294
300
 
295
301
  if __name__ == "__main__": # pragma: no cover