Closed alexkuretz closed 1 year ago
@alexkuretz Can you mount the server.xml from previous image into this image as
-v server.xml:/settings/server.xml
@carderm ping for the original PR, we also need to have a test added in https://github.com/kartoza/docker-geoserver/blob/develop/scenario_tests/login/tests/test_login.py so that this won't be broken in future
I was working on that while writing up this bug report, hoping to have a solution to suggest, but was having trouble getting the server.xml to persist. Your comment about using the /settings was a big help though. I copied the server.xml.bak file that is created by sed in start.sh and modified my dockerfile to place that into /settings/server.xml and the Login submit form is now correctly using HTTPS in 2.23.1.
What is the bug or the crash?
I suspect this is related to recent commits associated with https://github.com/kartoza/docker-geoserver/issues/293, specifically the commits in https://github.com/kartoza/docker-geoserver/commit/c7dd64dc2990e23d0258ee4115e6b004c40b4585.
I have a working Geoserver running in Kubernetes behind an Nginx reverse proxy using your 2.23.0 docker image. SSL is terminated at Nginx. I recently tried switching to the newest 2.23.1 image that's available, and the HTTP_SCHEME no longer seems to be working properly. Specifically the Login form submit correctly uses HTTPS in 2.23.0 but uses HTTP in 2.23.1. I make no other changes in my deployment other than changing the image version in my Dockerfile to observe this behavior.
Steps to reproduce the issue
Environment variables passed during deployment:
Dockerfile:
When deploying using 2.23.0 the Login form submit URL is correctly using HTTPS:
<form class="d-inline-block" method="post" action="https://geoserver.mydomain.com/geoserver/j_spring_security_check">
When changing the image version in the Dockerfile to 2.23.1 the Login form submit is incorrectly using HTTP:
<form class="d-inline-block" method="post" action="http://geoserver.mydomain.com/geoserver/j_spring_security_check">
Versions
2.23.1
Additional context
No response