Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 511250 - [regression] Bogus password request when exporting features
Summary: [regression] Bogus password request when exporting features
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.7 M6   Edit
Assignee: Martin Karpisek CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 387565
  Show dependency tree
 
Reported: 2017-01-27 19:36 EST by Sergey Prigogin CLA
Modified: 2017-03-07 12:45 EST (History)
2 users (show)

See Also:
Vikas.Chandra: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Prigogin CLA 2017-01-27 19:36:27 EST
Secure storage password is needlessly requested when clicking File > Export > Deployable features > Next. The secure storage access is supposedly for jar signing, but jar signing is off by default. No password should be requested until access to the secure storage is indeed needed. This is a regression from Neon.

Here is the call stack leading to the bogus password prompt:
"main" #1 prio=6 os_prio=0 tid=0x00007f326400e000 nid=0x7a23 runnable [0x00007f3268b40000]
   java.lang.Thread.State: RUNNABLE
	at (C/C++) 0x00007f326a2e2232 (Unknown Source)
	at (C/C++) 0x00007f3268ee3a85 (Unknown Source)
	at (C/C++) 0x00007f3269418dad (Unknown Source)
	at (C/C++) 0x00007f32694834b0 (Unknown Source)
	at (C/C++) 0x00007f32694835d1 (Unknown Source)
	at org.eclipse.swt.internal.gtk.OS.Call(Native Method)
	at org.eclipse.swt.widgets.Display.sleep(Display.java:5054)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:819)
	at org.eclipse.jface.window.Window.open(Window.java:794)
	at org.eclipse.equinox.internal.security.ui.storage.DefaultPasswordProvider$1.run(DefaultPasswordProvider.java:49)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:5410)
	at org.eclipse.equinox.internal.security.ui.storage.DefaultPasswordProvider.getPassword(DefaultPasswordProvider.java:47)
	at org.eclipse.equinox.internal.security.storage.PasswordProviderModuleExt.getPassword(PasswordProviderModuleExt.java:35)
	at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getModulePassword(SecurePreferencesRoot.java:261)
	at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getPassword(SecurePreferencesRoot.java:226)
	at org.eclipse.equinox.internal.security.storage.SecurePreferences.get(SecurePreferences.java:264)
	at org.eclipse.equinox.internal.security.storage.SecurePreferencesWrapper.get(SecurePreferencesWrapper.java:106)
	at org.eclipse.pde.internal.ui.wizards.exports.JARSigningTab.getString(JARSigningTab.java:159)
	at org.eclipse.pde.internal.ui.wizards.exports.JARSigningTab.initialize(JARSigningTab.java:133)
	at org.eclipse.pde.internal.ui.wizards.exports.BaseExportWizardPage.createTabs(BaseExportWizardPage.java:135)
	at org.eclipse.pde.internal.ui.wizards.exports.FeatureExportWizardPage.createTabs(FeatureExportWizardPage.java:63)
	at org.eclipse.pde.internal.ui.wizards.exports.BaseExportWizardPage.createControl(BaseExportWizardPage.java:115)
	at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:176)
	at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:696)
	at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1143)
	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1196)
	at org.eclipse.jface.wizard.WizardDialog.lambda$2(WizardDialog.java:1184)
	at org.eclipse.jface.wizard.WizardDialog$$Lambda$430/1648314796.run(Unknown Source)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1184)
	at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:875)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:419)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:622)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5223)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4493)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4078)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
	at org.eclipse.jface.window.Window.open(Window.java:794)
	at org.eclipse.ui.internal.handlers.WizardHandler$Export.executeHandler(WizardHandler.java:106)
	at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:290)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
	at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:350)
	at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:151)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
	at org.eclipse.jface.action.ActionContributionItem$$Lambda$173/1686896318.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5223)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4493)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4078)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1133)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:684)
	at org.eclipse.ui.internal.Workbench$$Lambda$18/643328884.run(Unknown Source)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at (C/C++) 0x00007f325e0004e7 (Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
Comment 1 Andrey Loskutov CLA 2017-01-28 09:52:28 EST
Most likely side effect from the fix from bug 387565.
Comment 2 Vikas Chandra CLA 2017-01-28 09:58:30 EST
Martin, can you look at this ?
Comment 3 Martin Karpisek CLA 2017-01-31 02:38:27 EST
Yes, I will take care of it
Comment 4 Vikas Chandra CLA 2017-02-08 10:29:02 EST
Martin, any update here?
Comment 5 Eclipse Genie CLA 2017-02-08 16:39:30 EST
New Gerrit change created: https://git.eclipse.org/r/90679
Comment 6 Martin Karpisek CLA 2017-02-08 16:56:09 EST
patch created and submitted in gerrit for review - it avoids access to secured storage as long as signing is not enabled(checked).

Storage is accessed in cases:
a) export dialog was used previously and finished with signing=on (but in that case storage should be already existing and nothing new requested on user)
b) user opens dialog and then checks checkbox signing=on (in that case storage is acessed and possibly previously entered signing information loaded) 

Signing information is put into storage on closing of dialog (also only in case signing=on)
Comment 7 Vikas Chandra CLA 2017-02-21 04:15:47 EST
Martin/Sergey

Can you give detailed steps to recreate this problem?
Comment 8 Sergey Prigogin CLA 2017-02-21 10:48:50 EST
(In reply to Vikas Chandra from comment #7)
> Can you give detailed steps to recreate this problem?

The steps are described in comment #0.
Comment 10 Vikas Chandra CLA 2017-03-07 09:51:33 EST
Sergey/Martin,

Can you verify the fix.
Comment 11 Sergey Prigogin CLA 2017-03-07 12:45:28 EST
Verified in 4.7 I20170307-0800