Port issue : Port number 80 is appended when try to login into subwiki

@vmassol
Need you assistance on an issue , when trying to login into subwiki i am getting an error because port 80 is appended in response . Please find below :

2021-01-18T01:00:58.001063Z info Subchannel Connectivity change to CONNECTING
2021-01-18T01:00:58.001282Z info transport: loopyWriter.run returning. connection error: desc = “transport is closing”
2021-01-18T01:00:58.001383Z info pickfirstBalancer: HandleSubConnStateChange: 0xc001238f00, {CONNECTING }
2021-01-18T01:00:58.001400Z info Channel Connectivity change to CONNECTING
2021-01-18T01:00:58.001387Z info Subchannel picks a new address “istiod-1-6-9.istio-system.svc:15012” to connect
2021-01-18T01:00:58.011925Z info Subchannel Connectivity change to READY
2021-01-18T01:00:58.011948Z info pickfirstBalancer: HandleSubConnStateChange: 0xc001238f00, {READY }
2021-01-18T01:00:58.011954Z info Channel Connectivity change to READY
{“response_flags”:“DC”,“start_time”:“2021-01-18T01:07:38.639Z”,“method”:“GET”,“request_id”:“76a8448d-00ef-425f-9e82-548351a19eae”,“upstream_host”:“127.0.0.1:8080”,“x_forwarded_for”:"-",“requested_server_name”:"-",“bytes_received”:“0”,“istio_policy_status”:"-",“bytes_sent”:“0”,“upstream_cluster”:“inbound|80|http|xwikiservice.xwiki-domain-qa.svc.cluster.local”,“downstream_remote_address”:“10.0.21.27:11402”,“authority”:"20.80.200.43:80",“path”:"/config/getuser?index=0",“protocol”:“HTTP/1.1”,“upstream_service_time”:"-",“upstream_local_address”:“127.0.0.1:46726”,“duration”:“14999”,“upstream_transport_failure_reason”:"-",“route_name”:“default”,“downstream_local_address”:“10.0.21.18:8080”,“user_agent”:“Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0”,“response_code”:“0”}
{“authority”:“20.80.200.43”,“path”:"/",“protocol”:“HTTP/1.1”,“upstream_service_time”:"-",“upstream_local_address”:“127.0.0.1:43958”,“duration”:“4990”,“upstream_transport_failure_reason”:"-",“route_name”:“default”,“downstream_local_address”:“10.0.21.18:8080”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36”,“response_code”:“0”,“response_flags”:“DC”,“start_time”:“2021-01-18T01:16:20.832Z”,“method”:“GET”,“request_id”:“70ca4196-0f41-414b-a41a-d85b4363e09a”,“upstream_host”:“127.0.0.1:8080”,“x_forwarded_for”:"-",“requested_server_name”:"-",“bytes_received”:“0”,“istio_policy_status”:"-",“bytes_sent”:“0”,“upstream_cluster”:“inbound|80|http|xwikiservice.xwiki-domain-qa.svc.cluster.local”,“downstream_remote_address”:“10.0.21.152:28333”}
2021-01-18T01:27:54.841174Z warning envoy config [bazel-out/k8-opt/bin/external/envoy/source/common/config/_virtual_includes/grpc_stream_lib/common/config/grpc_stream.h:92] StreamAggregatedResources gRPC config stream closed: 13,

When i manually try without 80 in callback url for login into sub wiki it is working. Can you please assist something here.

On our Setup, XWiki runs in a docker container behind an nginx front-proxy that handles https.
Login to the main XWiki using the oidc-plugin configured with keycloak works as expected. But when trying to log in to a Sub-Wiki, the generated Callback URL that is passed to the OIDC Provider contains an undesired Port 80 and an ssl-error is thrown.

Callback-URL accessing main wiki: https://wiki.xxx.com/oidc/authenticator/callback

Callback-URL accessing sub -wiki: https://wiki.xxx.com:80/oidc/authenticator/callback

Manually removing :80 from the redirect_url parameter resolves the problem.

did you find a solution for this? I am seeing same behavior with my setup.

Hello, I’m seeing the same issue in a newly created xwiki running under docker behind haproxy.

As Yash93 mentioned: manually removing the :80 from the redirect_url parameter resolves the problem.

How can I fix this?

Settings the following in xwiki.cfg solved this problem (in most cases) for me:

xwiki.home=https://xwiki.mydomain.de:443/
xwiki.url.protocol=https

You enter here the URL that the browser would see when SSL termination at the NGINX.