[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Secure store in RCP application


As Tom said, the error message means that there are no password provider modules in your configuration.

The information stored in the secure storage (say, a CVS password) is encrypted with a "master" password. The master password is retrieved from a "password provider module". There are three password provider modules included in the SDK:

- the default UI module in the org.eclipse.equinox.security.ui
- the Windows-specific module in the org.eclipse.equinox.security.win32.x86
- the Mac-specific module in the org.eclipse.equinox.security.macosx

As you use Swing, the default UI module won't work for you. If you are preparing the RCP application for Windows or Mac you can include the corresponding fragment in your RCP application.

Alternatively, you can provide your own password provider module (see the extension point org.eclipse.equinox.security.secureStorage) or use the "-eclipse.password" runtime option to specify the file containing master password.

Thanks,
Oleg




"Katarzyna Bylec" <katis@xxxxxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

10/29/2008 04:51 AM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

To
equinox-dev@xxxxxxxxxxx
cc
Subject
[equinox-dev] Secure store in RCP application





Hi,

I'm trying to use Secure Store in my RCP application. This is quite  
unusual approach, because I'm running Java swing application from RCP-non  
UI app to access functionality implemented in plug-ins I already have (and  
which are part of different Eclipse app). One of those functionalities is  
making use of Secure Store and it's working fine in the original plug-ins,  
but not in my RCP app. The problem I have is that when I try to register  
the password using default ISecurePreferences implementation I get this  
error:

org.eclipse.equinox.security.storage.StorageException: No secure storage  
modules found.
                at  
org.eclipse.equinox.internal.security.storage.PasswordProviderSelector.findStorageModule(PasswordProviderSelector.java:190)
                at  
org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getModulePassword(SecurePreferencesRoot.java:226)
                at  
org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getPassword(SecurePreferencesRoot.java:219)
                at  
org.eclipse.equinox.internal.security.storage.SecurePreferences.put(SecurePreferences.java:224)
                at  
org.eclipse.equinox.internal.security.storage.SecurePreferencesWrapper.put(SecurePreferencesWrapper.java:110)
                at  
eu.geclipse.core.auth.PasswordManager.registerPassword(PasswordManager.java:79)

The code which I'm registering this password with is:
  static public void registerPassword( final String pwuid, final String pw  
) {
    ISecurePreferences securePreferences =  
SecurePreferencesFactory.getDefault();
    ISecurePreferences node = securePreferences.node( pwuid );
    try {
      node.put( PasswordManager.PASSWORD, pw, true );
    } catch ( StorageException storageEx ) {
      storageEx.printStackTrace();
    }
  }

Do you have any idea why I get this error and what can be solution to this?
Kasia
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev