views:

167

answers:

2

How do I search for a specific user object in LDAP that has an associated x509 certificate? Do I need to encode it in a certain way? It looks like the attribute is userCertificate based on looking at JXplorer.

Note: Accessing Active Directory through LDAP

A: 

I suspect this may depend on your server providing LDAP and the syntax of the userCertificate attribute. It might be a string attribute then the contents would need to be base 64 encoded. Or else it might an octet syntax attribute.

By search 'using' a certificate, what do you mean? Connect over SSL/TLS with a cert, or find an object that has this specific certificate assigned to them? Not clear from your question.

geoffc
Sorry about the ambiguity, but looking for this specifically: "find an object that has this specific certificate assigned to them"
Joshua
Does your LDAP server store the Certificate Private Key, or a DN referencing a certificate object, or what? That seems to get you to the crux of the question.
geoffc
A: 

This is usually accomplished by associating the certificate DN with the LDAP entry.

Kevin
but, how do I search for it with java? Do I submit the byte array using userCertificate={0} or do I encode it to a string somehow
Joshua
Also, how are multiple certificates handled - so is the '=' the correct operator to use?
Joshua