<div dir="ltr">It appears that this works fine. Proxying 443 => 8443 over https has issues.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><font color="#000000"><b>Kevin Thorpe<br></b></font></div>
<div>CTO<br></div>
<div><br>
</div>
<div><a href="https://www.p-i.net/" target="_blank"><img src="cid:part1.09070200.07040105@p-i.net"></a> <a href="https://twitter.com/@PI_150" target="_blank"><img src="cid:part3.05090201.04050806@p-i.net"></a><br>
</div>
<div><br>
</div>
<div><a href="http://www.p-i.net/" target="_blank">www.p-i.net</a> | <a href="https://twitter.com/@PI_150" target="_blank">@PI_150</a><br>
</div>
<div><span style="color:rgb(81,81,81)"><br>
</span></div>
<div><span style="color:rgb(81,81,81)">M: <a value="+447921676683">+44 (0)7425 160 368</a> | T: <a value="+442030056750">+44 (0)203 005 6750</a> |
F: <a value="+442077302635">+44(0)207 730 2635</a></span><br>
</div>
<div><font color="#515151">150
Buckingham Palace Road, </font><span style="color:rgb(81,81,81)">London, SW1W 9TR, UK</span></div>
<div><br><b><span style="color:rgb(11,83,148)"> <img src="https://clients.p-i.net/documents/11003/1116416/BSI-UKAS.logo.jpg/81028530-5f84-4598-825b-f6465a83bae1?t=1416563040000"> <img src="https://clients.p-i.net/documents/11003/1116416/ISO27001-2013.logo.jpeg/145aebe0-c393-49d7-8e1d-44c3c4d451dc?t=1416563040000"> <img src="https://clients.p-i.net/documents/11003/1116416/QMS.logo.jpeg/3925220d-bdad-40c3-b284-102c365c7b85?t=1416563040000" height="36" width="64"><img src="https://clients.p-i.net/documents/11003/1116416/pci.png/773a04d4-f6ce-4b7a-8a22-818f518f0459?t=1421160152000" height="44" width="116"></span></b></div>
<div><font size="1">_____________________________ </font></div>
<p><font size="1">This email and any files transmitted with it
are confidential and intended solely for the use of the
individual or entity to whom they are addressed. If you
have received this email in error please notify the system
manager. This message contains confidential information
and is intended only for the individual named. If you are
not the named addressee you should not disseminate,
distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by
mistake and delete this e-mail from your system. If you
are not the intended recipient you are notified that
disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly
prohibited.</font></p><p><b>"<span style="color:rgb(11,83,148)"><font>SAVE PAPER - THINK BEFORE YOU PRINT!</font></span>" </b></p></div></div></div></div></div>
<br><div class="gmail_quote">On 18 September 2015 at 14:44, Felipe Braun Azambuja <span dir="ltr"><<a href="mailto:felipe.braun@intelbras.com.br" target="_blank">felipe.braun@intelbras.com.br</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't agree. I proxy 443 -> 8080 :)<br>
<br>
Mine looks like this:<br>
<br>
server {<br>
listen 443 ssl spdy;<br>
<br>
(lots of ssl options)<br>
<br>
location / {<br>
proxy_set_header Host $host;<br>
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
proxy_set_header X-Forwarded-Proto https;<br>
proxy_set_header X-Forwarded-Port 443;<br>
proxy_pass http://keycloack:8080$request_uri;<br>
}<br>
}<br>
<br>
(I think that $request_uri on the end should not be there)<br>
<br>
And, of course, setting up wildfly so it knows it's behind a reverse<br>
proxy. Proxy address forwarding, if I'm not mistaken.<span class=""><br>
<br>
<br>
Il 18/09/2015 10:33, Kevin Thorpe ha scritto:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Yeah it's definitely the port. I can use exactly the same config<br>
proxying port 8443 -> 8443 and<br>
it works.<br>
<br></span>
*Kevin Thorpe<br>
*<br>
CTO<br>
<br>
<<a href="https://www.p-i.net/" rel="noreferrer" target="_blank">https://www.p-i.net/</a>> <<a href="https://twitter.com/@PI_150" rel="noreferrer" target="_blank">https://twitter.com/@PI_150</a>><br>
<br>
<a href="http://www.p-i.net" rel="noreferrer" target="_blank">www.p-i.net</a> <<a href="http://www.p-i.net/" rel="noreferrer" target="_blank">http://www.p-i.net/</a>> | @PI_150 <<a href="https://twitter.com/@PI_150" rel="noreferrer" target="_blank">https://twitter.com/@PI_150</a>><span class=""><br>
<br>
M: <a href="tel:%2B44%20%280%297425%20160%20368" value="+447425160368" target="_blank">+44 (0)7425 160 368</a> | T: <a href="tel:%2B44%20%280%29203%20005%206750" value="+442030056750" target="_blank">+44 (0)203 005 6750</a> | F: <a href="tel:%2B44%280%29207%20730%202635" value="+442077302635" target="_blank">+44(0)207 730 2635</a><br>
150 Buckingham Palace Road, London, SW1W 9TR, UK<br>
<br></span>
**<span class=""><br>
_____________________________<br>
<br>
This email and any files transmitted with it are confidential and<br>
intended solely for the use of the individual or entity to whom they are<br>
addressed. If you have received this email in error please notify the<br>
system manager. This message contains confidential information and is<br>
intended only for the individual named. If you are not the named<br>
addressee you should not disseminate, distribute or copy this e-mail.<br>
Please notify the sender immediately by e-mail if you have received this<br>
e-mail by mistake and delete this e-mail from your system. If you are<br>
not the intended recipient you are notified that disclosing, copying,<br>
distributing or taking any action in reliance on the contents of this<br>
information is strictly prohibited.<br>
<br></span>
*"SAVE PAPER - THINK BEFORE YOU PRINT!" *<span class=""><br>
<br>
<br>
On 18 September 2015 at 14:25, Kevin Thorpe <<a href="mailto:kevin.thorpe@p-i.net" target="_blank">kevin.thorpe@p-i.net</a><br></span><span class="">
<mailto:<a href="mailto:kevin.thorpe@p-i.net" target="_blank">kevin.thorpe@p-i.net</a>>> wrote:<br>
<br>
Still struggling with wrapping Keycloak under nginx. Keycloak runs<br>
on our internal infrastructure<br>
on port 8443 because it's a right pain to get it on port 443.<br>
<br>
Now some of our clients have restrictive firewalls that only allow<br>
80 and 443 so I'm trying to<br>
proxy it on port 443 in Nginx so we have a single pont of contact.<br>
It doesn't work.<br>
<br>
Chrome is giving ERR_RESPONSE_HEADERS_TRUNCATED and I'm not sure<br>
why. Redirect is happening properly as shown from an AWS client:<br>
<br>
52.21.xxx.xxx - - [18/Sep/2015:14:23:49 +0100] <a href="http://xxxx.pibenchmark.com" rel="noreferrer" target="_blank">xxxx.pibenchmark.com</a><br></span>
<<a href="http://xxxx.pibenchmark.com" rel="noreferrer" target="_blank">http://xxxx.pibenchmark.com</a>> "GET / HTTP/1.1" 009 7 "-"<span class=""><br>
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like<br>
Gecko) Chrome/45.0.2454.93 Safari/537.36" "<a href="http://10.20.13.184:8443" rel="noreferrer" target="_blank">10.20.13.184:8443</a><br></span>
<<a href="http://10.20.13.184:8443" rel="noreferrer" target="_blank">http://10.20.13.184:8443</a>>"<span class=""><br>
<br>
Can Keycloak not handle the difference in ports? I'm really<br>
struggling to understand here.<br>
<br>
nginx config:<br>
<br>
# login-uat server<br>
<br>
server {<br></span>
listen <a href="http://10.20.13.11:443" rel="noreferrer" target="_blank">10.20.13.11:443</a> <<a href="http://10.20.13.11:443" rel="noreferrer" target="_blank">http://10.20.13.11:443</a>>;<br>
<br>
server_name <a href="http://xxxx.pibenchmark.com" rel="noreferrer" target="_blank">xxxx.pibenchmark.com</a> <<a href="http://xxxx.pibenchmark.com" rel="noreferrer" target="_blank">http://xxxx.pibenchmark.com</a>>;<span class=""><br>
<br>
ssl on;<br>
# ssl key bits<br>
client_max_body_size 10G;<br>
<br>
location / {<br>
proxy_pass <a href="http://login-uat-cluster" rel="noreferrer" target="_blank">http://login-uat-cluster</a>;<br>
}<br>
}<br>
<br>
# only one of these will be working but nginx should be able to work<br>
out which<br>
upstream login-uat-cluster {<br>
server <a href="http://keycloak.pibenchmark.com:8443" rel="noreferrer" target="_blank">keycloak.pibenchmark.com:8443</a><br></span>
<<a href="http://keycloak.pibenchmark.com:8443" rel="noreferrer" target="_blank">http://keycloak.pibenchmark.com:8443</a>>;<br>
}<br>
<br>
<br>
<br>
*Kevin Thorpe<br>
*<br>
CTO<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
<br>
</blockquote>
<br>
--<br>
Felipe Braun Azambuja<br>
DBA<br>
Tecnologia da Informação e Comunicação<br>
(48) 3281 9577<br>
<a href="mailto:felipe.braun@intelbras.com.br" target="_blank">felipe.braun@intelbras.com.br</a><br>
Esta mensagem, incluindo seus anexos, contém informações protegidas por lei, sujeitas a privilégios e/ou confidencialidades, não podendo ser retransmitida, arquivada, divulgada ou copiada sem autorização do remetente. O remetente utiliza o correio eletrônico no exercício do seu trabalho ou em razão dele, eximindo esta instituição de qualquer responsabilidade por utilização indevida. Caso tenha recebido esta mensagem por engano, por favor informe o remetente respondendo imediatamente a este e-mail, e em seguida apague-a do seu computador.<br>
<br>
The information contained in this e-mail and its attachments are protected by law, subjected to privilege and/or confidentiality and cannot be retransmitted, filed, disclosed or copied without authorization from the sender. The sender uses the electronic mail in the exercise of his/her work or by virtue thereof, and the institution accepts no liability from its undue use. If you have received this message by mistake, please notify us immediately by returning the e-mail and deleting this message from your system.<br>
</blockquote></div><br></div>