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 #28

Merged
merged 14 commits into from
May 30, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Each GeoServer release is supported with bug fixes for a year, with releases mad

This approach provides ample time for upgrading ensuring you are always working with a supported GeoServer release.

If your organisation is making use of a GeoServer version that is no longer in use by the community all is not lost.
If your organization is making use of a GeoServer version that is no longer in use by the community all is not lost.
You can volunteer on the developer list to make additional releases, or engage with one of our
[Commercial Support](http://geoserver.org/support/) providers.

Expand Down Expand Up @@ -53,6 +53,6 @@ Disclosure policy:
4. A fix is included for the "stable" and "maintenance" downloads ([released as scheduled](https://github.com/geoserver/geoserver/wiki/Release-Schedule), or issued via emergency update)
6. The CVE vulnerability is published with mitigation and patch instructions

This represents a balance between transparency and particpation that does not overwhelm particpants.
This represents a balance between transparency and participation that does not overwhelm participants.
Those seeking greater visibility are encouraged to volunteer with the geoserver-security list;
or work with one of the [commercial support providers](https://geoserver.org/support/) who participate on behalf of their customers.
281 changes: 281 additions & 0 deletions doc/en/api/1.0.0/urlchecks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
---
swagger: '2.0'
info:
version: 1.0.0
title: GeoServer UrlCheck
description: An URL External Access Check is the check performed on user provided URLs that GeoServer will use to access remote resources.
contact:
name: GeoServer
email: '[email protected]'
url: 'http://geoserver.org/comm/'
host: localhost:8080
basePath: /geoserver/rest

paths:
/urlchecks:
get:
operationId: getUrlChecks
tags:
- "UrlChecks"
summary: Get a list of URL checks
description: Displays a list of all URL checks on the server. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/urlchecks.xml" for XML)
produces:
- text/html
- application/json
- application/xml
responses:
200:
description: OK
schema:
$ref: "#/definitions/urlChecks"
examples:
text/html: |
<html>
<head>
<title>GeoServer Configuration</title>
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
</head>
<body>
<ul>
<li><a href="http://localhost:8080/geoserver/rest/urlchecks/external.html">external</a></li>
<li><a href="http://localhost:8080/geoserver/rest/urlchecks/icons.html">icons</a></li>
<li><a href="http://localhost:8080/geoserver/rest/urlchecks/safeWFS.html">safeWFS</a></li>
</ul>
</body>
</html>
application/xml: |
<urlChecks>
<urlCheck>
<name>external</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/urlchecks/external.xml" type="application/atom+xml"/>
</urlCheck>
<urlCheck>
<name>icons</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/urlchecks/icons.xml" type="application/atom+xml"/>
</urlCheck>
<urlCheck>
<name>safeWFS</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/urlchecks/safeWFS.xml" type="application/atom+xml"/>
</urlCheck>
</urlChecks>
application/json: |
{"urlchecks":{"urlcheck":[
{"name":"external","href":"http:\/\/localhost:8080\/geoserver\/rest\/urlchecks\/external.json"},
{"name":"icons","href":"http:\/\/localhost:8080\/geoserver\/rest\/urlchecks\/icons.json"},
{"name":"safeWFS","href":"http:\/\/localhost:8080\/geoserver\/rest\/urlchecks\/safeWFS.json"}]}}
401:
description: Unauthorized

post:
operationId: postUrlChecks
tags:
- "UrlChecks"
summary: add a new URL check to GeoServer
description: Adds a new URL check to the server
parameters:
- name: urlcheckBody
description: The url check body to upload.
in: body
required: true
schema:
$ref: "#/definitions/urlCheck"
consumes:
- application/json
- application/xml
produces:
- text/html
- application/json
- application/xml
responses:
201:
description: Created
schema:
type: string
headers:
Location:
description: URL where the newly created URL check can be found
type: string
400:
description: Unable to add provided URL check as it misses required fields
409:
description: Unable to add URL check as it already exists

put:
operationId: putUrlChecks
description: Not permitted.
tags:
- "UrlChecks"
responses:
405:
description: Not permitted

delete:
operationId: deleteUrlChecks
description: Not permitted.
tags:
- "UrlChecks"
responses:
405:
description: Not permitted

/urlchecks/{urlcheckname}:
get:
operationId: getUrlCheck
tags:
- "UrlChecks"
summary: Retrieve a URL check
description: Retrieves a single URL check definition. Use the "Accept:" header to specify format or
append an extension to the endpoint (example "/urlchecks/{urlcheck}.xml" for XML).
produces:
- application/xml
- application/json
- text/html
parameters:
- name: urlcheckname
description: the name of the URL check to fetch.
in: path
required: true
type: string
responses:
200:
description: OK
schema:
$ref: "#/definitions/urlCheck"
examples:
application/xml: |
<urlChecks>
<urlCheck>
<name>icons</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/urlchecks/icons.xml" type="application/atom+xml"/>
</urlCheck>
</urlChecks>

application/json: |
{
"urlCheck": {
"name": "icons",
"description": "External graphic icons",
"enabled": true,
"regex": "^https://styles.server.net/icons/.*$"
}
}
404:
description: URL check does not exist

post:
tags:
- "UrlChecks"
operationId: postUrlCheck
description: Not permitted.
parameters:
- name: urlcheckname
description: the name of the URL check to fetch.
in: path
required: true
type: string
responses:
405:
description: Not permitted

put:
summary: Update a URL check
tags:
- "UrlChecks"
description: Changes the URL check with the provided data.
operationId: putUrlCheck
consumes:
- application/json
- application/xml
responses:
200:
description: Modified
400:
description: Cannot perform the change to the URL check as required fields are missing
404:
description: Url check not found
parameters:
- name: urlcheckname
in: path
description: name of URL check.
required: true
type: string
- name: urlcheckBody
description: The url check body to perform the change against.
in: body
required: true
schema:
$ref: "#/definitions/urlCheck"

delete:
operationId: deleteUrlCheck
tags:
- "UrlChecks"
parameters:
- name: urlcheckname
in: path
description: name of URL check to delete.
required: true
type: string
responses:
200:
description: Successfully deleted URL check
404:
description: Url check doesn't exist

definitions:
urlCheck:
type: object
description: >

The body for a URL check request.

For a PUT, only values which should be changed need to be included.


JSON or XML style requests should follow the schemas below:

- application/xml:

```
<regexUrlCheck>
<name>string</name>
<description>string</description>
<enabled>false</enabled>
<regex>string</regex>
</regexUrlCheck>
```

- application/json:

```
{
"regexUrlCheck": {
"name": "string",
"description": "string",
"enabled": false,
"regex": "string"
}
}
```

required:
- name
- regex
properties:
name:
type: string
description: name of the URL check
description:
type: string
description: description for the URL check
enabled:
type: boolean
description: enabled status of the URL check
default: false
regex:
type: string
description: regex to perform the check with
urlChecks:
type: array
items:
$ref: "#/definitions/urlCheck"
12 changes: 12 additions & 0 deletions doc/en/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,18 @@
<language/>
</configuration>
</execution>
<execution>
<id>urlchecks</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/api/1.0.0/urlchecks.yaml</inputSpec>
<output>${project.build.directory}/api/urlchecks</output>
<language/>
</configuration>
</execution>
</executions>
</plugin>

Expand Down
4 changes: 2 additions & 2 deletions doc/en/user/source/extensions/rat/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and may include information like land cover types, elevation values, or any othe
may also contain color information that can be used to render the raster in a more visually appealing way.

The RAT is stored in a separate file from the raster data itself, and is typically stored in a ".aux.xml" file,
as part of a a PAMDataset. Each of the bands in the PAM can contain a separate RAT, allowing
as part of a PAMDataset. Each of the bands in the PAM can contain a separate RAT, allowing
for different attributes to be associated with each band.

One example of RAT usage is the NOAA Bluetopo dataset, which contains 3 floating points bands:
Expand All @@ -29,4 +29,4 @@ In this section:
:maxdepth: 1

installing
using
using
2 changes: 1 addition & 1 deletion doc/en/user/source/extensions/rat/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ To install the Raster Attribute Table support:

.. warning:: Make sure to match the version of the extension to the version of GeoServer.

#. Extract this these files and place the JARs in ``WEB-INF/lib``.
#. Extract these files and place the JARs in ``WEB-INF/lib``.

#. Perform any configuration required by your servlet container, and then restart.
6 changes: 3 additions & 3 deletions doc/en/user/source/extensions/rat/using.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ allows to generate styles based on the table contents:
* The :guilabel:`Classification` dropdown allows to select a column to use for classification.
* The :guilabel:`Style name` controls the name of the style to be generated. It's automatically filled
with a naming convention of ``<layer>_b<band>_<classification>``, but can be customized.
* The :guilabel:`Create style` button generates the style based on the chosen classification, eventually using colors if available in the table, otherwise generating random colors. The geneated style will also be included among the "alternate styles" of the layer.
* The :guilabel:`Create style` button generates the style based on the chosen classification, eventually using colors if available in the table, otherwise generating random colors. The generated style will also be included among the "alternate styles" of the layer.

The generated style will match all the values in the raster attribute table, and ensure the chosen classification column is used for both styling, legend generation, and ``GetFeatureInfo`` output.

Expand Down Expand Up @@ -60,6 +60,6 @@ REST API
--------

A REST API is available, to fetch the full PAM dataset attached to a raster, and to create
styles out of RAT classfication fields:
styles out of RAT classification fields:

* :api:`/rat <rat.yaml>`
* :api:`/rat <rat.yaml>`
1 change: 1 addition & 0 deletions doc/en/user/source/rest/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ This section describes the GeoServer REST configuration API.
accesscontrol
userrole
resources
urlchecks
Loading
Loading