On 2011-7-8, at 下午8:36, metatech wrote:

Jean-Baptiste Onofré <jb@...> writes:


Hi,

By default, ServiceMix 3 load the login modules defined in
etc/login.properties.


In ServiceMix 4.x, this configuration does not work, the file
"etc/login.properties" does not exist anymore.
You will get the following error :

Caused by: javax.security.auth.login.LoginException: No LoginModules
configured for servicemix-domain
        at javax.security.auth.login.LoginContext.
init(LoginContext.java:256)
        at javax.security.auth.login.LoginContext.
<init>(LoginContext.java:367)
        at javax.security.auth.login.LoginContext.
<init>(LoginContext.java:444)
        at
org.apache.servicemix.nmr.core.security.JaasAuthenticationService.
authenticate(JaasAuthenticationService.java:50)

The Java system property "java.security.auth.login.config" does not have any
effect because the configuration is implemented in
org.apache.karaf.jaas.config.impl.OsgiConfiguration

Solution : you need to add your realm in the file
OSGI-INF/blueprint/karaf-jaas-module.xml within the archive
$SERVICEMIX_HOME/system/org/apache/karaf/jaas/ org.apache.karaf.jaas.modules/
2.1.3/org.apache.karaf.jaas.modules-2.1.3.jar,
maybe also do a rm -r $SERVICE_HOME/data/cache, and restart ServiceMix.


Take a look at [1], I don't think you have to hack the org.apache.karaf.jaas.modules to add the realm.

[1]http://karaf.apache.org/manual/2.2.3-SNAPSHOT/developers-guide/security-framework.html

Freeman




---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com









Reply via email to