ticgal / gapp

Bug reporting for Gapp
https://tic.gal/gapp/
4 stars 2 forks source link

Problem to connect with cas authentication #49

Closed LaurentSGL closed 1 year ago

LaurentSGL commented 2 years ago

I have a glpi instance v9.5.9 The authentication is done with a cas server (apereo) and user informations come from an ldap server. Everything works well when i connect to https://glpi.xxxxx.fr even if i bypass the cas authentication with https://glpi.xxxxx.fr/?noCAS=1 to use a ldap authentication.

But i is impossible to connect with your Android version :( i have the message : "cookie getter, redirect loop detected"

I already used older version of your gapp and it was working,but the latest version doesn't work

Do you know this issue ? Is there a solution to make the gapp working ? Thanks for your help IMG_20221025_081839 Screenshot_2022-10-25-07-48-12-453_com android chrome

prbond commented 2 years ago

Hi, I have the same problem. I have glpi 9.5.9 with plugin Gapp Essentials 1.4.1. with the same environement with a cas server (apereo) It work well before this new version. I had ever send you a report with the Selftest app

PedroTicGal commented 1 year ago

Hi @LaurentSGL and @prbond,

Gapp always tries to connect to the GLPI web service to save the cookie and use it later to retrieve the images embedded in followups and tasks. These images are not retrieved by the API but directly by URL.

It may happen that your GLPI web URL leads Gapp to a redirection loop (error 30X) and therefore shows this error. Try making a simple request to your GLPI URL and see what the result code is (200, 404, 307...).

In previous versions of Gapp this was not necessary because it did not show the images embedded in followups or tasks.

Could you tell us what is your GLPI url to investigate this problem?

Thank you.

LaurentSGL commented 1 year ago

Hi,my glpi URL is https://glpi.ecam.fr

PedroTicGal commented 1 year ago

Hi @LaurentSGL,

Now I can see why Gapp is not able to get the cookie correctly.

Gapp is trying to get the cookie from its GLPI instance, but instead it is facing its CAS frontend.

Without this cookie, Gapp will not be able to display the embedded images in followups and tasks. Then users will come to report Gapp is not displaying images, so we will have to display an information banner for this in case Gapp could not get the cookie from the web.

We will have to find a solution for this estrange case, but I'm afraid we don't have time right now to make this work. Unfortunately (or not) we have a very busy roadmap for Gapp.

I'll keep this open until we have time to sort it out.

Thank you for your feedback.

LaurentSGL commented 1 year ago

Thanks for your informations Instaed of having URL https://glpi.ecam.fr,i try with https://glpi.ecam.fr/?noCAS=1 which prevent to have a cas authentication (but ldap one) but the gapp doesn't matter this URL too Laurent s

Le jeu. 3 nov. 2022 à 09:42, Pedro Muñoz @.***> a écrit :

Hi @LaurentSGL https://github.com/LaurentSGL,

Now I can see why Gapp is not able to get the cookie correctly.

Gapp is trying to get the cookie from its GLPI instance, but instead it is facing its CAS frontend.

Without this cookie, Gapp will not be able to display the embedded images in followups and tasks. Then users will come to report Gapp is not displaying images, so we will have to display an information banner for this in case Gapp could not get the cookie from the web.

We will have to find a solution for this estrange case, but I'm afraid we don't have time right now to make this work. Unfortunately (or not) we have a very busy roadmap for Gapp.

I'll keep this open until we have time to sort it out.

Thank you for your feedback.

— Reply to this email directly, view it on GitHub https://github.com/ticgal/gapp/issues/49#issuecomment-1301789583, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMKYIGM6HWGQOSUMWSKQCX3WGN3FXANCNFSM6AAAAAARNUFHQ4 . You are receiving this because you were mentioned.Message ID: @.***>

PedroTicGal commented 1 year ago

Hi @LaurentSGL,

I'm afraid that doesn't work like that. You enter a URL in the configuration screen, and this URL is what is requested for the cookie.

The way Gapp parses this to put together the final URL is: [protocol]://[GLPI URL]/apirest.php.

The "?noCAS=1" suffix will not work to correctly connect to the API.

LaurentSGL commented 1 year ago

So no solution for that ?? will it be working with glpi 10 ? Laurent S