I have setup Keycloak SAML client for SSO. After login and redirect from Keycloak to the Tryton page, unfortunately, only the Tryton layout shows on the browser page followed immediately by a redirect attempt to login again. This cycle continuous indefinitely. I am using Tryton 8. I am looking for tutorial or ideas that could help diagnose why the repetitive attempts to login. On the contrary, regular password login works normal on the same platform.
Could you provide the configuration of the authentication_saml module and which client are you using?
Also are you testing use localhost?
This looks like you’re using sao and authenticating on a tryton running on localhost.
Indeed we have to use a trick in the authentication_saml module to know when the user is using sao or tryton.
And this trick result in the cookies not set in your browser thus resulting in the authentication loop.
I’ve been bitten twice by it so now, I know that when testing SAML on a localhost tryton I must comment those lines.
Yes, I have been testing with localhost:8000 which will obviously be affected by modules/authentication_saml/routes.py · branch/default · Tryton / Tryton · GitLab .
Thank you for pointing this out. So, I should rather test with a proper hostname via proxy, I presume.
Or use a different hostname than localhost, for example 127.0.0.1.
I’m wondering if we should not disable login services on localhost in sao.
I was able to Keycloak SSO login using 127.0.0.1 and not localhost. Thanks again for the heads up.
As expected, the above login is for preexisting Tryton users with email as login. Now I need to implement creation of a new user in Tryton, after successful Keycloak SSO. Please advise on howto.
Thanks. I see that it is work-in-progress.