[WSS4J] More ldap

trebor iksrazal <iksrazal-/[email protected]> Tue, 2 Mar 2004 13:28:52 -0800 (PST)
Newsgroups gmane.text.xml.wss4j
Message-ID <[email protected]>
First, thanks for the help so far. 

I can now create, store and retrieve X509 Certificates
 via java and openldap. I also am storing the keystore
as a serialized object. Could someone please evaluate
some of the decisions I've made? 

1) I only access the keystore to create the
certificates when storing them in ldap. 

2) Each client has their own certificate, retrieved
via ldap when sending the message. The web service has
its own certificate, placed in the return. Each cert
is cached after the first ldap call via something
like: 

Map cache; 
cache = Collections.synchronizedMap(new HashMap());

X509Certificate cert = null;
if (cache.containsKey(certDistigushedName))
{
  cert (X509Certificate) =  
cache.get(certDistigushedName);
}
else
{
  cert = (X509Certificate)
getCertFromLDAP(dataSourceName);
  cache.put(certDistigushedName, cert);
}

This ignores CertSelector and CRL's for the moment,
just using ctx.search and converting. Also, I would
like to only have a reference to the cert in the
message, but I am unsure how so far. 

3) The decryption uses PasswordCallback callback to
generate the Secretkey class. This password is
unrelated to keystore. It is simply placed in
Call.setPassword() by the client, and retrived via
MessageContext.getPassword() . 

Any comments highly appreciated. 
iksrazal

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click