Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change 
notification.

The following page has been changed by DavanumSrinivas:
http://wiki.apache.org/ws/FrontPage/WsFx/wss4jFAQ

------------------------------------------------------------------------------
  into the classpath. For more detailed information about ''log4j'' please 
refer to the
  [http://logging.apache.org/ Apache logging] project.
  
+ [[Anchor(many)]]
+ ==== I have many clients and one service (and i need signature+encryption). 
Is there a way to handle many client certs? ====
+ 
+ Each client has its own certificate, the requests shall be signed and 
encrypted. The responses also signed and encrypted.
+ 
+ Well, to keep the effort of the certificate adminsitration  low I usually use 
the following technique. Using this way no special programming on the client or 
service is required, all handled via standard deployment.
+ 
+ Client part, request:
+ 
+ - set up the client to use Binary Security Token (BST) when signing:
+ {{{
+       <parameter name="signatureKeyIdentifier" value="DirectReference" />
+ }}}
+   In this way the request contains the client's certificate, i.e. its public 
key. Because the certificate is included in the request the server does not 
need to store the certificate of every client.
+ 
+ - Use the server's certificate (the public key) to perform request encryption.
+ 
+ Server part, request:
+ 
+ - The handler (WSDoAllReceiver/WSSecurityEngine)) extracts the client's 
certificate from the request (because it's a Binary Security Token). Use this 
certificate to verfiy and perform trust verification agains the root 
certificate (certificate of the Certificate Authority, CA). The current 
verifyTrust implemetation requires to have all client certificates in the 
keystore to provide a better security/trust check against phony DNs and 
possible other mismatches.
+ 
+ - the handler stores the extracted client certificate in the message context. 
This is transparent to the client and server code.
+ 
+ Server part, response:
+ 
+ - To perform signing the server uses its private key to sign. You may use BST 
or some other way to identify the server's certificate. Every client needs to 
have the server's certificate anyway if you encrypt the request (see above).
+ 
+ - To perform response encryption set the encryption user name to 
"useReqSigCert". This is a special name that directs the WSDoAllSender handler 
to use the stored client's certificate (the clients public key) to perform 
response encryption.
+ 
+ Client part, response:
+ 
+ - nothing special, just set up the response stream correctly in the client's 
WSDD file.
+ 
+ As pointed out, usually no modification in client/service coding necessary, 
also no need to change the trust handling inside WSDoAllReceiver except that 
you need a very special certificate trust verification.
+ 

Reply via email to