Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from geoserver:main #47

Merged
merged 8 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 14 additions & 14 deletions doc/en/user/source/community/ogc-api/features/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Features Implementation status
Installing the GeoServer OGC API Features module
------------------------------------------------

#. Download the OGC API nightly GeoServer community module from :download_community:`ogcapi-features`.
#. Download the OGC API Features zip from the latest release (or nightly build) from :download_extension:`ogcapi-features`.

.. warning:: Verify that the version number in the filename corresponds to the version of GeoServer you are running (for example geoserver-|release|-ogcapi-features-plugin.zip above).

Expand All @@ -70,7 +70,7 @@ Docker use of OGC API Features module

docker run -it -p8080:8080 \\
--env INSTALL_EXTENSIONS=true \\
--env COMMUNITY_EXTENSIONS="ogcapi-features" \\
--env STABLE_EXTENSIONS="ogcapi-features" \\
docker.osgeo.org/geoserver:|version|.x

#. The services are listed at http://localhost:8080/geoserver
Expand Down Expand Up @@ -218,12 +218,12 @@ To override an OGC API Features template:

#. Create a file in this location, using the GeoServer |release| examples below:

* :download:`ogc/features/v1/landingPage.ftl </../../../../src/community/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/landingPage.ftl>`
* :download:`ogc/features/v1/collection.ftl </../../../../src/community/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/collection.ftl>`
* :download:`ogc/features/v1/collection_include.ftl </../../../../src/community/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/collection_include.ftl>`
* :download:`ogc/features/v1/collections.ftl </../../../../src/community/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/collections.ftl>`
* :download:`ogc/features/v1/queryables.ftl </../../../../src/community/ogcapi/ogcapi-core/src/main/resources/org/geoserver/ogcapi/queryables.ftl>`
* :download:`ogc/features/v1/functions.ftl </../../../../src/community/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/functions.ftl>`
* :download:`ogc/features/v1/landingPage.ftl </../../../../src/extension/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/landingPage.ftl>`
* :download:`ogc/features/v1/collection.ftl </../../../../src/extension/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/collection.ftl>`
* :download:`ogc/features/v1/collection_include.ftl </../../../../src/extension/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/collection_include.ftl>`
* :download:`ogc/features/v1/collections.ftl </../../../../src/extension/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/collections.ftl>`
* :download:`ogc/features/v1/queryables.ftl </../../../../src/extension/ogcapi/ogcapi-core/src/main/resources/org/geoserver/ogcapi/queryables.ftl>`
* :download:`ogc/features/v1/functions.ftl </../../../../src/extension/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/functions.ftl>`

The above built-in examples are for GeoServer |release|, please check for any changes when upgrading GeoServer.

Expand All @@ -238,19 +238,19 @@ To override a template used to list features:

#. Create a file in this location, using the GeoServer |release| examples below:

* :download:`ogc/features/getfeature-complex-content.ftl </../../../../src/community/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/getfeature-complex-content.ftl>`
* :download:`ogc/features/getfeature-content.ftl </../../../../src/community/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/getfeature-content.ftl>`
* :download:`ogc/features/getfeature-empty.ftl </../../../../src/community/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/getfeature-empty.ftl>`
* :download:`ogc/features/getfeature-footer.ftl </../../../../src/community/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/getfeature-footer.ftl>`
* :download:`ogc/features/getfeature-header.ftl </../../../../src/community/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/getfeature-header.ftl>`
* :download:`ogc/features/getfeature-complex-content.ftl </../../../../src/extension/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/getfeature-complex-content.ftl>`
* :download:`ogc/features/getfeature-content.ftl </../../../../src/extension/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/getfeature-content.ftl>`
* :download:`ogc/features/getfeature-empty.ftl </../../../../src/extension/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/getfeature-empty.ftl>`
* :download:`ogc/features/getfeature-footer.ftl </../../../../src/extension/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/getfeature-footer.ftl>`
* :download:`ogc/features/getfeature-header.ftl </../../../../src/extension/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/getfeature-header.ftl>`

The above built-in examples are for GeoServer |release|, please check for any changes when upgrading GeoServer.

As an example customize how collections are listed:

#. The file :file:`ogc/features/collections.ftl` lists published collection:

.. literalinclude:: /../../../../src/community/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/collections.ftl
.. literalinclude:: /../../../../src/extension/ogcapi/ogcapi-features/src/main/resources/org/geoserver/ogcapi/v1/features/collections.ftl

#. Save file to :file:`GEOSERVER_DATA_DIR/workspace/templates/ogc/collections.ftl`, and rewrite as:

Expand Down
6 changes: 5 additions & 1 deletion doc/en/user/source/configuration/globalsettings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ Once activated the environment parametrization Proxy Base URL can be parameters
Use headers for Proxy URL
'''''''''''''''''''''''''

Checking this box allows a by-request modification of the proxy URL using templates (templates based on HTTP proxy headers).
Checking this box allows a by-request modification of the proxy URL using templates (templates based on HTTP proxy headers). This setting may also be managed using the ``PROXY_BASE_URL_HEADERS`` boolean system property or environment variable defined by a System Administrator: setting it to true will enable the headers variables usage for proxy base URL on all workspaces, overriding any GeoServer datadir configuration.

.. code-block::bash

-DPROXY_BASE_URL_HEADERS=true

The supported proxy headers are:

Expand Down
6 changes: 6 additions & 0 deletions doc/en/user/source/configuration/properties/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ GeoServer Property Reference
- x
- x
- x
* - PROXY_BASE_URL_HEADER

Enables PROXY_BASE_URL to use headers variables if set to true, overriding GeoServer datadir settings. Default false.
- x
- x
- x
* - org.geoserver.service.disabled

Default comma separated list of disabled services.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions doc/en/user/source/extensions/authkey/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,31 @@ After configuring the filter it is necessary to put this filter on the authentic
saves the current configuration and triggers a synchronize. If users are added/removed from
the backing user/group service, the synchronize logic should be triggered.

Challenge Anonymous Session
---------------------------

"Challenge Anonymous Sessions" is designed to enforce stricter authorization and stateless behavior.

When enabled, the filter ignores any existing session or SecurityContext principal (e.g., anonymous or previously authenticated sessions created by other filters) and always authenticates the user linked to the provided authkey. This ensures that the authkey is validated independently for every request, regardless of the current session state.

This feature is particularly useful for deployments that require stateless authentication or need to ensure that requests are processed strictly based on the authkey query parameter. By default, this option is disabled.

**Internal User Cache**

To enhance performance in stateless mode, the AuthKey filter can use an internal user cache. The cache prevents unnecessary backend authentication requests for the same authkey by storing the user information locally for a configurable period.

The cache offers the following benefits:

1. Reduces backend service load for frequently used authkeys.

2. Allows administrators to configure the cache's expiration policy to balance performance and data freshness.

Both the "Challenge Anonymous Sessions" option and the internal user cache settings can be configured through the filter's settings panel in GeoServer. For step-by-step instructions and examples, refer to the screenshots below.

.. figure:: images/001_stateless.png
:align: center


Enabling Mappers' Auto-Synchronization
--------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-ogcapi-features</artifactId>
<version>${project.version}</version>
<exclusions>
Expand All @@ -45,7 +45,7 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-ogcapi-core</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
Expand All @@ -66,7 +66,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-ogcapi-features</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
Expand Down
12 changes: 11 additions & 1 deletion src/community/geopkg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,17 @@
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-geopkg-output</artifactId>
<artifactId>gs-geopkg-output-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-geopkg-output-wms</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-geopkg-output-wfs</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/community/gsr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-ogcapi-core</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
12 changes: 11 additions & 1 deletion src/community/mbtiles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-geopkg-output</artifactId>
<artifactId>gs-geopkg-output-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-geopkg-output-wms</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-geopkg-output-wfs</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/community/ogcapi/dggs/ogcapi-dggs-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</dependency>

<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-web-ogcapi</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions src/community/ogcapi/dggs/ogcapi-dggs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-ogcapi-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-ogcapi-features</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down Expand Up @@ -58,7 +58,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-ogcapi-core</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
Expand Down
4 changes: 2 additions & 2 deletions src/community/ogcapi/dggs/web-dggs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-ogcapi-core</artifactId>
<version>${gs.version}</version>
<classifier>tests</classifier>
Expand All @@ -42,7 +42,7 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-web-ogcapi</artifactId>
<version>${gs.version}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/community/ogcapi/ogcapi-changeset/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-ogcapi-core</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
Expand Down
2 changes: 1 addition & 1 deletion src/community/ogcapi/ogcapi-coverages-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-web-ogcapi</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions src/community/ogcapi/ogcapi-coverages/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<dependencies>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-ogcapi-core</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down Expand Up @@ -65,7 +65,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geoserver.community</groupId>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-ogcapi-core</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import static org.junit.Assert.assertTrue;

import com.jayway.jsonpath.DocumentContext;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
Expand All @@ -29,8 +30,10 @@
import org.geoserver.ogcapi.APIDispatcher;
import org.geoserver.platform.GeoServerExtensions;
import org.geoserver.wcs.WCSInfo;
import org.geotools.geometry.jts.ReferencedEnvelope;
import org.hamcrest.Matchers;
import org.jsoup.Jsoup;
import org.junit.Before;
import org.junit.Test;
import org.springframework.http.MediaType;
import org.springframework.mock.web.MockHttpServletRequest;
Expand Down Expand Up @@ -63,6 +66,20 @@ public void testSkipMisconfigured() throws Exception {
assertEquals(expected - 1, (int) json2.read("collections.length()", Integer.class));
}

@Before
public void revertChanges() throws IOException {
CoverageInfo c = getCatalog().getCoverageByName("rs", "BlueMarble");
ReferencedEnvelope blueMarbleExtent =
new ReferencedEnvelope(
146.49999999999477,
147.99999999999474,
-44.49999999999785,
-42.99999999999787,
c.getCRS());
c.setLatLonBoundingBox(blueMarbleExtent);
getCatalog().save(c);
}

@SuppressWarnings("unchecked") // generics varargs creation by hamcrest
private void testCollectionsJson(DocumentContext json) throws Exception {
int expected = getCatalog().getCoverages().size();
Expand Down
50 changes: 0 additions & 50 deletions src/community/ogcapi/ogcapi-features-assembly/pom.xml

This file was deleted.

Loading
Loading