<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">What are you using as your proxy?<div class=""><br class=""></div><div class="">Spring Security needs to know it’s behind a proxy when generating login redirects.</div><div class=""><br class=""></div><div class="">If Nginx, set:</div><div class=""><br class=""></div><div class=""><font face="Monaco" class="">proxy_pass <a href="http://your-upstream-here" class="">http://your-upstream-here</a>;<br class="">proxy_http_version 1.1;</font></div><div class=""><font face="Monaco" class="">proxy_set_header Host $host;<br class="">proxy_set_header X-Real-IP $remote_addr;<br class="">proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br class="">proxy_set_header X-Forwarded-Proto https; # &lt;- only set this if you’re using SSL</font></div><div class=""><br class=""></div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Scott Rossillo</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Smartling | Senior Software Engineer</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:srossillo@smartling.com" class="">srossillo@smartling.com</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
</div>
</div></div><br class=""><div><blockquote type="cite" class=""><div class="">On May 23, 2016, at 11:20 AM, Aritz Maeztu &lt;<a href="mailto:amaeztu@tesicnor.com" class="">amaeztu@tesicnor.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">
  

    <meta http-equiv="content-type" content="text/html; charset=windows-1252" class="">
  
  <div bgcolor="#FFFFFF" text="#000000" class=""><p class="">I'm using keycloak to securize some Spring based services (with
      the keycloak spring security adapter). The adapter creates a
      `/login` endpoint in each of the services which redirects to the
      keycloak login page and then redirects back to the service when
      authentication is done. I also have a proxy service which I want
      to publish in the 80 port and will take care of routing all the
      requests to each service. The proxy performs a plain FORWARD to
      the service, but the problem comes when I securize the service
      with the keycloak adapter. <br class="">
    </p><p class="">When I make a request, the adapter redirects to its login
      endpoint and then to the keycloak auth url. When keycloak sends
      the redirection, the url shown in the browser is the one from the
      service and not the one from the proxy. Do I have some choice to
      tell the adapter I want to redirect back to the first requested
      url?<br class="">
    </p>
    <br class="">
    <div class="moz-signature">-- <br class="">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252" class="">
      <div class="moz-signature">
        <table style="cellspadding: 0; width: 600; align: left;
          border-collapse: collapse;" class="">
          <tbody class="">
            <tr class="">
              <td style="border-bottom-width: 1px; border-bottom-style:
                solid; border-bottom-color: #989898;" class=""> <span style="font-weight:bold" class="">Aritz Maeztu Otaño</span><br class="">
                <span style="font-size: 12px;" class="">Departamento Desarrollo
                  de Software</span> </td>
              <td style="border-bottom-width: 1px; border-bottom-style:
                solid; border-bottom-color: #989898; padding-left:
                20px;" class=""> <a target="_blank" href="https://www.linkedin.com/profile/preview?vpa=pub&amp;locale=es_ES" class="">
                  <span id="cid:part1.CE73581C.4BE2BAA7@tesicnor.com">&lt;linkdin.gif&gt;</span>
                  <!--<img src="linkdin.gif" border="0" />--> </a> </td>
            </tr>
            <tr class="">
              <td class=""> <a target="_blank" href="http://www.tesicnor.com/" class=""> <span id="cid:part3.E5FA84AA.058AE979@tesicnor.com">&lt;logo.png&gt;</span>
                  <!--<img shrinktofit="true" src="logo.png" width="143" border="0" />-->
                </a> </td>
              <td style="font-size: 12px;" class=""><p style="padding-left: 20px;" class=""> <span class="">Pol. Ind.
                    Mocholi.</span> <span class="">C/Rio Elorz, Nave 13E </span><span style="font-weight:bold" class="">31110 Noain (Navarra)</span><br class="">
                  <span class="">Telf.: 948 21 40 40</span> <br class="">
                  <span class="">Fax.: 948 21 40 41</span> <br class="">
                </p>
              </td>
            </tr>
            <tr class="">
              <td colspan="2" class=""> <span style="color: #009900;font-size:
                  12px;" class="">Antes de imprimir este e-mail piense bien si es
                  necesario hacerlo: El medioambiente es cosa de todos.</span>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>

_______________________________________________<br class="">keycloak-user mailing list<br class=""><a href="mailto:keycloak-user@lists.jboss.org" class="">keycloak-user@lists.jboss.org</a><br class="">https://lists.jboss.org/mailman/listinfo/keycloak-user</div></blockquote></div><br class=""></div></body></html>