<p dir="ltr">Step 4 and 5 not happening</p>
<div class="gmail_quote">On Feb 18, 2015 9:19 PM, "Bill Burke" <<a href="mailto:bburke@redhat.com">bburke@redhat.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is what is happening:<br>
<br>
* Keycloak server is deployed at <a href="https://192.168.1.10:8443/auth" target="_blank">https://192.168.1.10:8443/auth</a><br>
* Keycloak proxy is deployed at localhost:8080<br>
* Customer portal is deployed at localhost:8082<br>
<br>
1. Browser visits proxy<br>
2. proxy sees browser is logged in, redirects to keycloak<br>
3. Keycloak logs browser in, redirects back to proxy<br>
4. proxy makes an out-of-band request to customer portal<br>
5. proxy copies response from customer portal and returns it to browser<br>
<br>
Which step is not happening?<br>
<br>
On 2/18/2015 2:32 AM, Chen Keong Yap wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Yes. I think keycloak proxy is quite similar to apache web proxy. Now<br>
the only difference is apache web proxy can reverse proxy for app hosted<br>
on different ip and port whereas keycloak proxy server seem like forcing<br>
the app to run on same ip and port. I have tried to change the base-path<br>
and target-url to use different ip and port but it does not work. Kindly<br>
share the opinions.<br>
<br>
On Feb 18, 2015 11:27 AM, "Bill Burke" <<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a><br>
<mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>>> wrote:<br>
<br>
All browser HTTP requests go through the proxy. Your browser is never<br>
redirected to the actual application. The actual application should be<br>
behind a firewall or some other mechanism. Its the same concept as<br>
using Apache HTTPD in front of an application.<br>
<br>
On 2/17/2015 4:34 PM, Chen Keong Yap wrote:<br>
> Hi,<br>
><br>
> Is there any updates? The app is protected by proxy but after<br>
login is<br>
> successful and is not redirect back to app and stay at proxy url<br>
><br>
> On Feb 17, 2015 4:54 PM, "Chen Keong Yap"<br>
<<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.com</a> <mailto:<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.<u></u>com</a>><br>
> <mailto:<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.<u></u>com</a><br>
<mailto:<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.<u></u>com</a>>>> wrote:<br>
><br>
> Hi,<br>
><br>
> When i access my app from<br>
<a href="http://localhost:8080/customer-portal" target="_blank">http://localhost:8080/<u></u>customer-portal</a> and<br>
> it was redirected to keycloak login page<br>
> (<a href="https://192.168.1.10:8443/auth" target="_blank">https://192.168.1.10:8443/<u></u>auth</a>). After login is successful, the<br>
> request is redirected back to<br>
<a href="http://localhost:8080/customer-portal" target="_blank">http://localhost:8080/<u></u>customer-portal</a><br>
> instead of <a href="http://localhost:9080/customer-portal" target="_blank">http://localhost:9080/<u></u>customer-portal</a>. Can someone<br>
advise<br>
> what's wrong with the settings?<br>
><br>
> keycloak proxy server hosted on localhost:8080<br>
><br>
> customer-portal application hosted on localhost:9080<br>
><br>
> proxy.json configuration shown below.<br>
><br>
> {<br>
> "target-url": "<a href="http://localhost:8082" target="_blank">http://localhost:8082</a>",<br>
> "bind-address": "localhost",<br>
> "http-port": "8080",<br>
> "https-port": "8443",<br>
> "keystore": "classpath:ssl.jks",<br>
> "keystore-password": "password",<br>
> "key-password": "password",<br>
> "send-access-token": true,<br>
> "applications": [<br>
> {<br>
> "base-path": "/customer-portal",<br>
> "error-page": "/error.html",<br>
> "adapter-config": {<br>
> "realm": "demo",<br>
> "resource": "customer-portal",<br>
> "realm-public-key":<br>
><br>
"<u></u>MIGfMA0GCSqGSIb3DQEBAQUAA4GNAD<u></u>CBiQKBgQCrVrCuTtArbgaZzL1hvh0x<u></u>tL5mc7o0NqPVnYXkLvgcwiC3BjLGw1<u></u>tGEGoJaXDuSaRllobm53JBhjx33UNv<u></u>+5z/<u></u>UMG4kytBWxheNVKnL6GgqlNabMaFfP<u></u>LPCF8kAgKnsi79NMo+<u></u>n6KnSY8YeUmec/<u></u>p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB<u></u>",<br>
> "auth-server-url":<br>
"<a href="https://192.168.1.10:8443/auth" target="_blank">https://192.168.1.10:8443/<u></u>auth</a>",<br>
> "ssl-required" : "external",<br>
> "enable-cors" : true,<br>
> "principal-attribute": "KEYCLOAK_NAME",<br>
> "credentials": {<br>
> "secret": "password"<br>
> }<br>
> }<br>
> ,<br>
> "constraints": [<br>
> {<br>
> "pattern": "/users/*",<br>
> "roles-allowed": [<br>
> "user"<br>
> ]<br>
> },<br>
> {<br>
> "pattern": "/*",<br>
> "roles-allowed": [<br>
> "user"<br>
> ]<br>
> },<br>
> {<br>
> "pattern": "/call-bearer/*",<br>
> "roles-allowed": [<br>
> "user"<br>
> ]<br>
> },<br>
> {<br>
> "pattern": "/bearer/*",<br>
> "roles-allowed": [<br>
> "user"<br>
> ]<br>
> },<br>
> {<br>
> "pattern": "/admins/*",<br>
> "roles-allowed": [<br>
> "admin"<br>
> ]<br>
> },<br>
> {<br>
> "pattern": "/users/permit",<br>
> "permit": true<br>
> },<br>
> {<br>
> "pattern": "/users/deny",<br>
> "deny": true<br>
> }<br>
> ]<br>
> }<br>
> ]<br>
><br>
><br>
> }<br>
><br>
><br>
><br>
> ______________________________<u></u>_________________<br>
> keycloak-user mailing list<br>
> <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> <mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a>><br>
> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/keycloak-user</a><br>
><br>
<br>
--<br>
Bill Burke<br>
JBoss, a division of Red Hat<br>
<a href="http://bill.burkecentral.com" target="_blank">http://bill.burkecentral.com</a><br>
______________________________<u></u>_________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> <mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a>><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/keycloak-user</a><br>
<br>
</blockquote>
<br>
-- <br>
Bill Burke<br>
JBoss, a division of Red Hat<br>
<a href="http://bill.burkecentral.com" target="_blank">http://bill.burkecentral.com</a><br>
</blockquote></div>