Hi again

Update: Looks like I'm having troubles getting the 
org.eclipse.equinox.security.auth/loginConfigName property set. I do it the 
same way as in the example via the ini-file reference in plugin.xml but it 
doesn't seem to get read. I've also failed setting it at runtime so far.

Arthur


-----Ursprüngliche Nachricht-----
Von: Arthur van Dorp 
Gesendet: Montag, 3. September 2007 09:55
An: '[email protected]'
Betreff: [sec] Using JAAS framework: "Could not locate JAAS Configuration"

Hi all

I'm trying to use the JAAS framework of the Equinox Security project 
(http://www.eclipse.org/equinox/incubator/security/) in another project. I've 
successfully built and run the provided unit tests and the sample program, but 
I fail when trying to use it in another bundle. It fails to find the JAAS 
configuration:

03.09.2007 08:38:00 
org.eclipse.equinox.internal.security.auth.ConfigurationFederator 
getAppConfigurationEntry Could not locate JAAS Configuration with name "", 
verify that the configuration exists and is non-empty
03.09.2007 08:38:00 
org.eclipse.equinox.internal.security.auth.ConfigurationFederator 
getAppConfigurationEntry Could not locate JAAS Configuration with name "other", 
verify that the configuration exists and is non-empty
javax.security.auth.login.LoginException: No LoginModules configured for 

The security properties are set in the start() method of the Activator:

Security.setProperty("login.configuration.provider", 
"org.eclipse.equinox.security.boot.auth.ConfigurationProvider");
Security.setProperty("login.config.url.1", 
  context.getBundle().getEntry("/data/jaas_config.xml").toExternalForm());      
                                        

This should be ok because
System.out.println(Platform.resolve(context.getBundle().getEntry("/data/jaas_config.xml")));
returns the correct full path to the configuration file.

What doesn't seem ok is that neither SecurePlatform nor the loginContext return 
a ConfigurationName:
System.out.println(SecurePlatform.getConfigurationName());
System.out.println(SecurePlatform.getLoginContext().getConfigurationName());
Both lines remain empty.

I'm sure I'm missing something obvious here. Debugging isn't helped by the fact 
that I'm both an OSGi and a JAAS newbie. One difference to the sample program 
is that I implement org.osgi.framework.BundleActivator and not 
org.eclipse.core.runtime.IPlatformRunnable.

Any ideas are very much appreciated.

Thanks

Arthur
_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to