SSO withh KeyCloak from FrontEnd app with Liferay 7.4 as Headless CMS

thumbnail
Aritz Galdos, modificat fa 2 anys. Expert Apunts: 416 Data d'incorporació: 15/05/07 Publicacions recents

Hello dear friends of the community

 

This is the scenario. I have a Liferay 7.4 CE configured to log in with KeyCloak. At this point every thing is fine. I can create a user in KC and it is imported into LR seamlessly.

On the other hand, I am developing a FrontEnd app (Python + Flask) which consumes Liferay's HeadLess API.

I can log-in in the front-end app with KC but if I have never logged this user in Liferay, It has never been imported into LR before from KC. So, even if I log the user in the FrontEnd app against KC, I am not able to get data with the headless API as far as this user has not been imported into LR.

How could I trigger the propagation of the user from KC to LR when I sign-in in the FrontEnd app?

I hoped it would be imported when making the first request to the HeadLess API with the JWT token.

thumbnail
Zsigmond Rab, modificat fa 2 anys. Liferay Master Apunts: 764 Data d'incorporació: 05/01/10 Publicacions recents

Hi Aritz,

You should have the user authenticate against the portal instead of KC. The import can happen only in this case, I believe. At least without further customization.

Regards,