Azure Blobstore shows values instead of parameter names if ALLOW_ENV_PARAMETRIZATION is active

Description

With the system property ALLOW_ENV_PARAMETRIZATION set to "true" I can use parameters in the GeoServer settings.

If I use the parametrization in the Azure Blobstore configuration I can set it as follows:

When I save I get a wicket exception (attached "azure_wicket_stack_trace.txt" ), nothing unusual in the geoserver.log, but the configuration is saved.
The cache works and I see the configuration is correctly written in the geowebcache.xml file
```
<?xml version="1.0" encoding="utf-8"?>
<gwcConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://geowebcache.org/schema/1.15.0 http://geowebcache.org/schema/1.15.0/geowebcache.xsd" xmlns="http://geowebcache.org/schema/1.15.0">
<version>1.15.0</version>
<backendTimeout>120</backendTimeout>
<blobStores>
<AzureBlobStore default="true">
<id>maccheo</id>
<enabled>true</enabled>
<container>gwc-cache</container>
<accountName>geowebcache</accountName>
<accountKey>${DEV_BLOBSTORE_KEY}</accountKey>
<maxConnections>100</maxConnections>
<useHTTPS>true</useHTTPS>
</AzureBlobStore>
</blobStores>
<gridSets/>
<layers/>
</gwcConfiguration>
```

If I open the configuration again, I see the "${DEV_BLOBSTORE_KEY}" in the Key textfield.
All good.

However, after a restart, the UI displays the actual key value, and not the parameter name.

So If I save again, the actual key get persisted on the geowebcache.xml file.
Even if I don't save that blobstore, but I just create a different one, the Azure key value ends up in the geowebcache.xml file.

Environment

None

Attachments

3
ui.PNG
7 years ago
azure_wicket_stack_trace.txt
7 years ago
saved1.PNG
7 years ago

Activity

Andrea Aime
June 7, 2022 at 9:52 AM
(edited)

Has been fixed back in 2019 in GWC by https://github.com/GeoWebCache/geowebcache/pull/779

Andrea Aime
July 16, 2019 at 9:36 AM

This is due to the current design of the environment parameter handling, which happens too soon.

See https://github.com/GeoWebCache/geowebcache/issues/777 for details.

Fixed

Details

Assignee

Reporter

Affects versions

Components

Priority

Created July 16, 2019 at 9:11 AM
Updated June 7, 2022 at 9:53 AM
Resolved June 7, 2022 at 9:52 AM