Return-Path: X-Original-To: apmail-cxf-users-archive@www.apache.org Delivered-To: apmail-cxf-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2039F6DCA for ; Tue, 19 Jul 2011 03:26:52 +0000 (UTC) Received: (qmail 53490 invoked by uid 500); 19 Jul 2011 03:26:51 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 52911 invoked by uid 500); 19 Jul 2011 03:26:40 -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 52887 invoked by uid 99); 19 Jul 2011 03:26:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2011 03:26:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of freeman.fang@gmail.com designates 209.85.214.169 as permitted sender) Received: from [209.85.214.169] (HELO mail-iw0-f169.google.com) (209.85.214.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2011 03:26:31 +0000 Received: by iwn8 with SMTP id 8so4049962iwn.0 for ; Mon, 18 Jul 2011 20:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:mime-version:subject :date:references:x-mailer; bh=QeAMoIyNriXwYnhlBwqTIz51B/Jvn00xXEdqUHNQruM=; b=eT10zpyThq1+h7mggWa5kfj9MIsAIsYRS7FhQTlJyAlPCkw4/hGvQCijXJmEf1S1FF apY9+lHRQb4o70aurcnfgvJKCsUG/8gDyMilp8bSSGtu9J99D2JgtMf7koetFcTGbxq4 mj/ACYVLtxZgQjqpRkmLtO8m78F21vp4TQewg= Received: by 10.231.114.92 with SMTP id d28mr6283254ibq.167.1311045970419; Mon, 18 Jul 2011 20:26:10 -0700 (PDT) Received: from [192.168.1.101] ([123.119.249.5]) by mx.google.com with ESMTPS id x11sm3329617ibd.41.2011.07.18.20.26.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jul 2011 20:26:09 -0700 (PDT) Message-Id: From: Freeman Fang To: users@cxf.apache.org In-Reply-To: Content-Type: multipart/alternative; boundary=Apple-Mail-2--121203079 Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: get certificate sent in security header to cxf web service Date: Tue, 19 Jul 2011 11:26:02 +0800 References: X-Mailer: Apple Mail (2.936) --Apple-Mail-2--121203079 Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Hi, I think you can take a look at [1] as an example. = [1]https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/s= ervicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/Jb= iJAASInterceptor.java Freeman On 2011-7-19, at =E4=B8=8A=E5=8D=886:35, Jaime Hablutzel Egoavil wrote: > Or at least, could someone tell me how to add a custom interceptor =20 > after > WSS4J interceptor to access the signing certificate of a wss signed =20= > soap > message? > > On Mon, Jul 18, 2011 at 1:30 PM, Jaime Hablutzel Egoavil < > hablutzel1@gmail.com> wrote: > >> Hi I have a web service exposed with cxf with this wsdl: >> >> > definitions name=3D"CXFLibraryImplService" targetNamespace=3D" >> http://service2.ws.service.kprtech.com/" xmlns:ns1=3D" >> http://cxf.apache.org/bindings/xformat" xmlns:soap=3D" >> http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns=3D" >> http://service2.ws.service.kprtech.com/" xmlns:wsdl=3D" >> http://schemas.xmlsoap.org/wsdl/" xmlns:xsd=3D" >> http://www.w3.org/2001/XMLSchema"> >> >> > http://service2.ws.service.kprtech.com/" version=3D"1.0" xmlns:ns1=3D" >> http://cxf.apache.org/bindings/xformat" xmlns:soap=3D" >> http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns=3D" >> http://service2.ws.service.kprtech.com/" xmlns:wsdl=3D" >> http://schemas.xmlsoap.org/wsdl/" xmlns:xs=3D" >> http://www.w3.org/2001/XMLSchema" xmlns:xsd=3D" >> http://www.w3.org/2001/XMLSchema"> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > name=3D"sayHelloResponse"> >> >> >> >> > type=3D"tns:Library"> >> > http://schemas.xmlsoap.org/ws/2004/09/policy" /> >> > http://schemas.xmlsoap.org/soap/http" /> >> >> >> >> >> >> >> >> >> >> >> >> > name=3D"CXFLibraryImplPort"> >> > http://localhost:8888/domicilios/services/service2" /> >> >> >> > http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu=3D" >> = http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility= -1.0.xsd >> "> >> >> >> >> > http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"> >> >> >> >> > = http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Alw= aysToRecipient >> "> >> >> >> >> >> >> >> >> >> >> > = http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Nev= er >> "> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> >> >> >> >> >> >> > http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"> >> >> >> >> >> >> >> >> >> >> And I want to be able to get the certificate in a custom =20 >> intereceptor to be >> able to pass it to spring security session context. >> Another thing I want is to be able to override the default =20 >> behaviour of cxf >> trying to validate the certPath, because I want to do this by my =20 >> own because >> certificate aren't in a .jsk keystore but in a database. >> >> I have read that I need a second interceptor, but how to set an =20 >> interceptor >> and give it lower precedence?? >> >> Thanks. >> >> >> >> -- >> Jaime Hablutzel - 9-9956-3299 >> >> (tildes omitidas intencionalmente) >> > > > > --=20 > Jaime Hablutzel - 9-9956-3299 > > (tildes omitidas intencionalmente) --------------------------------------------- Freeman Fang FuseSource Email:ffang@fusesource.com Web: fusesource.com Twitter: freemanfang Blog: http://freemanfang.blogspot.com --Apple-Mail-2--121203079--