[AUTH] problem with security.xml and login

View: New views
3 Messages — Rating Filter:   Alert me  

[AUTH] problem with security.xml and login

by g.imbrogno :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I am a new user of this framework and I have some problems with the users authentication. First of all, I'm using smartweb auth v. 0.8.1, and I have modified the name of smartweb.jar.xml in security.xml, under suggestion of a developer, but after this change I am not able to do a correct login. If I use the name of "smartweb.jar.xml" I can login, but the roles defined in the configuration file are not met. Can anyone helps me? Thanks a lot in advance...

Below the stack-trace of the error:
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: net.smartlab.web.auth.AuthenticationException: java.lang.NullPointerException
        org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
        org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
        net.smartlab.web.ActionServlet.process(ActionServlet.java:64)
        org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        net.smartlab.web.auth.ActionFilter.doFilter(ActionFilter.java:72)
        net.smartlab.geoloc.SwitchFilter.doFilter(SwitchFilter.java:61)
        org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

net.smartlab.web.auth.AuthenticationException: java.lang.NullPointerException
        net.smartlab.web.auth.Domain.login(Domain.java:331)
        net.smartlab.web.auth.AbstractUserAction.login(AbstractUserAction.java:115)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        java.lang.reflect.Method.invoke(Unknown Source)
        net.smartlab.web.DynaAction.execute(DynaAction.java:173)
        net.smartlab.web.Action.execute(Action.java:98)
        org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
        org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
        org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
        org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
        org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
        org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
        org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
        org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
        net.smartlab.web.ActionServlet.process(ActionServlet.java:64)
        org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        net.smartlab.web.auth.ActionFilter.doFilter(ActionFilter.java:72)
        net.smartlab.geoloc.SwitchFilter.doFilter(SwitchFilter.java:61)
        org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

java.lang.NullPointerException
        net.smartlab.web.auth.handlers.PasswordAuthenticationHandler.onLogin(PasswordAuthenticationHandler.java:81)
        net.smartlab.web.auth.Domain.login(Domain.java:325)
        net.smartlab.web.auth.AbstractUserAction.login(AbstractUserAction.java:115)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        java.lang.reflect.Method.invoke(Unknown Source)
        net.smartlab.web.DynaAction.execute(DynaAction.java:173)
        net.smartlab.web.Action.execute(Action.java:98)
        org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
        org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
        org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
        org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
        org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
        org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
        org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
        org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
        net.smartlab.web.ActionServlet.process(ActionServlet.java:64)
        org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        net.smartlab.web.auth.ActionFilter.doFilter(ActionFilter.java:72)
        net.smartlab.geoloc.SwitchFilter.doFilter(SwitchFilter.java:61)
        org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.

PS: english is not my native language, so I'm sorry for my espressions

Re: [Smartweb-user] [AUTH] problem with security.xml and login

by Roberto Lo Giacco-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

g.imbrogno wrote:

> Hi all,
>
> I am a new user of this framework and I have some problems with the users
> authentication. First of all, I'm using smartweb auth v. 0.8.1, and I have
> modified the name of smartweb.jar.xml in security.xml, under suggestion of a
> developer, but after this change I am not able to do a correct login. If I
> use the name of "smartweb.jar.xml" I can login, but the roles defined in the
> configuration file are not met. Can anyone helps me? Thanks a lot in
> advance...
>
> Below the stack-trace of the error:
> type Exception report
>
> message
>
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
>
> exception
>
> javax.servlet.ServletException:
> net.smartlab.web.auth.AuthenticationException:
> java.lang.NullPointerException
>        
> org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
>        
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>         net.smartlab.web.ActionServlet.process(ActionServlet.java:64)
>        
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         net.smartlab.web.auth.ActionFilter.doFilter(ActionFilter.java:72)
>         net.smartlab.geoloc.SwitchFilter.doFilter(SwitchFilter.java:61)
>        
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>
>
> root cause
>
> net.smartlab.web.auth.AuthenticationException:
> java.lang.NullPointerException
>         net.smartlab.web.auth.Domain.login(Domain.java:331)
>        
> net.smartlab.web.auth.AbstractUserAction.login(AbstractUserAction.java:115)
>         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         java.lang.reflect.Method.invoke(Unknown Source)
>         net.smartlab.web.DynaAction.execute(DynaAction.java:173)
>         net.smartlab.web.Action.execute(Action.java:98)
>        
> org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
>        
> org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
>        
> org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>         org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
>        
> org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
>         org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
>        
> org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>        
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>         net.smartlab.web.ActionServlet.process(ActionServlet.java:64)
>        
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         net.smartlab.web.auth.ActionFilter.doFilter(ActionFilter.java:72)
>         net.smartlab.geoloc.SwitchFilter.doFilter(SwitchFilter.java:61)
>        
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>
>
> root cause
>
> java.lang.NullPointerException
>        
> net.smartlab.web.auth.handlers.PasswordAuthenticationHandler.onLogin(PasswordAuthenticationHandler.java:81)
>         net.smartlab.web.auth.Domain.login(Domain.java:325)
>        
> net.smartlab.web.auth.AbstractUserAction.login(AbstractUserAction.java:115)
>         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         java.lang.reflect.Method.invoke(Unknown Source)
>         net.smartlab.web.DynaAction.execute(DynaAction.java:173)
>         net.smartlab.web.Action.execute(Action.java:98)
>        
> org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
>        
> org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
>        
> org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>         org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
>        
> org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
>         org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
>        
> org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>        
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>         net.smartlab.web.ActionServlet.process(ActionServlet.java:64)
>        
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         net.smartlab.web.auth.ActionFilter.doFilter(ActionFilter.java:72)
>         net.smartlab.geoloc.SwitchFilter.doFilter(SwitchFilter.java:61)
>        
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>
>
> note The full stack trace of the root cause is available in the
> JBossWeb/2.0.1.GA logs.
>
> PS: english is not my native language, so I'm sorry for my espressions
>
>  
Hi Gianfranco,
can you please double check the password stored in the database for that
user is NOT NULL? The line throwing the NullPointerException already
checks for null values on all parameters but on password retrieved from
database.

To be completely sure please grab the query hibernate issue to retrieve
the user's datas and double check the returned values.

Originally the database script was using a NOT NULL constraint on the
password column.....have you changed that constraint?

Please let us know how things evolve


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
smartweb-user mailing list
smartweb-user@...
https://lists.sourceforge.net/lists/listinfo/smartweb-user

smime.p7s (4K) Download Attachment

Re: [Smartweb-user] [AUTH] problem with security.xml and login

by svetrini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
I looked at the log you send me, and I found a problem inside the PasswordAuthenticationHandler.
line 81 on the source code leaks of a null control on credential's secret before the lenght test.

I think you have misconfigured the user password on the db.

Bye

2008/10/13 g.imbrogno <gimbrogno@...>

Hi all,

I am a new user of this framework and I have some problems with the users
authentication. First of all, I'm using smartweb auth v. 0.8.1, and I have
modified the name of smartweb.jar.xml in security.xml, under suggestion of a
developer, but after this change I am not able to do a correct login. If I
use the name of "smartweb.jar.xml" I can login, but the roles defined in the
configuration file are not met. Can anyone helps me? Thanks a lot in
advance...

Below the stack-trace of the error:
type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

javax.servlet.ServletException:
net.smartlab.web.auth.AuthenticationException:
java.lang.NullPointerException

org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
       net.smartlab.web.ActionServlet.process(ActionServlet.java:64)

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       net.smartlab.web.auth.ActionFilter.doFilter(ActionFilter.java:72)
       net.smartlab.geoloc.SwitchFilter.doFilter(SwitchFilter.java:61)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

net.smartlab.web.auth.AuthenticationException:
java.lang.NullPointerException
       net.smartlab.web.auth.Domain.login(Domain.java:331)

net.smartlab.web.auth.AbstractUserAction.login(AbstractUserAction.java:115)
       sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       java.lang.reflect.Method.invoke(Unknown Source)
       net.smartlab.web.DynaAction.execute(DynaAction.java:173)
       net.smartlab.web.Action.execute(Action.java:98)

org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)

org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)

org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
       org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
       org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
       net.smartlab.web.ActionServlet.process(ActionServlet.java:64)

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       net.smartlab.web.auth.ActionFilter.doFilter(ActionFilter.java:72)
       net.smartlab.geoloc.SwitchFilter.doFilter(SwitchFilter.java:61)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

java.lang.NullPointerException

net.smartlab.web.auth.handlers.PasswordAuthenticationHandler.onLogin(PasswordAuthenticationHandler.java:81)
       net.smartlab.web.auth.Domain.login(Domain.java:325)

net.smartlab.web.auth.AbstractUserAction.login(AbstractUserAction.java:115)
       sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       java.lang.reflect.Method.invoke(Unknown Source)
       net.smartlab.web.DynaAction.execute(DynaAction.java:173)
       net.smartlab.web.Action.execute(Action.java:98)

org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)

org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)

org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
       org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
       org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
       net.smartlab.web.ActionServlet.process(ActionServlet.java:64)

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       net.smartlab.web.auth.ActionFilter.doFilter(ActionFilter.java:72)
       net.smartlab.geoloc.SwitchFilter.doFilter(SwitchFilter.java:61)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


note The full stack trace of the root cause is available in the
JBossWeb/2.0.1.GA logs.

PS: english is not my native language, so I'm sorry for my espressions

--
View this message in context: http://www.nabble.com/-AUTH--problem-with-security.xml-and-login-tp19950304s17546p19950304.html
Sent from the SmartWeb Users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
smartweb-user mailing list
smartweb-user@...
https://lists.sourceforge.net/lists/listinfo/smartweb-user


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
smartweb-user mailing list
smartweb-user@...
https://lists.sourceforge.net/lists/listinfo/smartweb-user