Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 88730 invoked from network); 30 Dec 2007 07:58:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Dec 2007 07:58:38 -0000 Received: (qmail 46827 invoked by uid 500); 30 Dec 2007 07:58:19 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 46806 invoked by uid 500); 30 Dec 2007 07:58:19 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 46795 invoked by uid 99); 30 Dec 2007 07:58:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Dec 2007 23:58:19 -0800 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: domain of nandana.cse@gmail.com designates 209.85.146.178 as permitted sender) Received: from [209.85.146.178] (HELO wa-out-1112.google.com) (209.85.146.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Dec 2007 07:57:57 +0000 Received: by wa-out-1112.google.com with SMTP id k22so7294570waf.18 for ; Sat, 29 Dec 2007 23:58:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=NhEfFDKgVekiCJMk8BHfyo8jYN8OyY4EltCsyNcY04k=; b=lQzhRu/AyWkSYaiH3fYCCluQ2jCBecnVH12YRHPbdr2th0+yEAPEjMIAC8XVg9aZwLDOCq/f6tzkt/ybPYdVzkjwMf8tADvPXOoI9Lz5BamkStpglsGdE/KpNZ3WIjDdRiiL8YZHtfG6SVp1S29URcCl/SNnyq6aqjgEiiMHKOU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=OglW9N/jN5YaujpfTEGGzeRHI9xta96ghI1OLqzJ+KswDu83pNmIagkrfog7AKFe1XNFPvXSOvL57LMYXFKdY8+yivSzaWZFvtu6UnqvElmKl3ci0cNVuBGCMVGzhvesEY6riMRXjcPjxwnmxNwBMtpbtg+2161Yj77raOLoUf0= Received: by 10.114.200.2 with SMTP id x2mr10060300waf.19.1199001481513; Sat, 29 Dec 2007 23:58:01 -0800 (PST) Received: by 10.114.159.18 with HTTP; Sat, 29 Dec 2007 23:58:01 -0800 (PST) Message-ID: <9e2fff830712292358q7f374927q646c140037a4632c@mail.gmail.com> Date: Sun, 30 Dec 2007 13:28:01 +0530 From: "Nandana Mihindukulasooriya" To: axis-user@ws.apache.org Subject: Re: ws-security: Encryption using UserToken In-Reply-To: <14542558.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19620_21300602.1199001481502" References: <14542558.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_19620_21300602.1199001481502 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Patrick, On 12/30/07, qvall wrote: > > > Hi, > I would like to encrypt and sign my requests any responses using WSS4J and > UserToken > but can't figure it out how to make it.guess I should play with > "encryptionKeyIdentifier", "EmbeddedKeyName", > "encryptionPropFile" > "encryptionSymAlgorithm" according to other link that works. However i > still > don't know how > to make it. Especially how can i reference UserToken that is generated to > be > used to > signature and encryption ? I think the Rampart basic sample 9 - [1] which uses the embedded key name as the encryption key identifier will help you understand the usage. > is there any way to > encrypt > response from server (using x509 Certificates) without knowing client's > public key in advance? > I mean in many samples I saw that server's keystore had client's cert. I > would like to > avoid it since this requires modifing server with each new client. Does > "useReqSigCert" > has something to do it with? Yes, if we use "useReqSigCert", the certificate used to sign the request message will be used to encrypt the response message back to the client. So the server may either get the certificate from the key store or extract it from the request. In the latter case, the server must be able to verify the trust for the client's certificate. If you are using policy based configuration of Rampart, you have another option. You can use a Symmetric Binding. If you use symmetric binding, then the client doesn't need to have a certificate at all to do the encryption and signature. Thanks, Nandana [1] - https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample09/ ------=_Part_19620_21300602.1199001481502 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Patrick,

On 12/30/07, qvall <qvall@o2.pl> wrote:

Hi,
I would like to encrypt and sign my requests any responses using WSS4J and
UserToken
but can't figure it out how to make it.guess I should play with "encryptionKeyIdentifier", "EmbeddedKeyName",
"encryptionPropFile"
"encryptionSymAlgorithm" according to other link that works. However i still
don't know how
to make it. Especially how can i reference UserToken that is generated to be
used to
signature and encryption ?
 
I think the Rampart basic sample 9 -  [1] which uses the embedded key name as the encryption key identifier will help you understand the usage.

 
is there any way to
encrypt
response from server (using x509 Certificates) without knowing client's
public key in advance?
I mean in many samples I saw that server's keystore had client's cert. I
would like to
avoid it since this requires modifing server with each new client. Does
"useReqSigCert"
has something to do it with?
 
    Yes, if we use "useReqSigCert", the certificate used to sign the request message will
be used to encrypt the response message back to the client. So the server may either get
the certificate from the key store or extract it from the request. In the latter case,  the server
must be able to verify the trust for the client's certificate.
   If you are using policy based configuration of Rampart, you have another option. You can
use a Symmetric Binding. If you use symmetric binding, then the client doesn't need to have
a certificate at all to do the encryption and signature.
 
Thanks,
Nandana
 

 
------=_Part_19620_21300602.1199001481502--