We are testing OIDC Web-authentication with Geoserver 3.0.2 and 3.2.0-SNAPSHOT. In both cases, we run into an issue with the Proxy Base URL. With the latter configured as follows: ${X-Forwarded-Proto}://${X-Forwarded-Host}/geoserver , we get the following error when configuring an OIDC filter.
When we first remove the Proxy Base URL settings, then configure the OIDC filter and afterwards set the Proxy Base URL to the above value, OIDC-based Web authentication no longer works. It seems that the X-Forwarded-*-parameters are not resolved. The user is redirected to the following URL with the X-Forwarded-*-parameters appearing as literal values in the URL:
https://my.internal.domain/geoserver/ ${X-Forwarded-Proto}://${X-Forwarded-Host}/geoserver/web/oauth2/authorization/oidc__oidc
The problem occurs both when setting the Proxy Base URL via the UI (server > global settings) and when setting them using environment variables:
JAVA_OPTS="$JAVA_OPTS -DPROXY_BASE_URL_HEADERS=true"
JAVA_OPTS="$JAVA_OPTS '-DPROXY_BASE_URL=\${X-Forwarded-Proto}://\${X-Forwarded-Host}/geoserver'"
The problem only occurs with Web-authentication. Bearer token authentication works fine (because the client must not be redirected to the authentication provider).
Am I doing something wrong? Or is this a known issue?
