Solution to j_spring_security_check redirect to http

Hi, there’s a longstading issue that has been affecting several users here Jira or here Jira, the issue is that when you are using geoserver behind a proxy such as nginx and you login to the platform, it checks your credentials to https://geoserver.example.com/geoserver/j_spring_security_check, and gets a redirect to http://geoserver.example.com/geoserver/web (without https)

The problem is multifactor, but in my case I could finally solve it with these three changes:

Adding to the general server.xml a rule to read the protocol headers

   **<Valve** className="org.apache.catalina.valves.RemoteIpValve" 
             remoteIpHeader="x-forwarded-for" 
             protocolHeader="x-forwarded-proto" 
             protocolHeaderHttpsValue="https"**/>**

Add to tomcat startup the flag from geoserver to respect the URL headers

JAVA_OPTS="-Djava.awt.headless=true -DPROXY_BASE_URL_HEADERS=true

In the global.xml file that I have customized with -DGEOSERVER_DATA_DIR=/var/opt/geoserver/data I use an expression with templates

${X-Forwarded-Proto}://${X-Forwarded-Host}/geoserver****

I would like to report into https://osgeo-org.atlassian.net the issue so at least the documentation could be improved, but with my account I can’t do it

Hi @aseques

a) Thank you for documenting your fix. Could you be so kind as to edit the documentation itself (requires a GitHub account and following Quickfix - Documentation) and add it there for everyone? This issue might also be relevant: 2.27.1 New data source page not working

b) It seems your account fell foul of Cannot create a Jira account to log a GeoServer/GeoTools issue - #11 by jive - could you report your Jira account issue there, so that we can try to fix it?

Peter

HI @Peter I stumbed again with the jira issue, my email there is sacco2 at hotmail.com, and I can’t create any issue (but I can view them)

The issue I wanted to report is that with the current WPS plugin there’s a dependency on arcgis that’s missing

GeoServer 3.0.2 on Tomcat 11. After installing geoserver-3.0.2-wps-plugin.zip (and wps-download), GeoServer fails at startup:

BeanCreationException: Error creating bean with name ‘arcGridPPIO’: Lookup method resolution failed
Caused by: java.lang.NoClassDefFoundError: org/geotools/gce/arcgrid/ArcGridReader

Since ArcGrid was moved out of core into its own extension in 3.x, the WPS plugin (ArcGridPPIO) now has an undeclared dependency on it. Installing geoserver-3.0.2-arcgrid-plugin.zip fixes it.