Skip to content

Allow parameter filters to be private and not exposed in capabilities OL preview and the like#1545

Merged
aaime merged 2 commits into
GeoWebCache:mainfrom
aaime:sec_parameter_filter
Jun 19, 2026
Merged

Allow parameter filters to be private and not exposed in capabilities OL preview and the like#1545
aaime merged 2 commits into
GeoWebCache:mainfrom
aaime:sec_parameter_filter

Conversation

@aaime

@aaime aaime commented Jun 18, 2026

Copy link
Copy Markdown
Member

In preparation for https://github.com/geoserver/geoserver/wiki/GSIP-241, which is adding on the fly a couple of of such parameters (the security rules summary and the security tags)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for marking ParameterFilters as not user-visible so synthetic/internal filters (e.g., security-related cache partitioning parameters) do not get exposed through capabilities documents or UI surfaces, while still participating in cache key computation.

Changes:

  • Introduces ParameterFilter#isUserVisible() (default true) to allow filters to opt out of user-facing exposure.
  • Filters out non-user-visible parameter filters from WMTS GetCapabilities output and from WMS dimension capability elements.
  • Hides non-user-visible filters in the demo preview and REST seed form UI; updates WMTS capabilities tests accordingly.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
geowebcache/wmts/src/test/java/org/geowebcache/service/wmts/WMTSServiceTest.java Updates mocks to mark parameter filters as user-visible to keep WMTS capabilities tests aligned with the new filtering behavior.
geowebcache/wmts/src/main/java/org/geowebcache/service/wmts/WMTSGetCapabilities.java Filters layer.getParameterFilters() to only those marked user-visible before encoding styles/dimensions/resource URLs.
geowebcache/wms/src/main/java/org/geowebcache/service/wms/WMSGetCapabilities.java Skips non-user-visible filters when encoding WMS dimension/extent capability elements.
geowebcache/rest/src/main/java/org/geowebcache/rest/service/FormService.java Omits non-user-visible parameter filters from the REST seeding form “Modifiable Parameters” section.
geowebcache/core/src/main/java/org/geowebcache/filter/parameters/ParameterFilter.java Adds isUserVisible() API with documentation describing intended use for synthetic cache-partitioning filters.
geowebcache/core/src/main/java/org/geowebcache/demo/Demo.java Omits non-user-visible parameter filters from the demo/preview modifiable-parameters UI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dromagnoli dromagnoli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants