We have an application which use ldap protocol. We use unboundId library for that
// ldap
implementation("com.unboundid:unboundid-ldapsdk:6.0.9")
We found out that most api calls use dn
as argument.
For example:
ldapConnectionPool.getEntry(dn)
But we also found out that dn
is not immutable identifier (it could be changed if we move the object from one location to another one or if we rename it (change CN) but it is not good to have mutable identifiers for many reasons. So we started to look for immutable identifier and found out objectGuid.
But the problem here that I can't find any method which allow me to
- Get entry by objectGuid
I've found only this way but I am not sure about performance:
SearchRequest searchRequest = new SearchRequest(
searchBase,
SearchScope.SUB,
Filter.createEqualityFilter("objectGuid", objectGuid)
);
- Extract
objectGuid
from creation request:
LDAPResult addResult = ldapConnectionPool.add(addRequest)
So my question is:
Is it a good idea to use objectGuid
as identifier in our application or not ? performance matters.
From the first glance it looks really attractive but looks like library is not designed for that. What do you think ?