users@glassfish.java.net

Re: Scope of custom LoginModule

From: <forums_at_java.net>
Date: Tue, 27 Mar 2012 09:27:01 -0500 (CDT)

Thank you for your response.

I try to do something like this
blogs.oracle.com/nasradu8/resource/LoginBridge/LoginBridge.zip [1] . But in
my case I extends AppservPasswordLoginModule. And alwayas have an error:

SEVERE: SEC1105: A PasswordCredential was required but not provided.
INFO: Login Failed!!!
SEVERE: javax.security.auth.login.LoginException: No credentials.
    at
com.sun.appserv.security.AppservPasswordLoginModule.extractCredentials(AppservPasswordLoginModule.java:331)
    at
com.sun.appserv.security.AppservPasswordLoginModule.login(AppservPasswordLoginModule.java:140)
    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
com.cargosoft.security.bridge.CargosoftSAM.validateRequest(CargosoftSAM.java:76)
    at
com.sun.enterprise.security.jmac.config.GFServerConfigProvider$GFServerAuthContext.validateRequest(GFServerConfigProvider.java:1171)
    at com.sun.web.security.RealmAdapter.validate(RealmAdapter.java:1452)
    at
com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1330)
    at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
    at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:623)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at
com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
    at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
    at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
    at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
    at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:662)

Where can I see the code of ServerAuthModule that work well with
AppservPasswordLoginModule? Or default glassfish ServerAuthModule?

Maybe there is more simple way to resolve my problem?


[1] https://blogs.oracle.com/nasradu8/resource/LoginBridge/LoginBridge.zip

--
[Message sent by forum member 'prophe05']
View Post: http://forums.java.net/node/884557