karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Marins <rafael.mar...@neociclo.com>
Subject Re: Problem reusing JAAS login modules
Date Tue, 28 Dec 2010 18:46:26 GMT
Hi Andreas,

Filled the issue KARAF-344 to report and track the problem.

Best,
--
Rafael Marins



On Dec 28, 2010, at 4:28 PM, Rafael Marins wrote:

> Hi Andreas,
> 
> I've prepared the attached project to test this behavior. You can build and simply follow
the steps:
> 
> karaf@root> osgi:install \-s mvn:org.neociclo.samples.karaf/jaas-config-requires-restart/1.0-SNAPSHOT
> Bundle ID: 330
> karaf@root> nc:jaaslogin user pwd
> org.osgi.service.blueprint.container.ServiceUnavailableException: Service is unavailable
> 	at org.apache.aries.blueprint.container.ReferenceListRecipe$ServiceDispatcher.call(ReferenceListRecipe.java:201)
> 	at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$CgLibProxyFactory$1.loadObject(AbstractServiceReferenceRecipe.java:652)
> 	at org.apache.karaf.jaas.config.JaasRealm$$EnhancerByCGLIB$$59154.getName(<generated>)
> 	at org.apache.karaf.jaas.config.impl.OsgiConfiguration.getAppConfigurationEntry(OsgiConfiguration.java:52)
> 	at javax.security.auth.login.LoginContext.init(LoginContext.java:243)
> 	at javax.security.auth.login.LoginContext.<init>(LoginContext.java:367)
> 	at javax.security.auth.login.LoginContext.<init>(LoginContext.java:444)
> 	at org.neociclo.samples.karaf.JaasLoginShellCommand.doExecute(JaasLoginShellCommand.java:41)
> 	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
> 	at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
> 	at org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:50)
> 	at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:229)
> 	at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)
> 	at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)
> 	at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)
> 	at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
> 	at org.apache.karaf.shell.console.jline.Console.run(Console.java:169)
> 	at java.lang.Thread.run(Thread.java:680)
> Failed to load LoginContext for realm=nctestkaraf@root> shutdown
> 
> localhost:karaf rmarins$ ./bin/karaf 
>         __ __                  ____      
>        / //_/____ __________ _/ __/      
>       / ,<  / __ `/ ___/ __ `/ /_        
>      / /| |/ /_/ / /  / /_/ / __/        
>     /_/ |_|\__,_/_/   \__,_/_/         
> 
>   Apache Karaf (2.1.2)
> 
> Hit '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Karaf.
> 
> karaf@root> nc:jaaslogin user pwd
> javax.security.auth.login.FailedLoginException: User user does not exist
> 	at org.apache.karaf.jaas.modules.properties.PropertiesLoginModule.login(PropertiesLoginModule.java:97)
> 	at org.apache.karaf.jaas.boot.ProxyLoginModule.login(ProxyLoginModule.java:83)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
> 	at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
> 	at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
> 	at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
> 	at org.neociclo.samples.karaf.JaasLoginShellCommand.doExecute(JaasLoginShellCommand.java:61)
> 	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
> 	at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
> 	at org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:50)
> 	at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:229)
> 	at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)
> 	at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)
> 	at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)
> 	at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
> 	at org.apache.karaf.shell.console.jline.Console.run(Console.java:169)
> 	at java.lang.Thread.run(Thread.java:680)
> Login failed
> 
> karaf@root> nc:jaaslogin karaf karaf
> Login succeed for realm=nctest, user=karaf
> 
> karaf@root>
> <jaas-config-requires-restart.zip>
> Best regards,
> --
> Rafael Marins
> 
> 
> 
> 
> On Dec 28, 2010, at 2:56 PM, Andreas Pieber wrote:
> 
>> Not ad-hoc, but if you can provide a very simple example to reproduce the
>> problem and create an issue for it I can take a look at it.
>> 
>> kind regards,
>> andreas
> 


Mime
View raw message