Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 69018 invoked from network); 18 Jun 2008 11:11:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jun 2008 11:11:26 -0000 Received: (qmail 69455 invoked by uid 500); 18 Jun 2008 11:11:26 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 69301 invoked by uid 500); 18 Jun 2008 11:11:26 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 69288 invoked by uid 99); 18 Jun 2008 11:11:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 04:11:26 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [160.83.58.66] (HELO loninmrp8.uk.db.com) (160.83.58.66) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 11:10:33 +0000 Received: from sdbo1003.db.com (loninmlp1003.uk.db.com [10.143.24.192]) by loninmrp8.uk.db.com (8.14.3/8.14.3) with ESMTP id m5IBAJtZ006024 for ; Wed, 18 Jun 2008 12:10:19 +0100 In-Reply-To: <01c801c8d133$168177e0$e002050a@IONAGLOBAL.COM> To: users@cxf.apache.org Cc: users@cxf.apache.org Subject: Re: Roles and permissions MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5.5 CCH1 March 07, 2006 From: John-M Baker Message-ID: Date: Wed, 18 Jun 2008 12:10:14 +0100 X-MIMETrack: Serialize by Router on sdbo1003/DMGUK/DeuBaInt/DeuBa(Release 6.5.6FP1 HF46|July 18, 2007) at 18/06/2008 12:10:18, Serialize complete at 18/06/2008 12:10:18 Content-Type: multipart/alternative; boundary="=_alternative 003D5C698025746C_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 003D5C698025746C_= Content-Type: text/plain; charset="US-ASCII" Yes, I do. John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com "Sergey Beryozkin" 18/06/2008 12:04 Please respond to users@cxf.apache.org To cc Subject Re: Roles and permissions Hi I'm confused by this stacktrace > Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 > counts of IllegalAnnotationExceptions > javax.ws.rs.core.SecurityContext is an interface, and JAXB can't handle > interfaces. > this problem is related to the following location: > at javax.ws.rs.core.SecurityContext > at private javax.ws.rs.core.SecurityContext > com.db.websso.integration.services.jaxws_asm.GetApplicationConfiguration.arg1 > at > com.db.websso.integration.services.jaxws_asm.GetApplicationConfiguration > CXF JAX-RS does not do any asm processing at the moment. I'm wondering, do you have a combined JAX-WS/JAX-RS service and perhaps the cxf jaxws asm handler attempts to preprocess this method as well ? Cheers, Sergey > So it doesn't work or I'm doing it wrong: > > @GET > @Path("/get/{id}/") > @ProduceMime("application/xml") > Response getApplicationConfiguration(@PathParam("id") String id, > @Context SecurityContext sc); > > Any other thoughts? > > > John Baker > -- > Web SSO > IT Infrastructure > Deutsche Bank London > > URL: http://websso.cto.gt.intranet.db.com > > > > > "Sergey Beryozkin" > 18/06/2008 10:37 > Please respond to > users@cxf.apache.org > > > To > > cc > > Subject > Re: Roles and permissions > > > > > > > I'm sorry, it's a lack of the docs... > > Please use the SecurityContext from a jaxrs package > javax.ws.rs.core > Hope it will work > > Cheers, Sergey > > ----- Original Message ----- > From: "John-M Baker" > To: > Cc: > Sent: Wednesday, June 18, 2008 10:13 AM > Subject: Re: Roles and permissions > > >> Sergey, >> >> Using @Context SecurityContext sc didn't work: >> >> Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 >> counts of IllegalAnnotationExceptions >> org.apache.cxf.security.SecurityContext is an interface, and JAXB can't >> handle interfaces. >> this problem is related to the following location: >> at org.apache.cxf.security.SecurityContext >> at private org.apache.cxf.security.SecurityContext >> > com.db.websso.integration.services.jaxws_asm.GetApplicationConfiguration.arg1 >> at >> com.db.websso.integration.services.jaxws_asm.GetApplicationConfiguration >> org.apache.cxf.security.SecurityContext does not have a no-arg default >> constructor. >> this problem is related to the following location: >> at org.apache.cxf.security.SecurityContext >> at private org.apache.cxf.security.SecurityContext >> > com.db.websso.integration.services.jaxws_asm.GetApplicationConfiguration.arg1 >> at >> com.db.websso.integration.services.jaxws_asm.GetApplicationConfiguration >> >> And the SecurityContextImpl didn't work either: >> >> Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 >> counts of IllegalAnnotationExceptions >> org.apache.cxf.jaxrs.provider.SecurityContextImpl does not have a no-arg >> default constructor. >> this problem is related to the following location: >> at org.apache.cxf.jaxrs.provider.SecurityContextImpl >> at private org.apache.cxf.jaxrs.provider.SecurityContextImpl >> > com.db.websso.integration.services.jaxws_asm.GetApplicationConfiguration.arg1 >> at >> com.db.websso.integration.services.jaxws_asm.GetApplicationConfiguration >> >> Any thoughts? >> >> >> >> John Baker >> -- >> Web SSO >> IT Infrastructure >> Deutsche Bank London >> >> URL: http://websso.cto.gt.intranet.db.com >> >> >> >> >> "Sergey Beryozkin" >> 17/06/2008 16:04 >> Please respond to >> users@cxf.apache.org >> >> >> To >> >> cc >> >> Subject >> Re: Roles and permissions >> >> >> >> >> >> >> Hi John >> >> Try >> >> @Context SecurityContext sc >> >> as a parameter in your method >> >> and then sc.isUsertInRole()... >> >> The other option is to experiment with Acegi (Spring Security), as far > as >> applying permissions to individual methods - I haven't >> tried myself. I think JAX-RS will support some explicit EE security >> annotations too at some time >> >> Cheers, Sergey >> >> >>> Hello, >>> >>> Is there any way to use annotations to apply roles to methods in a >>> Webservice or REST call? I'd like to be able to configure an >> application >>> to let users within one group access a set of methods that another set >> of >>> users can not access. >>> >>> Is there a way to get the HttpRequest object from a method? >>> >>> Thanks, >>> >>> >>> John Baker >>> -- >>> Web SSO >>> IT Infrastructure >>> Deutsche Bank London >>> >>> URL: http://websso.cto.gt.intranet.db.com >>> >>> >>> --- >>> >>> This e-mail may contain confidential and/or privileged information. If >> you are not the intended recipient (or have received this >>> e-mail in error) please notify the sender immediately and delete this >> e-mail. Any unauthorized copying, disclosure or distribution >>> of the material in this e-mail is strictly forbidden. >>> >>> Please refer to http://www.db.com/en/content/eu_disclosures.htm for >> additional EU corporate and regulatory disclosures. >> >> ---------------------------- >> IONA Technologies PLC (registered in Ireland) >> Registered Number: 171387 >> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, > Ireland >> >> >> >> --- >> >> This e-mail may contain confidential and/or privileged information. If > you are not the intended recipient (or have received this >> e-mail in error) please notify the sender immediately and delete this > e-mail. Any unauthorized copying, disclosure or distribution >> of the material in this e-mail is strictly forbidden. >> >> Please refer to http://www.db.com/en/content/eu_disclosures.htm for > additional EU corporate and regulatory disclosures. > > ---------------------------- > IONA Technologies PLC (registered in Ireland) > Registered Number: 171387 > Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland > > > > --- > > This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this > e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution > of the material in this e-mail is strictly forbidden. > > Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures. ---------------------------- IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures. --=_alternative 003D5C698025746C_=--