Bug 437753 - Authentification not working with IReusableEditor on Eclipse restart
Summary: Authentification not working with IReusableEditor on Eclipse restart
Status: NEW
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows 8
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-19 11:22 EDT by Esteban DUGUEPEROUX CLA
Modified: 2020-12-11 10:40 EST (History)
0 users

See Also:


Attachments
Plugin to have a reproduction scenario (12.13 KB, application/x-zip-compressed)
2014-06-24 09:07 EDT, Esteban DUGUEPEROUX CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Esteban DUGUEPEROUX CLA 2014-06-19 11:22:12 EDT
We have a scenario for which we use authentification with the SecurityManager, and opens some CDO content in the Ecore Tools 2 diagram editor which implements IReusableEditor. This type of editor allow on Eclipse restart to have this editor reopened automatically using memento, new URIEditorInput(IMemento). When new URIEditorInput(IMemento) is called to have diagram editor opened we are in the UI thread and we attempt to open the CDOSession. As we use authentification, the server sends a AuthenticationRequest to the client, the client receives a AuthenticationIndication in a thread different of the UI thread but it is here we need the UI thread to ask end-user authentification tokens through InteractiveCredentialsProvider.

I try to get a scenario to reproduce either the DiagramEcoreEditor from Ecore Tools 2 or a TextEditor, both inherits from IReusableEditor, but none of them are reopened when opened from the CDO Sessions view. I will try again.
Comment 1 Esteban DUGUEPEROUX CLA 2014-06-19 11:29:33 EDT
A possible fix would be to have a single request/indication pair instead of OpenSessionRequest/OpenSessionIndication and AuthenticationRequest/AuthenticationIndication to have authentification done in a single thread, the UI one.
Comment 2 Esteban DUGUEPEROUX CLA 2014-06-20 04:41:27 EDT
We have a similar issue with https://bugs.eclipse.org/bugs/show_bug.cgi?id=408982 where indication signal is sent outside the response of the first requesting signal then in another thread. I think we could add a new type of signal in CDO/Net4j to allow several input/output in a single signal, i.e. another IndicationWithResponse allowing a sequence of input/ouput, but without nothing in advance the number of input/output in this sequence. Perhaps we could allow IndicationWithResponse composition.
Comment 3 Esteban DUGUEPEROUX CLA 2014-06-24 09:07:50 EDT
Created attachment 244469 [details]
Plugin to have a reproduction scenario

This is a reproduction scenario with the plugin in attachement :
1. Add "org.eclipse.emf.ecoretools.sdk" feature to the target platform to have an instance of IReusableEditor with shared model
2. Add the attached plugin to the CDO source
3. Launch a CDO server with a securityManager and enough access right for the Adminstrator
4. Launch a client and click on the "OpenCDOContentInReusableEditor" menu and on the action with same name. This action upload some content and opens it with the Ecore Tools 2 diagram editor. At opening authentification tokens are asked, fill them and click ok.
5. Restart Eclipse, here on restart the UI thread try to open the Ecore Tools 2 diagram editor on CDO content but need authentification at CDOSession opening. But the autentification is asked on another thread through AuthentificationIndication.
Comment 4 Eike Stepper CLA 2015-07-14 02:20:52 EDT
Moving all open bugzillas to 4.5.
Comment 5 Eike Stepper CLA 2016-07-31 01:03:38 EDT
Moving all unaddressed bugzillas to 4.6.
Comment 6 Eike Stepper CLA 2017-12-28 01:16:26 EST
Moving all open bugs to 4.7
Comment 7 Eike Stepper CLA 2019-11-08 02:04:52 EST
Moving all unresolved issues to version 4.8-
Comment 8 Eike Stepper CLA 2019-12-13 12:51:11 EST
Moving all unresolved issues to version 4.9
Comment 9 Eike Stepper CLA 2020-12-11 10:40:03 EST
Moving to 4.13.