-
Notifications
You must be signed in to change notification settings - Fork 100
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
sudo sessions timeout #4052
sudo sessions timeout #4052
Conversation
7d75c08
to
9b5f528
Compare
Session session = prx.createSessionWithTimeout(p, 0L); | ||
Session session = prx.getSession(secureClient.getSessionId()); | ||
long timeout = session.getTimeToIdle().getValue(); | ||
session = prx.createSessionWithTimeout(p, timeout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method apparently sets the timeToLive
and you are setting the timeToIdle
from the first session, you might want to use createSessionWithTimeouts(principal, long, long) instead.
Thanks @sbesson , didn't notice that; fixed now. |
Using the OMERO.insight from https://ci.openmicroscopy.org/view/DEV/job/OMERO-DEV-merge-build/66/ (OS X), imported an image as another user
And the sudoed sessions timeout after 10 minutes of inactivity as expected. 👍 |
Just agent "createSession" looks a bit weird, wonder where that comes from... |
This agent is set by https://github.com/openmicroscopy/openmicroscopy/blob/v5.1.3/components/server/src/ome/services/sessions/SessionBean.java#L119. We might want to add extra methods allowing to control the agent that could be used by clients like CLI, Insight etc |
Did any of the points (or the need to manually lookup the timeout) get listed as an RFE anywhere? |
you mean a card? ticket is http://trac.openmicroscopy.org/ome/ticket/12972 |
Sorry, no. I meant the other RFEs. |
--rebased-to #4086 |
See Ticket 12972
Previously if a session for another user was created a zero timeout was set, with this PR now the same timeout as the existing session is used.
Test: Code review, check that the import as other user (will initiate a sudo session) still works.