Opened 5 years ago

Closed 5 years ago

#2167 closed defect (fixed)

Permission denied when plug-in is trying to clone a session

Reported by: Nicklas Nordborg Owned by: everyone
Priority: minor Milestone: BASE 3.15
Component: core Version:
Keywords: Cc:


It is possible to clone an existing user session by calling SessionControl.impersonateLogin() by using the same user id as the currently logged in user. This should not fail even if the logged in user doesn't have IMPERSONATE permission. However, if a plug-in is trying to do this we get an exception:

net.sf.basedb.core.BaseException: Permission denied: impersonateLogin                                  
        at TestJob.test_execute(                                                      
        at TestIlluminaImporter.test_all(                                 
        at TestIlluminaImporter.main(                                     
Caused by: net.sf.basedb.core.PermissionDeniedException: Permission denied: impersonateLogin           
        at net.sf.basedb.core.PluginSessionControl.impersonateLogin(      
        at net.sf.basedb.core.Trashcan.delete(                                       
        at net.sf.basedb.plugins.IlluminaRawDataImporter.end(         
        at net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(  
        at net.sf.basedb.core.PluginExecutionRequest.invoke(           
        at TestJob.test_execute(                                                       

The reason is the the plug-in is using a subclass PluginSessionControl that always throw an exception.

Change History (1)

comment:1 by Nicklas Nordborg, 5 years ago

Resolution: fixed
Status: newclosed

In 7669:

Fixes #2167: Permission denied when plug-in is trying to clone a session

Note: See TracTickets for help on using tickets.