[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-4152) HTTP BASIC authentication fails with exception during embedded container testing

Christian Bauer (JIRA) jira-events at lists.jboss.org
Mon May 25 13:41:56 EDT 2009

     [ https://jira.jboss.org/jira/browse/JBSEAM-4152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Bauer closed JBSEAM-4152.

    Fix Version/s: 2.1.2
                       (was: 2.2.0.CR1)
       Resolution: Done

Fixed this for 2.1.2.

Anything but REST request processing wasn't affected, and only the test environment had a bug.

The SeamResourceTest(s) did not use the right MockHttpSession, we currently need to set the instance manually and obtain it from AbstractSeamTest.session - this also means that you can only run ResourceRequest's in actual test methods because @BeforeMethod in SeamTest needs to run to initialize the Session. Changing this will be one of the goals when refactoring Seam 2.2 mock support.

Jozef, the BASIC authentication header value is case sensitive, it has to be "Basic".

I've enabled all security tests and /examples/tasks now passes completely.

> HTTP BASIC authentication fails with exception during embedded container testing
> --------------------------------------------------------------------------------
>                 Key: JBSEAM-4152
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4152
>             Project: Seam
>          Issue Type: Bug
>          Components: Security, WS
>         Environment: JDK 5
> Seam 2_1 branch
>            Reporter: Jozef Hartinger
>            Assignee: Christian Bauer
>            Priority: Critical
>             Fix For: 2.1.2
> Authentication works fine when the application is deployed to a standalone container (JBoss 4.2.3.GA) and tested manually. Following exception is however thrown during testrun in embedded container. To reproduce uncomment SecurityTest in /examples/restbay/src/org/jboss/seam/example/restbay/test/testng.xml and run "ant test" in /examples/restbay
> [testng] FAILED: basicAuthTest
>    [testng] javax.servlet.ServletException: Identity not found - please ensure that the Identity component is created on startup.
>    [testng]     at org.jboss.seam.web.AuthenticationFilter.processBasicAuth(AuthenticationFilter.java:137)
>    [testng]     at org.jboss.seam.web.AuthenticationFilter.doFilter(AuthenticationFilter.java:121)
>    [testng]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
>    [testng]     at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
>    [testng]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
>    [testng]     at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
>    [testng]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
>    [testng]     at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
>    [testng]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
>    [testng]     at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
>    [testng]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
>    [testng]     at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
>    [testng]     at org.jboss.seam.example.restbay.test.fwk.ResourceSeamTest$ResourceRequest.run(ResourceSeamTest.java:76)
>    [testng]     at org.jboss.seam.example.restbay.test.SecurityTest.basicAuthTest(SecurityTest.java:15)
>    [testng] ... Removed 22 stack frames

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list