Opened 6 years ago

Closed 6 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:

Description

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(TestJob.java:113)                                                      
        at TestIlluminaImporter.test_all(TestIlluminaImporter.java:69)                                 
        at TestIlluminaImporter.main(TestIlluminaImporter.java:36)                                     
Caused by: net.sf.basedb.core.PermissionDeniedException: Permission denied: impersonateLogin           
        at net.sf.basedb.core.PluginSessionControl.impersonateLogin(PluginSessionControl.java:85)      
        at net.sf.basedb.core.Trashcan.delete(Trashcan.java:239)                                       
        at net.sf.basedb.plugins.IlluminaRawDataImporter.end(IlluminaRawDataImporter.java:592)         
        at net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(AbstractFlatFileImporter.java:752)  
        at net.sf.basedb.plugins.AbstractFlatFileImporter.run(AbstractFlatFileImporter.java:466)       
        at net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:117)           
        at TestJob.test_execute(TestJob.java:97)                                                       

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, 6 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.