ome / omero-blitz

Gradle project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
0 stars 15 forks source link

Login with session ID retrieved from JSON API not working #147

Closed dominikl closed 1 year ago

dominikl commented 1 year ago

Moving the ticket from the Java gateway to here: https://github.com/ome/omero-gateway-java/issues/80 . Session login via Java gateway works, so it's not a gateway issue.

Apparently the login with a session ID retrieved from JSON API login is not working, see https://forum.image.sc/t/java-gateway-authentication-using-the-json-api/84307 . Unfortunately I've not been able to replicate the issue yet, as I can't login via JSON API in the first place (using our demo server).

sbesson commented 1 year ago

We might need more specifics about what failed here. Trying to reproduce, I was able to successfully complete the following workflow:

  1. login into OMERO using the JSON API i.e.

    a. first make a GET request against the /api/v0/token endpoint to retrieve the CSRF token b. then make a POST request against the /api/v0/login endpoint, filling the payload and headers accordingly c. the last request retruned a 200 status code with the session ID stored in the sessionUuid attribute of the JSON response

  2. use the session ID returned above as the username and the password to authenticate against the same server a. using OMERO.insight 5.8.1 b. using minimal-omero-client c. in both scenarios, the client was able to rejoin the session created in step 1
imagesc-bot commented 1 year ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/java-gateway-authentication-using-the-json-api/84307/11

dominikl commented 1 year ago

Close. Turned out that it was a problem with using the session ID.