You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jacek Laskowski <jl...@apache.org> on 2005/02/21 14:33:58 UTC

Tomcat 5.5.8-alpha breaks JAASSecurityTest.testGoodAuthentication test

Hi,

Does anyone know why upgrading Tomcat to 5.5.8-alpha version breaks the 
JAASSecurityTest.testGoodAuthentication test of the tomcat module?

To recreate the issue change etc/project.properties so that jasper and 
tomcat libs are of 5.5.8-alpha version and do maven test:test beneath 
modules/tomcat directory. Don't forget to be online the first time to 
have Maven download the jars.

It prints out the following message:

INFO: Installed Geronimo login configuration
2005-02-21 12:03:41 org.apache.geronimo.security.SecurityServiceImpl <init>
INFO: JACC factory registered
2005-02-21 12:03:41 
org.apache.geronimo.security.jaas.GeronimoLoginConfiguration 
addConfiguration
INFO: Added Application Configuration Entry demo-properties-realm
2005-02-21 12:03:41 org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name securetest
2005-02-21 12:03:41 org.apache.geronimo.tomcat.TomcatWebAppContext doStart
INFO: TomcatWebAppContext started
2005-02-21 12:03:41 org.apache.geronimo.tomcat.TomcatJAASRealm authenticate
WARNING: Login exception authenticating username "alan"
javax.security.auth.login.LoginException: Login Failure: all modules ignored
         at 
javax.security.auth.login.LoginContext.invoke(LoginContext.java:921)
         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.apache.geronimo.tomcat.TomcatJAASRealm.authenticate(TomcatJAASRealm.java:109)
         at 
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:256)
         at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:391)
         at 
org.apache.geronimo.tomcat.valve.PolicyContextValve.invoke(PolicyContextValve.java:46)
         at 
org.apache.geronimo.tomcat.valve.TransactionContextValve.invoke(TransactionContextValve.java:54)
         at 
org.apache.geronimo.tomcat.valve.ComponentContextValve.invoke(ComponentContextValve.java:47)
         at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
         at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:743)
         at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)

and

------------- ---------------- ---------------
Testcase: 
testGoodAuthentication(org.apache.geronimo.tomcat.JAASSecurityTest):  FAILED
expected:<200> but was:<404>
junit.framework.AssertionFailedError: expected:<200> but was:<404>
         at 
org.apache.geronimo.tomcat.JAASSecurityTest.testGoodAuthentication(JAASSecurityTest.java:181)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

Jacek


Re: Tomcat 5.5.8-alpha breaks JAASSecurityTest.testGoodAuthentication test

Posted by Jacek Laskowski <jl...@apache.org>.
Alan D. Cabrera wrote:
> Sorry, I didn't catch that sentence.
> 
> -1 on commenting out the test for alpha software.
> <rant>
> We have an, IMHO, awful tradition of commenting out tests that do not 
> pass w/ out filing Jira issues.  We need to always file a JIRA issue w/ 
> any test that is commented out.  Also there should be a cross reference 
> to that JIRA issue in the commented out test.
> </rant>

Yes, yes, yes. I don't want to comment out anything that is a test. That 
wasn't my intent. I meant to say that my knowledge of JAAS is so limited 
that the only outcome would be to comment the test. Sorry for the confusion.

> Alan

Jacek


Re: Tomcat 5.5.8-alpha breaks JAASSecurityTest.testGoodAuthentication test

Posted by "Alan D. Cabrera" <ad...@toolazydogs.com>.
Sorry, I didn't catch that sentence.

-1 on commenting out the test for alpha software. 

<rant>
We have an, IMHO, awful tradition of commenting out tests that do not 
pass w/ out filing Jira issues.  We need to always file a JIRA issue w/ 
any test that is commented out.  Also there should be a cross reference 
to that JIRA issue in the commented out test.
</rant>

Regards,
Alan

Jeff Genender wrote:

> Do we really want to comment out the test for alpha software?  I can 
> look at the changes between 5.5.7 and 5.5.8 and see the differences.
>
> Jeff
>
> Jacek Laskowski wrote:
>
>> Jeff Genender wrote:
>>
>>> Jacek,
>>>
>>> Does this work in 5.5.7?
>>
>>
>>
>> Well, I think so. Noone reported any troubles since 5.5.7 upgrade. 
>> I'm on IRC right now and have been chatting with Alan.
>>
>> I'm going to take a look at it later today, but am uncertain if the 
>> outcome may be better than commenting out the test that fails :(
>>
>> Testing it out once again with Tomcat 5.5.7 to see how it'll behave.
>>
>>> Jeff
>>
>>
>>
>> Jacek
>
>


Re: Tomcat 5.5.8-alpha breaks JAASSecurityTest.testGoodAuthentication test

Posted by Jeff Genender <jg...@apache.org>.
Do we really want to comment out the test for alpha software?  I can 
look at the changes between 5.5.7 and 5.5.8 and see the differences.

Jeff

Jacek Laskowski wrote:
> Jeff Genender wrote:
> 
>> Jacek,
>>
>> Does this work in 5.5.7?
> 
> 
> Well, I think so. Noone reported any troubles since 5.5.7 upgrade. I'm 
> on IRC right now and have been chatting with Alan.
> 
> I'm going to take a look at it later today, but am uncertain if the 
> outcome may be better than commenting out the test that fails :(
> 
> Testing it out once again with Tomcat 5.5.7 to see how it'll behave.
> 
>> Jeff
> 
> 
> Jacek

-- 
Jeff Genender
http://geronimo.apache.org


Re: Tomcat 5.5.8-alpha breaks JAASSecurityTest.testGoodAuthentication test

Posted by Jacek Laskowski <jl...@apache.org>.
Jeff Genender wrote:
> Jacek,
> 
> Does this work in 5.5.7?

Well, I think so. Noone reported any troubles since 5.5.7 upgrade. I'm 
on IRC right now and have been chatting with Alan.

I'm going to take a look at it later today, but am uncertain if the 
outcome may be better than commenting out the test that fails :(

Testing it out once again with Tomcat 5.5.7 to see how it'll behave.

> Jeff

Jacek


Re: Tomcat 5.5.8-alpha breaks JAASSecurityTest.testGoodAuthentication test

Posted by Jeff Genender <jg...@apache.org>.
Jacek,

Does this work in 5.5.7?

Jeff

Jacek Laskowski wrote:
> Hi,
> 
> Does anyone know why upgrading Tomcat to 5.5.8-alpha version breaks the 
> JAASSecurityTest.testGoodAuthentication test of the tomcat module?
> 
> To recreate the issue change etc/project.properties so that jasper and 
> tomcat libs are of 5.5.8-alpha version and do maven test:test beneath 
> modules/tomcat directory. Don't forget to be online the first time to 
> have Maven download the jars.
> 
> It prints out the following message:
> 
> INFO: Installed Geronimo login configuration
> 2005-02-21 12:03:41 org.apache.geronimo.security.SecurityServiceImpl <init>
> INFO: JACC factory registered
> 2005-02-21 12:03:41 
> org.apache.geronimo.security.jaas.GeronimoLoginConfiguration 
> addConfiguration
> INFO: Added Application Configuration Entry demo-properties-realm
> 2005-02-21 12:03:41 org.apache.catalina.realm.JAASRealm setContainer
> INFO: Set JAAS app name securetest
> 2005-02-21 12:03:41 org.apache.geronimo.tomcat.TomcatWebAppContext doStart
> INFO: TomcatWebAppContext started
> 2005-02-21 12:03:41 org.apache.geronimo.tomcat.TomcatJAASRealm authenticate
> WARNING: Login exception authenticating username "alan"
> javax.security.auth.login.LoginException: Login Failure: all modules 
> ignored
>         at 
> javax.security.auth.login.LoginContext.invoke(LoginContext.java:921)
>         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.apache.geronimo.tomcat.TomcatJAASRealm.authenticate(TomcatJAASRealm.java:109) 
> 
>         at 
> org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:256) 
> 
>         at 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:391) 
> 
>         at 
> org.apache.geronimo.tomcat.valve.PolicyContextValve.invoke(PolicyContextValve.java:46) 
> 
>         at 
> org.apache.geronimo.tomcat.valve.TransactionContextValve.invoke(TransactionContextValve.java:54) 
> 
>         at 
> org.apache.geronimo.tomcat.valve.ComponentContextValve.invoke(ComponentContextValve.java:47) 
> 
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
> 
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 
> 
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 
> 
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>         at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
>         at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:743) 
> 
>         at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) 
> 
>         at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) 
> 
>         at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 
> 
>         at java.lang.Thread.run(Thread.java:595)
> 
> and
> 
> ------------- ---------------- ---------------
> Testcase: 
> testGoodAuthentication(org.apache.geronimo.tomcat.JAASSecurityTest):  
> FAILED
> expected:<200> but was:<404>
> junit.framework.AssertionFailedError: expected:<200> but was:<404>
>         at 
> org.apache.geronimo.tomcat.JAASSecurityTest.testGoodAuthentication(JAASSecurityTest.java:181) 
> 
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
> 
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
> 
> 
> Jacek

-- 
Jeff Genender
http://geronimo.apache.org