RE: @Secured annotation handling

2009-07-24 Thread Eldred Mullany
Hi Modified my RequestFiler in my AppModule to handle the @secured
annotation which seemed to have done the trick. If its not null return
true and continue with request response.  

public boolean service(final Request request, final Response response,
final RequestHandler handler) throws IOException, TapestryException {

Component page = componentSource.getPage(pageName);
Secured secured = page.getClass().getAnnotation(Secured.class);

// if page has Secured annotation, send
// redirect to login page...
if (secured != null) {
log.warn(String.format(Page: %s requires user to be
logged in,  redirecting to home page..., pageName));
response.sendRedirect(request.getContextPath() +
loginPage);
// return true to indicate we have processed the request
   // and so the pipeline is finished
return true;
}   
.
}
..


-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: Friday, July 24, 2009 6:39 AM
To: Tapestry users
Subject: Re: @Secured annotation handling

Em Thu, 23 Jul 2009 17:53:59 -0300, Norman Franke nor...@myasd.com  
escreveu:

 I've got it working, but note that many event actions are called on
 the page before it figures out that it needs to secure the page. I'd
 run into errors before the secure tag kicked in and redirected to my
 login page. Odd, but workable.

Maybe because its current implementation only does the checks *after*  
onActivate() is invoked.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: @Secured annotation handling

2009-07-23 Thread Eldred Mullany
Has anyone got come code snippets for me on integrating T5.1.0.5 and
Spring-Tapestry 2.1.0

Thanks

-Original Message-
From: Eldred Mullany 
Sent: Wednesday, July 22, 2009 1:55 PM
To: 'Tapestry users'
Subject: @Secured annotation handling 

Hi All

I am spinning my head here trying to get Spring-Tapestry-security:2.1.0
to work with Tapestry 5.1.0.5 . I have done the upgrade to 2.1.0 and
when place my @secured annotation on the top of my class name is throws
an access denied exception: 

Following that intercept.AbstractSecurityInterceptor could not validate
configuration attributes as the ObjectDefinitionSource did not return a
ConfigAttributeDefinition collection. 

Where am I supposed to configure configuration attributes if any? 

From what I have read on
http://www.localhost.nu/java/tapestry-spring-security/conf.html. 

Is there referring to the Contributions to the
FilterSecurityInterceptor. 


Thanking you in advance 

Eldred

  


Here is my output screen:  


[WARN] intercept.AbstractSecurityInterceptor Could not validate
configuration attributes as the ObjectDefinitionSource did not return a
ConfigAttributeDefinition collection
[ERROR] billpmts.Bills Render queue error in
BeginRender[billpmts/Bills]: Access is denied
org.apache.tapestry5.ioc.internal.util.TapestryException: Access is
denied
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(
ComponentPageElementImpl.java:948)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$
400(ComponentPageElementImpl.java:49)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$Abstrac
tPhase.callback(ComponentPageElementImpl.java:159)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRe
nderPhase.render(ComponentPageElementImpl.java:211)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueIm
pl.java:74)
at
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRe
nderQueueImpl.java:121)
at
$PageRenderQueue_122a244d649.render($PageRenderQueue_122a244d649.java)
at
$PageRenderQueue_122a244d62b.render($PageRenderQueue_122a244d62b.java)
at
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMa
rkup(MarkupRendererTerminator.java:37)
at
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryMod
ule.java:1748)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryMod
ule.java:1732)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryMod
ule.java:1714)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryMod
ule.java:1700)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryMod
ule.java:1681)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryMod
ule.java:1662)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
$MarkupRenderer_122a244d648.renderMarkup($MarkupRenderer_122a244d648.jav
a)
at
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPage
Markup(PageMarkupRendererImpl.java:64)
at
$PageMarkupRenderer_122a244d645.renderPageMarkup($PageMarkupRenderer_122
a244d645.java)
at
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPa
geResponse(PageResponseRendererImpl.java:61)
at
$PageResponseRenderer_122a244d641.renderPageResponse($PageResponseRender
er_122a244d641.java)
at
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.hand
le(PageRenderRequestHandlerImpl.java:63)
at
org.apache.tapestry5.services.TapestryModule$33.handle(TapestryModule.ja
va:1943)
at
$PageRenderRequestHandler_122a244d642.handle($PageRenderRequestHandler_1
22a244d642.java)
at
$PageRenderRequestHandler_122a244d634.handle($PageRenderRequestHandler_1
22a244d634.java)
at
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator
.handlePageRender(ComponentRequestHandlerTerminator.java:48)
at
$ComponentRequestHandler_122a244d638.handlePageRender($ComponentRequestH
andler_122a244d638.java)
at
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(Pag
eRenderDispatcher.java:45)
at
$Dispatcher_122a244d639.dispatch($Dispatcher_122a244d639.java)
at
$Dispatcher_122a244d5d6.dispatch($Dispatcher_122a244d5d6.java)
at
org.apache.tapestry5.services.TapestryModule

Re: @Secured annotation handling

2009-07-23 Thread Michael Gerzabek
Don't get the point here. You secured a page? And if you want to access 
it, you get the AccessDeniedEx? This seems to be a valid case. The


[WARN] intercept.AbstractSecurityInterceptor Could not validate
configuration attributes as the ObjectDefinitionSource did not return a
ConfigAttributeDefinition collection

is a warning. It doesn't prevent TSS from functioning properly. Please 
follow the advice from the link you included with your previous mail. 
Many people got TSS working from that description


or

post your page class and your Module class so that we can see what 
happens here.


/M

Eldred Mullany schrieb:

Has anyone got come code snippets for me on integrating T5.1.0.5 and
Spring-Tapestry 2.1.0

Thanks

-Original Message-
From: Eldred Mullany 
Sent: Wednesday, July 22, 2009 1:55 PM

To: 'Tapestry users'
Subject: @Secured annotation handling 


Hi All

I am spinning my head here trying to get Spring-Tapestry-security:2.1.0
to work with Tapestry 5.1.0.5 . I have done the upgrade to 2.1.0 and
when place my @secured annotation on the top of my class name is throws
an access denied exception: 


Following that intercept.AbstractSecurityInterceptor could not validate
configuration attributes as the ObjectDefinitionSource did not return a
ConfigAttributeDefinition collection. 

Where am I supposed to configure configuration attributes if any? 


From what I have read on
http://www.localhost.nu/java/tapestry-spring-security/conf.html. 


Is there referring to the Contributions to the
FilterSecurityInterceptor. 



Thanking you in advance 


Eldred

  



Here is my output screen:  



[WARN] intercept.AbstractSecurityInterceptor Could not validate
configuration attributes as the ObjectDefinitionSource did not return a
ConfigAttributeDefinition collection
[ERROR] billpmts.Bills Render queue error in
BeginRender[billpmts/Bills]: Access is denied
org.apache.tapestry5.ioc.internal.util.TapestryException: Access is
denied
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(
ComponentPageElementImpl.java:948)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$
400(ComponentPageElementImpl.java:49)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$Abstrac
tPhase.callback(ComponentPageElementImpl.java:159)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRe
nderPhase.render(ComponentPageElementImpl.java:211)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueIm
pl.java:74)
at
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRe
nderQueueImpl.java:121)
at
$PageRenderQueue_122a244d649.render($PageRenderQueue_122a244d649.java)
at
$PageRenderQueue_122a244d62b.render($PageRenderQueue_122a244d62b.java)
at
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMa
rkup(MarkupRendererTerminator.java:37)
at
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryMod
ule.java:1748)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryMod
ule.java:1732)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryMod
ule.java:1714)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryMod
ule.java:1700)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryMod
ule.java:1681)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryMod
ule.java:1662)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
$MarkupRenderer_122a244d648.renderMarkup($MarkupRenderer_122a244d648.jav
a)
at
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPage
Markup(PageMarkupRendererImpl.java:64)
at
$PageMarkupRenderer_122a244d645.renderPageMarkup($PageMarkupRenderer_122
a244d645.java)
at
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPa
geResponse(PageResponseRendererImpl.java:61)
at
$PageResponseRenderer_122a244d641.renderPageResponse($PageResponseRender
er_122a244d641.java)
at
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.hand
le(PageRenderRequestHandlerImpl.java:63)
at
org.apache.tapestry5.services.TapestryModule$33.handle(TapestryModule.ja
va:1943)
at
$PageRenderRequestHandler_122a244d642.handle($PageRenderRequestHandler_1
22a244d642.java)
at
$PageRenderRequestHandler_122a244d634

Re: @Secured annotation handling

2009-07-23 Thread Norman Franke
I've got it working, but note that many event actions are called on  
the page before it figures out that it needs to secure the page. I'd  
run into errors before the secure tag kicked in and redirected to my  
login page. Odd, but workable.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Jul 23, 2009, at 4:02 PM, Michael Gerzabek wrote:

Don't get the point here. You secured a page? And if you want to  
access it, you get the AccessDeniedEx? This seems to be a valid  
case. The


[WARN] intercept.AbstractSecurityInterceptor Could not validate
configuration attributes as the ObjectDefinitionSource did not  
return a

ConfigAttributeDefinition collection

is a warning. It doesn't prevent TSS from functioning properly.  
Please follow the advice from the link you included with your  
previous mail. Many people got TSS working from that description


or

post your page class and your Module class so that we can see what  
happens here.


/M

Eldred Mullany schrieb:

Has anyone got come code snippets for me on integrating T5.1.0.5 and
Spring-Tapestry 2.1.0

Thanks

-Original Message-
From: Eldred Mullany Sent: Wednesday, July 22, 2009 1:55 PM
To: 'Tapestry users'
Subject: @Secured annotation handling
Hi All

I am spinning my head here trying to get Spring-Tapestry-security: 
2.1.0

to work with Tapestry 5.1.0.5 . I have done the upgrade to 2.1.0 and
when place my @secured annotation on the top of my class name is  
throws

an access denied exception:
Following that intercept.AbstractSecurityInterceptor could not  
validate
configuration attributes as the ObjectDefinitionSource did not  
return a

ConfigAttributeDefinition collection.
Where am I supposed to configure configuration attributes if any?
From what I have read on
http://www.localhost.nu/java/tapestry-spring-security/conf.html.
Is there referring to the Contributions to the
FilterSecurityInterceptor.

Thanking you in advance
Eldred



Here is my output screen:

[WARN] intercept.AbstractSecurityInterceptor Could not validate
configuration attributes as the ObjectDefinitionSource did not  
return a

ConfigAttributeDefinition collection
[ERROR] billpmts.Bills Render queue error in
BeginRender[billpmts/Bills]: Access is denied
org.apache.tapestry5.ioc.internal.util.TapestryException: Access is
denied
at
org 
.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(

ComponentPageElementImpl.java:948)
at
org 
.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$

400(ComponentPageElementImpl.java:49)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl 
$Abstrac

tPhase.callback(ComponentPageElementImpl.java:159)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl 
$BeginRe

nderPhase.render(ComponentPageElementImpl.java:211)
at
org 
.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueIm

pl.java:74)
at
org 
.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRe

nderQueueImpl.java:121)
at
$ 
PageRenderQueue_122a244d649.render($PageRenderQueue_122a244d649.java)

at
$ 
PageRenderQueue_122a244d62b.render($PageRenderQueue_122a244d62b.java)

at
org 
.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMa

rkup(MarkupRendererTerminator.java:37)
at
org.apache.tapestry5.services.TapestryModule 
$27.renderMarkup(TapestryMod

ule.java:1748)
at
$ 
MarkupRenderer_122a244d64b 
.renderMarkup($MarkupRenderer_122a244d64b.jav

a)
at
org.apache.tapestry5.services.TapestryModule 
$26.renderMarkup(TapestryMod

ule.java:1732)
at
$ 
MarkupRenderer_122a244d64b 
.renderMarkup($MarkupRenderer_122a244d64b.jav

a)
at
org.apache.tapestry5.services.TapestryModule 
$25.renderMarkup(TapestryMod

ule.java:1714)
at
$ 
MarkupRenderer_122a244d64b 
.renderMarkup($MarkupRenderer_122a244d64b.jav

a)
at
org.apache.tapestry5.services.TapestryModule 
$24.renderMarkup(TapestryMod

ule.java:1700)
at
$ 
MarkupRenderer_122a244d64b 
.renderMarkup($MarkupRenderer_122a244d64b.jav

a)
at
org.apache.tapestry5.services.TapestryModule 
$23.renderMarkup(TapestryMod

ule.java:1681)
at
$ 
MarkupRenderer_122a244d64b 
.renderMarkup($MarkupRenderer_122a244d64b.jav

a)
at
org.apache.tapestry5.services.TapestryModule 
$22.renderMarkup(TapestryMod

ule.java:1662)
at
$ 
MarkupRenderer_122a244d64b 
.renderMarkup($MarkupRenderer_122a244d64b.jav

a)
at
$ 
MarkupRenderer_122a244d648 
.renderMarkup($MarkupRenderer_122a244d648.jav

a)
at
org 
.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPage

Markup(PageMarkupRendererImpl.java:64)
at
$ 
PageMarkupRenderer_122a244d645 
.renderPageMarkup($PageMarkupRenderer_122

a244d645.java)
at
org 
.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPa

geResponse(PageResponseRendererImpl.java:61

Re: @Secured annotation handling

2009-07-23 Thread Thiago H. de Paula Figueiredo
Em Thu, 23 Jul 2009 17:53:59 -0300, Norman Franke nor...@myasd.com  
escreveu:



I've got it working, but note that many event actions are called on
the page before it figures out that it needs to secure the page. I'd
run into errors before the secure tag kicked in and redirected to my
login page. Odd, but workable.


Maybe because its current implementation only does the checks *after*  
onActivate() is invoked.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



@Secured annotation handling

2009-07-22 Thread Eldred Mullany
Hi All

I am spinning my head here trying to get Spring-Tapestry-security:2.1.0
to work with Tapestry 5.1.0.5 . I have done the upgrade to 2.1.0 and
when place my @secured annotation on the top of my class name is throws
an access denied exception: 

Following that intercept.AbstractSecurityInterceptor could not validate
configuration attributes as the ObjectDefinitionSource did not return a
ConfigAttributeDefinition collection. 

Where am I supposed to configure configuration attributes if any? 

From what I have read on
http://www.localhost.nu/java/tapestry-spring-security/conf.html. 

Is there referring to the Contributions to the
FilterSecurityInterceptor. 


Thanking you in advance 

Eldred

  


Here is my output screen:  


[WARN] intercept.AbstractSecurityInterceptor Could not validate
configuration attributes as the ObjectDefinitionSource did not return a
ConfigAttributeDefinition collection
[ERROR] billpmts.Bills Render queue error in
BeginRender[billpmts/Bills]: Access is denied
org.apache.tapestry5.ioc.internal.util.TapestryException: Access is
denied
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(
ComponentPageElementImpl.java:948)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$
400(ComponentPageElementImpl.java:49)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$Abstrac
tPhase.callback(ComponentPageElementImpl.java:159)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRe
nderPhase.render(ComponentPageElementImpl.java:211)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueIm
pl.java:74)
at
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRe
nderQueueImpl.java:121)
at
$PageRenderQueue_122a244d649.render($PageRenderQueue_122a244d649.java)
at
$PageRenderQueue_122a244d62b.render($PageRenderQueue_122a244d62b.java)
at
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMa
rkup(MarkupRendererTerminator.java:37)
at
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryMod
ule.java:1748)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryMod
ule.java:1732)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryMod
ule.java:1714)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryMod
ule.java:1700)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryMod
ule.java:1681)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryMod
ule.java:1662)
at
$MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav
a)
at
$MarkupRenderer_122a244d648.renderMarkup($MarkupRenderer_122a244d648.jav
a)
at
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPage
Markup(PageMarkupRendererImpl.java:64)
at
$PageMarkupRenderer_122a244d645.renderPageMarkup($PageMarkupRenderer_122
a244d645.java)
at
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPa
geResponse(PageResponseRendererImpl.java:61)
at
$PageResponseRenderer_122a244d641.renderPageResponse($PageResponseRender
er_122a244d641.java)
at
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.hand
le(PageRenderRequestHandlerImpl.java:63)
at
org.apache.tapestry5.services.TapestryModule$33.handle(TapestryModule.ja
va:1943)
at
$PageRenderRequestHandler_122a244d642.handle($PageRenderRequestHandler_1
22a244d642.java)
at
$PageRenderRequestHandler_122a244d634.handle($PageRenderRequestHandler_1
22a244d634.java)
at
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator
.handlePageRender(ComponentRequestHandlerTerminator.java:48)
at
$ComponentRequestHandler_122a244d638.handlePageRender($ComponentRequestH
andler_122a244d638.java)
at
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(Pag
eRenderDispatcher.java:45)
at
$Dispatcher_122a244d639.dispatch($Dispatcher_122a244d639.java)
at
$Dispatcher_122a244d5d6.dispatch($Dispatcher_122a244d5d6.java)
at
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.se
rvice(TapestryModule.java:245)
at
nu.localhost.tapestry5.springsecurity.services.internal.RequestFilterWra
pper$1.doFilter(RequestFilterWrapper.java:60)
at