Env parametrization does not save correctly in AuthKey extension

Description

can be used in other places, correctly e.g. Global Settings:

saved in global.xml thus:

However, the Authkey extension https://docs.geoserver.org/latest/en/user/extensions/authkey/index.html does not work perfectly. The admin is able to enter the parameterised URL correctly:

saved in data/security/filter/AuthKey Filter/config.xml correctly:

However, when the GUI loads it again, the substituted parameter is visible (this is the bug):

and when saved, the config.xml file is exactly this substituted string, not the parameterised version:

Environment

None

Attachments

3

Activity

Show:

Peter Smythe January 19, 2024 at 11:30 AM

Peter Smythe January 6, 2024 at 7:48 PM

The problem is that when the filter config is cloned in order to be displayed for editing, the mapperParameters are resolved (i.e. ${...} placeholders are converted into their real values). This real value is then saved to the XML file, instead of the unresolved placeholders.

The solution identified exactly where the filter configs are created for editing purposes, and only this instance of loadFilterConfig is modified to not resolve placeholders, leaving all other instances to resolve, as before.

This means that the edit box displays the unresolved placeholders, as expected, which is consistent with other edit boxes that typically contain ENV parameter placeholders, e.g. Data store JDBC connection strings, Global proxy base URL, etc.

Fixed

Assignee

Reporter

Fix versions

Affects versions

Components

Priority

Created July 4, 2023 at 12:00 PM
Updated January 19, 2024 at 11:30 AM
Resolved January 19, 2024 at 11:30 AM