You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Ashok Shah <as...@sfu.ca> on 2005/07/28 17:35:54 UTC

Re: Can I include a Cert in a SOAP Header using WSS4J

Andrew,

You could set a parameter WSHandlerConstants.SIG_KEY_ID to 
"DirectReference"  in deplyoment file. This would attach the cetificate 
as Binary data in the soap message.

Cheers,

Ashok.

Andrew Kinard wrote:

> Hello All,
>
> I have a project in which I would like to send a signed message to a  
> client and include a cert in the SOAP header.  Basically, I have a  
> need to verify the identity of the sender without keeping a local  
> keystore.  I have used WSS4J for sending a signed message, but have  
> not found any documentation on including the cert in the SOAP header,  
> which I think is covered by the XML-Signature spec.
>
> Does anyone have any information on how I might do this?
>
> Regards,
> Andrew Kinard
> AK;-)
>
>


Re: verifying signatures, useReqSigCert and keystores

Posted by Martin Stemplinger <ms...@gmx.de>.
Andrew Kinard schrieb am 07/29/2005 04:27 PM:
> Hello all,
> 
> Does anyone have any experience disabling certpath validation and  using 
> just the base64 cert token from DirectReference to validate a  received 
> message?
> 
> Regards,
> Andrew Kinard
> AK;-)
> 
just an off-topic remark: from my point of view this doesn't seem to be 
a sensible thing to do: if someone intercepts the message, changes it 
and signs it using a new certificate which he also attaches how would 
you notice?

Cheers
Martin

Re: verifying signatures, useReqSigCert and keystores

Posted by Andrew Kinard <ak...@cisco.com>.
Hello all,

I'm new to this list, but found this email in the archives.
Like Brian, I also have a need to ditch my keystore for the receiver.
I am willing to write a patch to implement the config parameter that  
Werner mentions below.
However, being new to this code, I could use some pointers on where  
to start.

Does anyone have any experience disabling certpath validation and  
using just the base64 cert token from DirectReference to validate a  
received message?

Regards,
Andrew Kinard
AK;-)



-------------------------------------------------------

Content-Type: text/plain;
     charset="iso-8859-1"
Subject: AW: verifying signatures, useReqSigCert and keystores
Date: Fri, 15 Jul 2005 08:37:36 +0200
From: Dittmann, Werner <we...@siemens.com>

Brian,

IMO this is due to the certificate validation built into
the receiver and yes, it is enabled AFAIK.

Maybe we could thing of yet another config parameter
to switch this off and save the keystore at all.
Obviously, as you stated, this only works in particular
configurations.

Regards,
Werner

 > -----Ursprüngliche Nachricht-----
 > Von: Brian Nielsen [mailto:brian@sweetxml.org]
 > Gesendet: Donnerstag, 14. Juli 2005 23:13
 > An: fx-dev@ws.apache.org
 > Betreff: verifying signatures, useReqSigCert and keystores
 >
 >
 >
 > Since I'm not sure I got this right, I've chosen to write it
 > here instead of
 > creating a jira.
 >
 > When using "useReqSigCert" I thought I didn't need to have a
 > keystore for
 > the encryption since it should come from/be found in processing the
 > signature in the request. I've found out that if I don't provide a
 > "encryptionPropFile" I get an error, so I've tried a dummy one,  
and it
 > works. I'm not really sure if it's needed.
 >
 > When verifying a signature what should the keystore contain?
 > If the message
 > use DirectReference the certificate is in the message, and
 > the keystore
 > isn't needed, unless to do certificate path validation, but that  
isn't
 > enabled right?. Whereas if it's one of the other identifier
 > types the public
 > key is needed from the keystore, and possibly also the trusted root
 > certificate(s). So in this scenario the need for a keystore
 > for validation
 > depends on how the certificate is referenced.
 >
 > If this is true, there should not be a need for a keystore for the
 > encryption when using "useReqSigCert".
 >
 > During my experiments with WSE 2.0 interop I've found out
 > that WSE always
 > uses/wants DirectReference for signatures and SubjectKeyIdentifier  
for
 > encryption (shouldn't it be "SubjectKeyIdentifier" instead of
 > "SKIKeyIdentifier"). Given this subset of the wss-standard
 > it's more simple,
 > as to what is needed in the verification/"useReqSigCert"-encryption.
 >
 > Have I got this right, and should it be possible to leave out the
 > "signaturePropFile"/"encryptionPropFile" in this scenario?
 >
 >
 > Regards
 > Brian
 >
 >
 >
 >
 >
 >
 >
 >
 >



Re: Can I include a Cert in a SOAP Header using WSS4J

Posted by Ashok Shah <as...@sfu.ca>.
I dont remember the validation process exactely (may be someone could 
correct me if i am wrong).

If the given certificate is in the keystore the certificate is trusted. 
OR , If the certificate that signed the given cert is present in the 
keystore then the given certificate is trusted.


---as

Andrew Kinard wrote:

> Thanks Ashok,
>
> One more question: So if I have my server send a message with the  
> cert in the header, is the client still required to have the cert in  
> it's keystore to validate the sender?  If not, what WSDD and  
> crypto.properties properties are required by the client?
> Thanks for the help,
> Andrew Kinard
> AK;-)
>
>
>
> On Jul 28, 2005, at 11:35 AM, Ashok Shah wrote:
>
>> Andrew,
>>
>> You could set a parameter WSHandlerConstants.SIG_KEY_ID to  
>> "DirectReference"  in deplyoment file. This would attach the  
>> cetificate as Binary data in the soap message.
>>
>> Cheers,
>>
>> Ashok.
>>
>> Andrew Kinard wrote:
>>
>>
>>> Hello All,
>>>
>>> I have a project in which I would like to send a signed message to  
>>> a  client and include a cert in the SOAP header.  Basically, I  have 
>>> a  need to verify the identity of the sender without keeping  a 
>>> local  keystore.  I have used WSS4J for sending a signed  message, 
>>> but have  not found any documentation on including the  cert in the 
>>> SOAP header,  which I think is covered by the XML- Signature spec.
>>>
>>> Does anyone have any information on how I might do this?
>>>
>>> Regards,
>>> Andrew Kinard
>>> AK;-)
>>>
>>>
>>
>
>


Re: Can I include a Cert in a SOAP Header using WSS4J

Posted by Andrew Kinard <ak...@cisco.com>.
Thanks Ashok,

One more question: So if I have my server send a message with the  
cert in the header, is the client still required to have the cert in  
it's keystore to validate the sender?  If not, what WSDD and  
crypto.properties properties are required by the client?

Thanks for the help,
Andrew Kinard
AK;-)



On Jul 28, 2005, at 11:35 AM, Ashok Shah wrote:

> Andrew,
>
> You could set a parameter WSHandlerConstants.SIG_KEY_ID to  
> "DirectReference"  in deplyoment file. This would attach the  
> cetificate as Binary data in the soap message.
>
> Cheers,
>
> Ashok.
>
> Andrew Kinard wrote:
>
>
>> Hello All,
>>
>> I have a project in which I would like to send a signed message to  
>> a  client and include a cert in the SOAP header.  Basically, I  
>> have a  need to verify the identity of the sender without keeping  
>> a local  keystore.  I have used WSS4J for sending a signed  
>> message, but have  not found any documentation on including the  
>> cert in the SOAP header,  which I think is covered by the XML- 
>> Signature spec.
>>
>> Does anyone have any information on how I might do this?
>>
>> Regards,
>> Andrew Kinard
>> AK;-)
>>
>>
>