-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add integration test for joining session #6319
base: develop
Are you sure you want to change the base?
Conversation
So we can rule out that is an issue with insight itself. |
Yes, I think the fact that it depends on the group permission if the test fails, suggest that it's neither Insight nor Java gateway related. Server side issue? |
No, the problem is actually in the Gateway. I don't know why it works for the read-annotate group, but for the others it fails when line https://github.com/ome/omero-gateway-java/blob/master/src/main/java/omero/gateway/Gateway.java#L1773 is hit. Because for the session id login the id is only set as username and not as password it fails. If you set it for both the test works for all groups. Hopefully shouldn't be hard to fix. |
Tested using today's insight and it still fails from insight |
I've spent quite a bit of time looking at this and I think I've come to the conclusion that as currently architected it's not possible for the Java gateway to function correctly across multiple groups when a session ID is provided as a means to log in. Fundamentally, this is rooted in the Java gateway's strategy of handling access to multiple groups by creating a new session for each group and following it up with a call to This strategy has performance and scalability implications beyond the problems outlined in ome/omero-insight#293 especially if a user's group membership is high.
Finally, there seems to be some confusion about the differences between So that OMERO.insight does not behave erratically we should probably prevent cross group use when a session ID is in use. /cc @joshmoore, @sbesson Footnotes |
So maybe this multi-group feature should be removed generally from the gateway (and thus from Insight), like it is for python/web? Would have made things much easier from the start.
Afaik
The idea came from the fact that there are these two seemingly different methods in the |
The current design certainly precludes use with a session ID. Whether that was even considered when those decisions were made and would have made things much easier from the start is likely lost to the annals of time. It has been this way for at least 11 years, certainly before the Java gateway existed as a separate thing. Should we have changed the design when the cross group querying features of OMERO 4.4. were added? Possibly, but again that rationale and the specifics of those discussions is likely lost to the annals of time. Now? Definitely, but I'm pretty sure that means a near complete rewrite; every method call needs to know the group context in which it is operating with the Python gateway style.
As
Under what conditions were you getting that exception? At the very least we should make that message clearer. |
Insight was initially not meant to support login using session ID. This was added afterwards to allow its usage for place like ome-ssbd. One option (which does not solve the gateway) for insight could be to only load the group the session is associated to but this will require a review of insight. We should be careful before starting such effort. As for the exception mentioned above, it happens when insight connects using a session ID. |
Certainly based on the architecture I guess that's now very obvious since we're not testing it and it's been like this for over a decade. There's also no way to prevent this without performing more interrogation of the session than we are.
Under what exact conditions? |
I think it must happen when |
insight connect using cli arguments
then |
That would make sense. I don't want to be pedantic but is that then not telling a user exactly what they need to do? Either they need to call
Then we're not calling |
--exclude this for now |
I'm totally lost now on this one... shall I add the tests again or remove the PR? |
Adds an integration test for reproducing issue ome/omero-insight#293 , join via session id and browse different groups.
Currently fails, only works for the Read-Annotate group, fails for other groups.
/cc @jburel