Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 227310

Summary: Security issue: Secure Storage view shows passwords without asking for master
Product: [Eclipse Project] Equinox Reporter: Markus Keller <markus.kell.r>
Component: SecurityAssignee: Security Inbox <equinox.security-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: daniel_megert, martinae, ob1.eclipse
Version: 3.4   
Target Milestone: 3.4 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Markus Keller CLA 2008-04-16 07:19:40 EDT
I20080415-1646

Security issue: The Secure Storage view shows passwords (e.g. for CVS connections) without asking for the master password again.

This is a security hole, since a passer-by can quickly find out secret passwords on an unattended machine.

It's already questionable whether it should be possible to show unencrypted passwords, but if you want to keep this, you must at least protect the feature by asking for the master password again each time (like e.g. in Firefox).
Comment 1 Oleg Besedin CLA 2008-04-18 15:14:38 EDT
By design, secure storage tries to get away from a user-enterable password. In general, there might be or might be not a "master" password that user is aware of.

So, we can not ask to re-enter "master" password and the choice becomes to show or not to show. Which is a question of finding balance of convenience vs. security. 

There is also bug  the 227428 which might result in the subtantial changes to the view.
Comment 2 Dani Megert CLA 2008-04-19 06:45:37 EDT
>. Which is a question of finding balance of convenience vs.
>security. 
Well, it's called *secure* store and not just store, right? ;-)

This bug needs to be fixed in a way you outlined yourself: either ask for the password again or don't allow to show the passwords.
Comment 3 Oleg Besedin CLA 2008-04-21 10:54:10 EDT
See 227428 : I think I'll add a Debug-like preferences to the org.eclipse.equinox.security bundle and will create context menus (both modify actions and "show value" action) only if that property is set.

Comment 4 Oleg Besedin CLA 2008-04-21 12:15:28 EDT
By the way, the "Decrypt" command on the same menu has essentially the same effect.

I can make those commands to show up only if specific debug option is set. But then by extension of the same logic a passer by can create a new debug launch configuration and enable those options and launch self-hosting session from the running session and get those actions back :-).

Any opinions?
Comment 5 Markus Keller CLA 2008-04-21 12:45:32 EDT
> By design, secure storage tries to get away from a user-enterable password.

That's very well appreciated for logins, but not for decrypting stored passwords.

> In general, there might be or might be not a "master" password that user is
> aware of.

But there must be a master password somewhere. If it's the user's login password, then you should use the OS's password dialog to ask the user.

If the secure store can really be used without any password, then we need a big scary warning message whenever a password is saved into such an insecure store.

As you said in comment 4, the debug preference is also not a secure solution. It should just not be possible for a user to see decrypted passwords unless he entered the master password immediately before. And if there's no master password, the stored passwords should not be made available.
Comment 6 Oleg Besedin CLA 2008-04-21 14:23:30 EDT
Created attachment 96908 [details]
Patch

OK, convinced :-). 

For 3.4 this patch removes Show Value, Encrypt, and Decrypt commands. 

The Add/Remove commands are now only availabe if debug options are set (bug 227428).

Long-term I'd like to see if we can find a way to put those commands back. The story I'd like to see hapenning is the secure storage being locked by a file present on a USB key or a smart card. To a degree USB key can be used today, but it is not yet the base path.
Comment 7 Oleg Besedin CLA 2008-04-21 14:25:58 EDT
Patch applied to CVS Head. Thanks for bringing this up.