Keyfactor / signserver-ce

SignServer – Open source, PKI-based signing software to sign code, documents, timestamps and more.
https://www.signserver.org
GNU Lesser General Public License v2.1
327 stars 36 forks source link

[BUG] Administration Web links uses the wrong port #103

Open Vampire opened 1 week ago

Vampire commented 1 week ago

I started SignServer CE from the docker image using

docker run -it --rm -p 8080:8080 -p 8443:8443 -h localhost --name signserver keyfactor/signserver-ce

Then I tried to access https://localhost:8443/signserver/.

The page loads properly, but the link to "Administration Web" is not correct, it uses port 443: image

netmackan commented 1 week ago

I believe it currently is a known issue that the admin web link assumes the default ports are being used.

The port for the link can be changed in /opt/signserver/conf/signserver_deploy.properties changing to:

httpserver.external.privhttps=8443

Then when starting the container you can mount in your modified version of signserver_deploy.properties:

docker run -it --rm \
  -p 8080:8080 -p 8443:8443 -h localhost \
  -v /home/user/my-signserver_deploy.properties:/opt/signserver/conf/signserver_deploy.properties \
  --name signserver \
 keyfactor/signserver-ce:6.3.0

Then the link should use what you have set in the config file (i.e. 8443).

Not sure if a container could be made aware of what port mappings are used and if we then could set the right port automagically. Otherwise, maybe we could introduce some ENV variable where the correct port could be specified so that mounting in the conf file would not be necessary.

Vampire commented 1 week ago

Or maybe just use a relative path like for the other links and if you want to ensure this path is only access via https, ensure this otherwise?