geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevan Miller <kevan.mil...@gmail.com>
Subject Re: Custom login module
Date Wed, 05 Oct 2005 16:17:16 GMT
Hi Ivan,
What's the context-priority-classloader setting for your web app? If
defaulting or false, can you set to true? Also, anything in your
geronimo.log?

I've never setup a custom login module. If the above doesn't help resolve,
if you can make your app available, I'll have a look at it...
--kevan

On 10/5/05, Ivan S. Dubrov <WFrag@yandex.ru> wrote:
>
> Hello,
>
> I have a problem with custom login module - the Geronimo does not find it.
> I have the following in the geronimo-application.xml (irrelevant parts are
> omitted):
>
> <?xml version="1.0" encoding="UTF-8"?>
> <application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
> configId="myapp"
> parentId="org/apache/geronimo/Server">
>
> <dependency>
> <uri>myapp/jars/security.jar</uri> <!-- My login module is here -->
> </dependency>
>
> <security xmlns="http://geronimo.apache.org/xml/ns/security">
> <!-- Omitted -->
> </security>
>
> <gbean name="myapp-custom-login"
> class="org.apache.geronimo.security.jaas.LoginModuleGBean">
> <attribute name="loginModuleClass">myapp.security.LoginModuleGeronimo
> </attribute>
> <attribute name="serverSide">true</attribute>
> <attribute name="loginDomainName">myapp</attribute>
> </gbean>
>
> <gbean name="myapp-custom-realm"
> class="org.apache.geronimo.security.realm.GenericSecurityRealm">
> <attribute name="realmName">myapp</attribute>
> <reference name="LoginService">
> <module>org/apache/geronimo/Server</module>
> <name>JaasLoginService</name>
> </reference>
> <reference name="LoginModuleConfiguration">
> <name>myapp-modules</name>
> </reference>
> </gbean>
>
> <gbean name="myapp-modules" class="
> org.apache.geronimo.security.jaas.JaasLoginModuleUse">
> <attribute name="controlFlag">REQUIRED</attribute>
> <reference name="LoginModule">
> <name>myapp-custom-login</name>
> </reference>
> </gbean>
> </application>
>
> But when I try to login, I get the following:
>
> 16:38:13,491 INFO [JAASJettyRealm] problem
> javax.security.auth.login.LoginException: No LoginModules configured for
> myapp
> at javax.security.auth.login.LoginContext.init(LoginContext.java:256)
> at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
> at org.apache.geronimo.jetty.JAASJettyRealm.authenticate(
> JAASJettyRealm.java:91)
> at org.mortbay.jetty.servlet.FormAuthenticator$FormCredential.authenticate
> (FormAuthenticator.java:305)
> at org.mortbay.jetty.servlet.FormAuthenticator.authenticate(
> FormAuthenticator.java:148)
> at
> org.apache.geronimo.jetty.interceptor.SecurityContextBeforeAfter.obtainUser
> (SecurityContextBeforeAfter.java:282)
> at
> org.apache.geronimo.jetty.interceptor.SecurityContextBeforeAfter.checkSecurityConstraints
> (SecurityContextBeforeAfter.java:190)
> at org.apache.geronimo.jetty.JettyWebAppContext.checkSecurityConstraints(
> JettyWebAppContext.java:516)
> at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(
> WebApplicationHandler.java:434)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java
> :567)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
> at org.mortbay.jetty.servlet.WebApplicationContext.handle(
> WebApplicationContext.java:635)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
> at org.mortbay.http.HttpServer.service(HttpServer.java:954)
> at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
> at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
> at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
> at org.mortbay.http.SocketListener.handleConnection(SocketListener.java
> :244)
> at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
> at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
>
> If I add my login module classes into the geronimo-security-1.0-M5.jar(very dirty hack,
of course :) ), it works. So I have some misunderstanding
> with the class loading, I think.
>
> WBR,
> Ivan Dubrov.
>

Mime
View raw message