Felix Karaf - JAAS - HELP !!
marcelcasado Feb 19, 2010 5:58 PMHi,
I'm hot deploying a JAAS blueprint xml config file (attached). Based on the logs the file gets deployed fine . The config relies on a LoginModule deployed in a different bundle and exposed:
JaasPropertiesLoginModule.xml (0.0.0)
Logs:
15:47:28,247 | DEBUG | pool-2-thread-3 | BlueprintContainerImpl | container.BlueprintContainerImpl 229 | Running blueprint container for bundle JaasPropertiesLoginModule.xml in state Create
15:47:28,247 | DEBUG | pool-2-thread-3 | ServiceRecipe | lueprint.container.ServiceRecipe 161 | Registering service nnew with interfaces and properties {org.apache.felix.karaf.jaas.module=nnew}
15:47:28,246 | DEBUG | nerated-bundles} | BundleWatcher | .swissbox.extender.BundleWatcher 176 | Scanning bundle
15:47:28,248 | DEBUG | Event Dispatcher | xml | ? ? | BundleEvent STARTED
15:47:28,249 | INFO | nerated-bundles} | fileinstall | ? ? | Started bundle: blueprint:file:/Users/marcel/Downloads/apache-servicemix-4.1.0-psc-01-00RC1/deploy/JaasPropertiesLoginModule.xml
15:47:28,249 | DEBUG | pool-2-thread-3 | xml | ? ? | ServiceEvent REGISTERED
15:47:28,250 | DEBUG | pool-2-thread-3 | BlueprintContainerImpl | container.BlueprintContainerImpl 601 | Instantiating components:
15:47:28,251 | DEBUG | pool-2-thread-3 | ServiceRecipe | lueprint.container.ServiceRecipe 225 | Retrieving service for bundle null and service registration null
15:47:28,251 | DEBUG | pool-2-thread-3 | ServiceRecipe | lueprint.container.ServiceRecipe 256 | Creating service instance
15:47:28,252 | DEBUG | pool-2-thread-3 | CmPropertyPlaceholder | pendium.cm.CmPropertyPlaceholder 74 | Retrieving property value security.properties.user from configuration with pid nnew_security
15:47:28,277 | DEBUG | pool-2-thread-3 | CmPropertyPlaceholder | pendium.cm.CmPropertyPlaceholder 82 | Found property value /Users/marcel/fuse_osgi_4_0_2/etc/users-credentials2.properties
15:47:28,282 | DEBUG | pool-2-thread-3 | CmPropertyPlaceholder | pendium.cm.CmPropertyPlaceholder 74 | Retrieving property value security.properties.group from configuration with pid nnew_security
15:47:28,283 | DEBUG | pool-2-thread-3 | CmPropertyPlaceholder | pendium.cm.CmPropertyPlaceholder 82 | Found property value /Users/marcel/fuse_osgi_4_0_2/etc/groups.properties
15:47:28,284 | DEBUG | pool-2-thread-3 | ServiceRecipe | lueprint.container.ServiceRecipe 258 | Service created: org.apache.felix.karaf.jaas.config.impl.Config@69351290
15:47:28,284 | DEBUG | pool-2-thread-3 | ServiceRecipe | lueprint.container.ServiceRecipe 261 | Creating listeners
15:47:28,284 | DEBUG | pool-2-thread-3 | ServiceRecipe | lueprint.container.ServiceRecipe 267 | Listeners created: []
15:47:28,284 | DEBUG | pool-2-thread-3 | ServiceRecipe | lueprint.container.ServiceRecipe 269 | Calling listeners for initial service registration
15:47:28,285 | DEBUG | pool-2-thread-3 | xml | ? ? | ServiceEvent REGISTERED
15:47:28,286 | DEBUG | pool-2-thread-3 | BlueprintEventDispatcher | ntainer.BlueprintEventDispatcher 97 | Sending blueprint container event BlueprintEvent[type=CREATED] for bundle JaasPropertiesLoginModule.xml
15:47:28,286 | DEBUG | pool-2-thread-3 | BlueprintContainerImpl | container.BlueprintContainerImpl 229 | Running blueprint container for bundle JaasPropertiesLoginModule.xml in state Created
15:47:28,286 | DEBUG | pool-1-thread-1 | BlueprintListener | raf.shell.osgi.BlueprintListener 85 | Blueprint app state changed to Created for bundle 207
But when I run my application does not seem that my JAAS deployed config has been really registered since is not able to find my realm :
15:55:31,968 | DEBUG | /DecisionService | PhaseInterceptorChain | .cxf.phase.PhaseInterceptorChain 236 | Invoking handleMessage on interceptor edu.ucar.ral.security.ws.cxf.interceptors.JAASInterceptor@6fa97a7
15:55:31,985 | DEBUG | /DecisionService | JAASAuthenticationService | cation.JAASAuthenticationService 63 | Authenticating 'marcel
15:55:31,998 | DEBUG | /DecisionService | ServiceRecipe | lueprint.container.ServiceRecipe 225 | Retrieving service for bundle org.apache.felix.karaf.jaas.config_1.2.0.psc-01-00RC1 and service registration {org.apache.felix.karaf.jaas.config.JaasRealm}={org.apache.felix.karaf.jaas.module=karaf, service.id=54}
15:55:32,003 | WARN | /DecisionService | PhaseInterceptorChain | ache.cxf.common.logging.LogUtils 361 | Interceptor for DecisionService has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: No LoginModules configured for nnew
at edu.ucar.ral.security.ws.cxf.interceptors.JAASInterceptor.handleMessage(JAASInterceptor.java:134)
at edu.ucar.ral.security.ws.cxf.interceptors.JAASInterceptor.handleMessage(JAASInterceptor.java:54)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:239)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:109)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:312)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:276)
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:320)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:636)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
Caused by: javax.security.auth.login.LoginException: No LoginModules configured for nnew
at javax.security.auth.login.LoginContext.init(LoginContext.java:256)
at javax.security.auth.login.LoginContext.(LoginContext.java:444)
at edu.ucar.ral.security.jaas.authentication.JAASAuthenticationService.authenticate(JAASAuthenticationService.java:65)
at edu.ucar.ral.security.ws.cxf.interceptors.JAASInterceptor.handleMessage(JAASInterceptor.java:127)
... 18 more
Any help will be greatly appreciated, thanks.
-Marcel