Authentification of 2 APPs with the same Keycloak (SSO)

一笑奈何 提交于 2020-06-16 17:25:28

问题


I need your help for a special usecase, I searched on the internet but didn't found anything that would mach my case. I'm new to keycloak so it may be something easy to do but I failed to resolve it :

I have two apps with spring boot security which are connected to the same keycloack. Front-end of both was generated by JHIPSTER. Let's call them app1 and app2.

1st case : I'm connected to app1 and app2 from the same browser, it works well, I can request app1 from app2.

2nd case : I'm connected to app2 only and try to request app1: I got 401 response.

My question is why this is happenning while app2 is using the same keycloak as app1 ? I tried to use same and different clients but it does not change anything.

PS: I already look into issue like this one: Keep authentication between 2 applications with Keycloak SSO where it is explained that the use of the JSESSIONID cookie only works on the app it was generated on (that's why i think 1st case works). So I also tried to use the Javascript adapter ... but i don't think that it will solve my problem (2nd case).

Thanks in advance.

来源:https://stackoverflow.com/questions/62156692/authentification-of-2-apps-with-the-same-keycloak-sso

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!