Skip to content
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

Merged
merged 2 commits into from
Aug 21, 2015
Merged

sudo sessions timeout #4052

merged 2 commits into from
Aug 21, 2015

Conversation

dominikl
Copy link
Member

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.

@jburel jburel added the develop label Aug 17, 2015
Session session = prx.createSessionWithTimeout(p, 0L);
Session session = prx.getSession(secureClient.getSessionId());
long timeout = session.getTimeToIdle().getValue();
session = prx.createSessionWithTimeout(p, timeout);
Copy link
Member

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.

@dominikl
Copy link
Member Author

Thanks @sbesson , didn't notice that; fixed now.

@sbesson
Copy link
Member

sbesson commented Aug 21, 2015

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

$ bin/omero sessions -q who
 name    | group           | logged in               | agent          | timeout | hitCount | lastAccessTime      
---------+-----------------+-------------------------+----------------+---------+----------+---------------------
...
 user-11 | read-annotate-1 | 2015-08-21 07:35:56     | createSession  | 10 min. | 28       | 2015-08-21 07:35:57 
 root    | system          | 2015-08-21 07:34:03     | OMERO.insight  | 10 min. | 63       | 2015-08-21 07:36:04 
07:41:43 
 user-11 | read-annotate-1 | 2015-08-21 07:34:52     | createSession  | 10 min. | 337      | 2015-08-21 07:35:56 
(13 rows)

And the sudoed sessions timeout after 10 minutes of inactivity as expected. 👍

sbesson added a commit that referenced this pull request Aug 21, 2015
@sbesson sbesson merged commit d0bf7df into ome:develop Aug 21, 2015
@dominikl
Copy link
Member Author

Just agent "createSession" looks a bit weird, wonder where that comes from...

@sbesson
Copy link
Member

sbesson commented Aug 21, 2015

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

@joshmoore
Copy link
Member

Did any of the points (or the need to manually lookup the timeout) get listed as an RFE anywhere?

@jburel
Copy link
Member

jburel commented Aug 25, 2015

you mean a card? ticket is http://trac.openmicroscopy.org/ome/ticket/12972

@joshmoore
Copy link
Member

Sorry, no. I meant the other RFEs.

@sbesson
Copy link
Member

sbesson commented Aug 27, 2015

See https://trello.com/c/azP0udku

@dominikl
Copy link
Member Author

--rebased-to #4086

@sbesson sbesson added this to the 5.2.0 milestone Oct 2, 2015
@dominikl dominikl deleted the sudo_session_timeout branch October 27, 2015 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants