users@glassfish.java.net

Re: EJB 3 RolesAllowed

From: Vijay Ramachandran <Vijay.Ramachandran_at_Sun.COM>
Date: Tue, 24 Oct 2006 10:43:57 -0700

Hi Ken,

Please get access to glassfish/appserv-tests workspace and checkout this
sample / test :
glassfish/appserv-tests/devtests/webservice/ejb_annotations/security/roles

Please let us know if this sample helps you make progress

Thanks

vijay

Kenneth Clark wrote:
>
> Hi
>
>
>
> I am emailing you out of sheer desperation.
>
>
>
> My problem:
>
> I have an EJB webservice that I would like to secure using the
> RolesAllowed annotation. I just can’t seem to get this working and I
> have looked high and low for tutorials or documentation and it is
> driving me mad.
>
>
>
> I noted that I have to add the authentication mechanism in
> sun-ejb-jar.xml but glassfish seems to create it’s own version of the
> file and ignores what I have put in mine. Is there an annotation that
> I need to use to tell the app server to use basic authentication when
> the web service is called.
>
>
>
> When I implement the security in a web application the RolesAllowed
> still doesn’t work and I have to specify the url to protect. I am
> hoping that you have some sort of info for me because it would be
> great if we could have a single webservice with multiple methods that
> have separate permissions.
>
>
>
> Please help, I realise that I am probably being extremely forward but
> I am desperate, I have been fighting with this for 3 days now and I
> would love to implement your AS but can’t until I have resolved this
> issue.
>
>
>
> I posted on the forum but I have received no feedback
>
>
>
> Thanking you in advance
>
> Kenneth Clark
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.408 / Virus Database: 268.13.11/493 - Release Date:
> 2006/10/23
>