You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Thomas Franconville (JIRA)" <ji...@apache.org> on 2011/06/27 15:49:47 UTC

[jira] [Created] (WICKET-3836) regression on strategy to integrate cas authentication

regression on strategy to integrate cas authentication
------------------------------------------------------

                 Key: WICKET-3836
                 URL: https://issues.apache.org/jira/browse/WICKET-3836
             Project: Wicket
          Issue Type: Bug
          Components: wicket-auth-roles
    Affects Versions: 1.5-RC5.1
         Environment: jdk1.6
cas
unit test
            Reporter: Thomas Franconville
            Priority: Critical
         Attachments: CasWicket.zip

yes, It happens in org.apache.wicket.request.handler.PageProvider.getPageInstance() ,
but not for the WelcomePage, but the redirection page (RedirectPage).
the CASPageAuthorizationStrategy as we are not authentified a org.apache.wicket.RestartResponseAtInterceptPageException with in parameter an instance of RedirectPage.
On the second call of PageProvider.getPageInstance, the pageId is of 0, an all other parameters are nulls.

The run seems quite different on 1.5-RC4.2 version - There is only one call of the method PageProvider.getPageInstance() and it come after the CASPageAuthorizationStrategy.isPageAuthorized

Le 27/06/2011 11:24, Martin Grigorov a écrit :
> Put a breakpoint in
> org.apache.wicket.request.handler.PageProvider.getPageInstance() and
> see what happens.
> It seems the test tries to retrieve a page from the page store by id
> but there is no such.
>
> On Mon, Jun 27, 2011 at 12:20 PM, Thomas Franconville
> <tf...@tetraedge.com>  wrote:
>> Hi,
>>
>> Upgrading wicket from 1.5-RC4.2 to 1.5-RC5.1  make my Junit Test down with
>> the error 'Page expired'
>>
>> /**
>>   * Simple test using the WicketTester
>>   */
>> public class TestHomePage
>> {
>>     private WicketTester tester;
>>
>>     @Before
>>     public void setUp()
>>     {
>>         tester = new WicketTester(new MyApplication());
>>     }
>>
>>     @Test
>>     public void homepageRendersSuccessfully()
>>     {
>>         //start and render the test page
>>         tester.startPage(WelcomePage.class);
>>
>>         //assert rendered page class
>>         tester.assertRenderedPage(RedirectPage.class);
>>     }
>> }
>>
>> My application use a CASPageAuthorizationStrategy inspired of
>> http://www.lunikon.net/2009/11/24/integrating-cas-and-wicket/
>>
>>
>> Kind Regards
>>
>> Thomas


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (WICKET-3836) regression on strategy to integrate cas authentication

Posted by "Thomas Franconville (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Franconville updated WICKET-3836:
----------------------------------------

    Attachment: CasWicket.zip

quickstart maven app - version to change into the pom

> regression on strategy to integrate cas authentication
> ------------------------------------------------------
>
>                 Key: WICKET-3836
>                 URL: https://issues.apache.org/jira/browse/WICKET-3836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-RC5.1
>         Environment: jdk1.6
> cas
> unit test
>            Reporter: Thomas Franconville
>            Priority: Critical
>              Labels: cas, strategy, wicket
>         Attachments: CasWicket.zip
>
>
> yes, It happens in org.apache.wicket.request.handler.PageProvider.getPageInstance() ,
> but not for the WelcomePage, but the redirection page (RedirectPage).
> the CASPageAuthorizationStrategy as we are not authentified a org.apache.wicket.RestartResponseAtInterceptPageException with in parameter an instance of RedirectPage.
> On the second call of PageProvider.getPageInstance, the pageId is of 0, an all other parameters are nulls.
> The run seems quite different on 1.5-RC4.2 version - There is only one call of the method PageProvider.getPageInstance() and it come after the CASPageAuthorizationStrategy.isPageAuthorized
> Le 27/06/2011 11:24, Martin Grigorov a écrit :
> > Put a breakpoint in
> > org.apache.wicket.request.handler.PageProvider.getPageInstance() and
> > see what happens.
> > It seems the test tries to retrieve a page from the page store by id
> > but there is no such.
> >
> > On Mon, Jun 27, 2011 at 12:20 PM, Thomas Franconville
> > <tf...@tetraedge.com>  wrote:
> >> Hi,
> >>
> >> Upgrading wicket from 1.5-RC4.2 to 1.5-RC5.1  make my Junit Test down with
> >> the error 'Page expired'
> >>
> >> /**
> >>   * Simple test using the WicketTester
> >>   */
> >> public class TestHomePage
> >> {
> >>     private WicketTester tester;
> >>
> >>     @Before
> >>     public void setUp()
> >>     {
> >>         tester = new WicketTester(new MyApplication());
> >>     }
> >>
> >>     @Test
> >>     public void homepageRendersSuccessfully()
> >>     {
> >>         //start and render the test page
> >>         tester.startPage(WelcomePage.class);
> >>
> >>         //assert rendered page class
> >>         tester.assertRenderedPage(RedirectPage.class);
> >>     }
> >> }
> >>
> >> My application use a CASPageAuthorizationStrategy inspired of
> >> http://www.lunikon.net/2009/11/24/integrating-cas-and-wicket/
> >>
> >>
> >> Kind Regards
> >>
> >> Thomas

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (WICKET-3836) regression on strategy to integrate cas authentication

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-3836:
------------------------------------

    Priority: Major  (was: Critical)

Failing unit test is not that critical.

> regression on strategy to integrate cas authentication
> ------------------------------------------------------
>
>                 Key: WICKET-3836
>                 URL: https://issues.apache.org/jira/browse/WICKET-3836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-RC5.1
>         Environment: jdk1.6
> cas
> unit test
>            Reporter: Thomas Franconville
>              Labels: cas, strategy, wicket
>         Attachments: CasWicket.zip
>
>
> yes, It happens in org.apache.wicket.request.handler.PageProvider.getPageInstance() ,
> but not for the WelcomePage, but the redirection page (RedirectPage).
> the CASPageAuthorizationStrategy as we are not authentified a org.apache.wicket.RestartResponseAtInterceptPageException with in parameter an instance of RedirectPage.
> On the second call of PageProvider.getPageInstance, the pageId is of 0, an all other parameters are nulls.
> The run seems quite different on 1.5-RC4.2 version - There is only one call of the method PageProvider.getPageInstance() and it come after the CASPageAuthorizationStrategy.isPageAuthorized
> Le 27/06/2011 11:24, Martin Grigorov a écrit :
> > Put a breakpoint in
> > org.apache.wicket.request.handler.PageProvider.getPageInstance() and
> > see what happens.
> > It seems the test tries to retrieve a page from the page store by id
> > but there is no such.
> >
> > On Mon, Jun 27, 2011 at 12:20 PM, Thomas Franconville
> > <tf...@tetraedge.com>  wrote:
> >> Hi,
> >>
> >> Upgrading wicket from 1.5-RC4.2 to 1.5-RC5.1  make my Junit Test down with
> >> the error 'Page expired'
> >>
> >> /**
> >>   * Simple test using the WicketTester
> >>   */
> >> public class TestHomePage
> >> {
> >>     private WicketTester tester;
> >>
> >>     @Before
> >>     public void setUp()
> >>     {
> >>         tester = new WicketTester(new MyApplication());
> >>     }
> >>
> >>     @Test
> >>     public void homepageRendersSuccessfully()
> >>     {
> >>         //start and render the test page
> >>         tester.startPage(WelcomePage.class);
> >>
> >>         //assert rendered page class
> >>         tester.assertRenderedPage(RedirectPage.class);
> >>     }
> >> }
> >>
> >> My application use a CASPageAuthorizationStrategy inspired of
> >> http://www.lunikon.net/2009/11/24/integrating-cas-and-wicket/
> >>
> >>
> >> Kind Regards
> >>
> >> Thomas

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Assigned] (WICKET-3836) regression on strategy to integrate cas authentication

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov reassigned WICKET-3836:
---------------------------------------

    Assignee: Martin Grigorov

> regression on strategy to integrate cas authentication
> ------------------------------------------------------
>
>                 Key: WICKET-3836
>                 URL: https://issues.apache.org/jira/browse/WICKET-3836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-RC5.1
>         Environment: jdk1.6
> cas
> unit test
>            Reporter: Thomas Franconville
>            Assignee: Martin Grigorov
>              Labels: cas, strategy, wicket
>         Attachments: CasWicket.zip
>
>
> yes, It happens in org.apache.wicket.request.handler.PageProvider.getPageInstance() ,
> but not for the WelcomePage, but the redirection page (RedirectPage).
> the CASPageAuthorizationStrategy as we are not authentified a org.apache.wicket.RestartResponseAtInterceptPageException with in parameter an instance of RedirectPage.
> On the second call of PageProvider.getPageInstance, the pageId is of 0, an all other parameters are nulls.
> The run seems quite different on 1.5-RC4.2 version - There is only one call of the method PageProvider.getPageInstance() and it come after the CASPageAuthorizationStrategy.isPageAuthorized
> Le 27/06/2011 11:24, Martin Grigorov a écrit :
> > Put a breakpoint in
> > org.apache.wicket.request.handler.PageProvider.getPageInstance() and
> > see what happens.
> > It seems the test tries to retrieve a page from the page store by id
> > but there is no such.
> >
> > On Mon, Jun 27, 2011 at 12:20 PM, Thomas Franconville
> > <tf...@tetraedge.com>  wrote:
> >> Hi,
> >>
> >> Upgrading wicket from 1.5-RC4.2 to 1.5-RC5.1  make my Junit Test down with
> >> the error 'Page expired'
> >>
> >> /**
> >>   * Simple test using the WicketTester
> >>   */
> >> public class TestHomePage
> >> {
> >>     private WicketTester tester;
> >>
> >>     @Before
> >>     public void setUp()
> >>     {
> >>         tester = new WicketTester(new MyApplication());
> >>     }
> >>
> >>     @Test
> >>     public void homepageRendersSuccessfully()
> >>     {
> >>         //start and render the test page
> >>         tester.startPage(WelcomePage.class);
> >>
> >>         //assert rendered page class
> >>         tester.assertRenderedPage(RedirectPage.class);
> >>     }
> >> }
> >>
> >> My application use a CASPageAuthorizationStrategy inspired of
> >> http://www.lunikon.net/2009/11/24/integrating-cas-and-wicket/
> >>
> >>
> >> Kind Regards
> >>
> >> Thomas

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (WICKET-3836) regression on strategy to integrate cas authentication

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055600#comment-13055600 ] 

Martin Grigorov commented on WICKET-3836:
-----------------------------------------

The problem is that RedirectPage is not versioned, and thus never goes to the page stores.
I improved similar problem with Error pages in WICKET-3759.

Explanation: since the page is not versioned it is never stored. By using RedirectPolicy.ALWAYS_REDIRECT we instruct WebPageRenderer to use Redirect_To_RENDER strategy, but this strategy expects that the page is stored. The solution is to use AUTO_REDIRECT policy and let WebPageRenderer decide which redirect strategy to use. This way it will use the recommended redirect_to_buffer strategy and render the page markup from StoredResponsesMap (BufferedResponseMapper).

The fix is coming.

> regression on strategy to integrate cas authentication
> ------------------------------------------------------
>
>                 Key: WICKET-3836
>                 URL: https://issues.apache.org/jira/browse/WICKET-3836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-RC5.1
>         Environment: jdk1.6
> cas
> unit test
>            Reporter: Thomas Franconville
>            Assignee: Martin Grigorov
>              Labels: cas, strategy, wicket
>         Attachments: CasWicket.zip
>
>
> yes, It happens in org.apache.wicket.request.handler.PageProvider.getPageInstance() ,
> but not for the WelcomePage, but the redirection page (RedirectPage).
> the CASPageAuthorizationStrategy as we are not authentified a org.apache.wicket.RestartResponseAtInterceptPageException with in parameter an instance of RedirectPage.
> On the second call of PageProvider.getPageInstance, the pageId is of 0, an all other parameters are nulls.
> The run seems quite different on 1.5-RC4.2 version - There is only one call of the method PageProvider.getPageInstance() and it come after the CASPageAuthorizationStrategy.isPageAuthorized
> Le 27/06/2011 11:24, Martin Grigorov a écrit :
> > Put a breakpoint in
> > org.apache.wicket.request.handler.PageProvider.getPageInstance() and
> > see what happens.
> > It seems the test tries to retrieve a page from the page store by id
> > but there is no such.
> >
> > On Mon, Jun 27, 2011 at 12:20 PM, Thomas Franconville
> > <tf...@tetraedge.com>  wrote:
> >> Hi,
> >>
> >> Upgrading wicket from 1.5-RC4.2 to 1.5-RC5.1  make my Junit Test down with
> >> the error 'Page expired'
> >>
> >> /**
> >>   * Simple test using the WicketTester
> >>   */
> >> public class TestHomePage
> >> {
> >>     private WicketTester tester;
> >>
> >>     @Before
> >>     public void setUp()
> >>     {
> >>         tester = new WicketTester(new MyApplication());
> >>     }
> >>
> >>     @Test
> >>     public void homepageRendersSuccessfully()
> >>     {
> >>         //start and render the test page
> >>         tester.startPage(WelcomePage.class);
> >>
> >>         //assert rendered page class
> >>         tester.assertRenderedPage(RedirectPage.class);
> >>     }
> >> }
> >>
> >> My application use a CASPageAuthorizationStrategy inspired of
> >> http://www.lunikon.net/2009/11/24/integrating-cas-and-wicket/
> >>
> >>
> >> Kind Regards
> >>
> >> Thomas

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Issue Comment Edited] (WICKET-3836) regression on strategy to integrate cas authentication

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055600#comment-13055600 ] 

Martin Grigorov edited comment on WICKET-3836 at 6/27/11 4:18 PM:
------------------------------------------------------------------

The problem is that RedirectPage is not versioned, and thus never goes to the page stores.
I improved similar problem with Error pages in WICKET-3759.

Explanation: since the page is not versioned it is never stored. By using RedirectPolicy.ALWAYS_REDIRECT we instruct WebPageRenderer to use Redirect_To_RENDER strategy, but this strategy expects that the page is stored. The solution is to use AUTO_REDIRECT policy and let WebPageRenderer decide which render strategy to use. This way it will use the recommended redirect_to_buffer strategy and render the page markup from StoredResponsesMap (BufferedResponseMapper).

The fix is coming.

      was (Author: mgrigorov):
    The problem is that RedirectPage is not versioned, and thus never goes to the page stores.
I improved similar problem with Error pages in WICKET-3759.

Explanation: since the page is not versioned it is never stored. By using RedirectPolicy.ALWAYS_REDIRECT we instruct WebPageRenderer to use Redirect_To_RENDER strategy, but this strategy expects that the page is stored. The solution is to use AUTO_REDIRECT policy and let WebPageRenderer decide which redirect strategy to use. This way it will use the recommended redirect_to_buffer strategy and render the page markup from StoredResponsesMap (BufferedResponseMapper).

The fix is coming.
  
> regression on strategy to integrate cas authentication
> ------------------------------------------------------
>
>                 Key: WICKET-3836
>                 URL: https://issues.apache.org/jira/browse/WICKET-3836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-RC5.1
>         Environment: jdk1.6
> cas
> unit test
>            Reporter: Thomas Franconville
>            Assignee: Martin Grigorov
>              Labels: cas, strategy, wicket
>             Fix For: 1.5-RC6
>
>         Attachments: CasWicket.zip
>
>
> yes, It happens in org.apache.wicket.request.handler.PageProvider.getPageInstance() ,
> but not for the WelcomePage, but the redirection page (RedirectPage).
> the CASPageAuthorizationStrategy as we are not authentified a org.apache.wicket.RestartResponseAtInterceptPageException with in parameter an instance of RedirectPage.
> On the second call of PageProvider.getPageInstance, the pageId is of 0, an all other parameters are nulls.
> The run seems quite different on 1.5-RC4.2 version - There is only one call of the method PageProvider.getPageInstance() and it come after the CASPageAuthorizationStrategy.isPageAuthorized
> Le 27/06/2011 11:24, Martin Grigorov a écrit :
> > Put a breakpoint in
> > org.apache.wicket.request.handler.PageProvider.getPageInstance() and
> > see what happens.
> > It seems the test tries to retrieve a page from the page store by id
> > but there is no such.
> >
> > On Mon, Jun 27, 2011 at 12:20 PM, Thomas Franconville
> > <tf...@tetraedge.com>  wrote:
> >> Hi,
> >>
> >> Upgrading wicket from 1.5-RC4.2 to 1.5-RC5.1  make my Junit Test down with
> >> the error 'Page expired'
> >>
> >> /**
> >>   * Simple test using the WicketTester
> >>   */
> >> public class TestHomePage
> >> {
> >>     private WicketTester tester;
> >>
> >>     @Before
> >>     public void setUp()
> >>     {
> >>         tester = new WicketTester(new MyApplication());
> >>     }
> >>
> >>     @Test
> >>     public void homepageRendersSuccessfully()
> >>     {
> >>         //start and render the test page
> >>         tester.startPage(WelcomePage.class);
> >>
> >>         //assert rendered page class
> >>         tester.assertRenderedPage(RedirectPage.class);
> >>     }
> >> }
> >>
> >> My application use a CASPageAuthorizationStrategy inspired of
> >> http://www.lunikon.net/2009/11/24/integrating-cas-and-wicket/
> >>
> >>
> >> Kind Regards
> >>
> >> Thomas

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (WICKET-3836) regression on strategy to integrate cas authentication

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3836.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-RC6

> regression on strategy to integrate cas authentication
> ------------------------------------------------------
>
>                 Key: WICKET-3836
>                 URL: https://issues.apache.org/jira/browse/WICKET-3836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-RC5.1
>         Environment: jdk1.6
> cas
> unit test
>            Reporter: Thomas Franconville
>            Assignee: Martin Grigorov
>              Labels: cas, strategy, wicket
>             Fix For: 1.5-RC6
>
>         Attachments: CasWicket.zip
>
>
> yes, It happens in org.apache.wicket.request.handler.PageProvider.getPageInstance() ,
> but not for the WelcomePage, but the redirection page (RedirectPage).
> the CASPageAuthorizationStrategy as we are not authentified a org.apache.wicket.RestartResponseAtInterceptPageException with in parameter an instance of RedirectPage.
> On the second call of PageProvider.getPageInstance, the pageId is of 0, an all other parameters are nulls.
> The run seems quite different on 1.5-RC4.2 version - There is only one call of the method PageProvider.getPageInstance() and it come after the CASPageAuthorizationStrategy.isPageAuthorized
> Le 27/06/2011 11:24, Martin Grigorov a écrit :
> > Put a breakpoint in
> > org.apache.wicket.request.handler.PageProvider.getPageInstance() and
> > see what happens.
> > It seems the test tries to retrieve a page from the page store by id
> > but there is no such.
> >
> > On Mon, Jun 27, 2011 at 12:20 PM, Thomas Franconville
> > <tf...@tetraedge.com>  wrote:
> >> Hi,
> >>
> >> Upgrading wicket from 1.5-RC4.2 to 1.5-RC5.1  make my Junit Test down with
> >> the error 'Page expired'
> >>
> >> /**
> >>   * Simple test using the WicketTester
> >>   */
> >> public class TestHomePage
> >> {
> >>     private WicketTester tester;
> >>
> >>     @Before
> >>     public void setUp()
> >>     {
> >>         tester = new WicketTester(new MyApplication());
> >>     }
> >>
> >>     @Test
> >>     public void homepageRendersSuccessfully()
> >>     {
> >>         //start and render the test page
> >>         tester.startPage(WelcomePage.class);
> >>
> >>         //assert rendered page class
> >>         tester.assertRenderedPage(RedirectPage.class);
> >>     }
> >> }
> >>
> >> My application use a CASPageAuthorizationStrategy inspired of
> >> http://www.lunikon.net/2009/11/24/integrating-cas-and-wicket/
> >>
> >>
> >> Kind Regards
> >>
> >> Thomas

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira