You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kevin Menard <km...@servprise.com> on 2007/01/04 19:20:46 UTC

Tapestry-acegi auth

Hi,

I'm having some difficulty using tapestry-acegi. I can secure a page
fine, but I can't figure out how to allow a user to auth.
Unfortunately, my experience with Acegi in general is practically
non-existent, so I may just be doing something dumb there.

I have a page marked @Secured("ROLE_USER"), but when I access it, all I
get is org.acegisecurity.AccessDeniedException.

My HiveMind registry contains the following:

<implementation service-id="hivemind.acegi.dao.UserDetailsService">
	<invoke-factory>
		<construct
class="com.servprise.www.services.AuthorizationService" />
	</invoke-factory>
</implementation>
	
<contribution configuration-id="hivemind.acegi.AccessDecisionVoters">
	<voter object="instance:org.acegisecurity.vote.RoleVoter" />
</contribution>

with the UserDetailsService implementation basically being a no-op.
I've set a break point in the service and it never gets executed.

I am using both tapestry-acegi and hivemind-acegi-dao, for what it's
worth.  Any help would be much appreciated.

Thanks,
Kevin

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


Re: Tapestry-acegi auth

Posted by James Carman <ja...@carmanconsulting.com>.
Sorry, but I haven't had time to reply to this thread, but have you
looked at the Wiki page:

http://wiki.apache.org/tapestry/AcegiSpringJava5


On 1/5/07, Firas Adiler <ta...@idigna.com> wrote:
>  Hi Kevin,
>
> This exception is "thrown if an Authentication object does not hold a
> required authority". "ROLE_USER" is the authority you used to secure your
> pages. It seems that your Acegi configuration is not complete. I'm a
> beginner myself and found this page very helpful:
> http://www.tfo-eservices.eu/wb_tutorials/media/SpringAcegiTutorial/HTML/Spri
> ngAcegiTutorial-1_1-html.html
>
> Keep in mind, though, that the tutorial above uses spring-style
> configuration of acegi, i.e. using application context (xml) config file.
> Apparently, one could achieve the same result using tapestry-acegi and
> hivemind. I couldn't get it to work though. My current (working) acegi
> configuration is based on this guide:
> http://forum.springframework.org/showthread.php?t=24013&highlight=tapestry
>
>
> Hope this helps,
>
> </Firas>
>
> -----Original Message-----
> From: Kevin Menard [mailto:kmenard@servprise.com]
> Sent: Thursday, January 04, 2007 7:21 PM
> To: Tapestry users
> Subject: Tapestry-acegi auth
>
> Hi,
>
> I'm having some difficulty using tapestry-acegi. I can secure a page fine,
> but I can't figure out how to allow a user to auth.
> Unfortunately, my experience with Acegi in general is practically
> non-existent, so I may just be doing something dumb there.
>
> I have a page marked @Secured("ROLE_USER"), but when I access it, all I get
> is org.acegisecurity.AccessDeniedException.
>
> My HiveMind registry contains the following:
>
> <implementation service-id="hivemind.acegi.dao.UserDetailsService">
>         <invoke-factory>
>                 <construct
> class="com.servprise.www.services.AuthorizationService" />
>         </invoke-factory>
> </implementation>
>
> <contribution configuration-id="hivemind.acegi.AccessDecisionVoters">
>         <voter object="instance:org.acegisecurity.vote.RoleVoter" />
> </contribution>
>
> with the UserDetailsService implementation basically being a no-op.
> I've set a break point in the service and it never gets executed.
>
> I am using both tapestry-acegi and hivemind-acegi-dao, for what it's worth.
> Any help would be much appreciated.
>
> Thanks,
> Kevin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


RE: Tapestry-acegi auth

Posted by Firas Adiler <ta...@idigna.com>.
 Hi Kevin,

This exception is "thrown if an Authentication object does not hold a
required authority". "ROLE_USER" is the authority you used to secure your
pages. It seems that your Acegi configuration is not complete. I'm a
beginner myself and found this page very helpful:
http://www.tfo-eservices.eu/wb_tutorials/media/SpringAcegiTutorial/HTML/Spri
ngAcegiTutorial-1_1-html.html

Keep in mind, though, that the tutorial above uses spring-style
configuration of acegi, i.e. using application context (xml) config file.
Apparently, one could achieve the same result using tapestry-acegi and
hivemind. I couldn't get it to work though. My current (working) acegi
configuration is based on this guide:
http://forum.springframework.org/showthread.php?t=24013&highlight=tapestry


Hope this helps,

</Firas>

-----Original Message-----
From: Kevin Menard [mailto:kmenard@servprise.com] 
Sent: Thursday, January 04, 2007 7:21 PM
To: Tapestry users
Subject: Tapestry-acegi auth

Hi,

I'm having some difficulty using tapestry-acegi. I can secure a page fine,
but I can't figure out how to allow a user to auth.
Unfortunately, my experience with Acegi in general is practically
non-existent, so I may just be doing something dumb there.

I have a page marked @Secured("ROLE_USER"), but when I access it, all I get
is org.acegisecurity.AccessDeniedException.

My HiveMind registry contains the following:

<implementation service-id="hivemind.acegi.dao.UserDetailsService">
	<invoke-factory>
		<construct
class="com.servprise.www.services.AuthorizationService" />
	</invoke-factory>
</implementation>
	
<contribution configuration-id="hivemind.acegi.AccessDecisionVoters">
	<voter object="instance:org.acegisecurity.vote.RoleVoter" />
</contribution>

with the UserDetailsService implementation basically being a no-op.
I've set a break point in the service and it never gets executed.

I am using both tapestry-acegi and hivemind-acegi-dao, for what it's worth.
Any help would be much appreciated.

Thanks,
Kevin


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