Hi,
I finally managed to fix the issue. I am reporting my solution here in case
it's needed by someone else.
The problem arises from the way the response in built in Tomcat: it uses
the original request in order to determine the response, thus spring
security is redirecting the browser on http because Tomcat is actually
listening on HTTP (derived this from the sources on Github).
In order to circumnvent this problem without touching geoserver code we
added a custom request header on our apache location reserved to geoserver
:
RequestHeader set GeoValve "On
Then I wrote a small valve and added it to the tomcat instance that's
serving geoserver in order to rewrite the request with the parameters that
were needed :
public class MyGeoValve extends ValveBase {
@Override
public void invoke(Request req, Response resp) throws
IOException, ServletException {
if ("On".equals(req.getHeader("GeoValve"))) {
req.setSecure(true);
req.getCoyoteRequest().scheme().setString("https");
req.getCoyoteRequest().setServerPort(443);
}
if ( getNext() != null ) {
getNext().invoke(req, resp);
}
}
}
<Valve className="com.fermasoft.valve.GeoValve" />
Now everything works as expected.
Thanks everyone for your help
--
--
Marco Ferretti
[image: facebook] <http://facebook.com/marco.ferretti>[image:
twitter]<http://twitter.com/marcoferretti>[image:
Linkedin] <http://it.linkedin.com/in/marcoferretti>[image:
Website]<http://www.fermasoft.com>
[image: public
key]<http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x3863B939F579CD16>
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users