Skip to content

Commit

Permalink
Remove targetEntryUUID
Browse files Browse the repository at this point in the history
targetEntryUUID isn't part of the standard so directories such as isode m-vault don't use this field. This prevents delete functionality when using entryUUID as a uid attribute (which does exist on isode m-vault).

This change allows using targetDN as the uid to compare against: implementing a new PullCorrelationRule, the __UID__ can be used to compare agains the object DN, enabling the deletion functionality
  • Loading branch information
Sylinsic authored Feb 27, 2024
1 parent e6e9a83 commit f17f2b7
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ public void sync(
builder.setAttributesToGet(
changeNumberAttr,
"targetDN",
"targetEntryUUID",
"changeType",
"changes",
"newRdn",
Expand Down Expand Up @@ -318,16 +317,13 @@ private SyncDelta createSyncDelta(
syncDeltaBuilder.setDeltaType(deltaType);

if (deltaType.equals(SyncDeltaType.DELETE)) {
LOG.ok("Creating sync delta for deleted entry {0}",
LdapUtil.getStringAttrValue(inputObject, "targetEntryUUID"));
LOG.ok("Creating sync delta for deleted entry {0}", targetDN);

String uidAttr = conn.getSchema().getLdapUidAttribute(oclass);

Uid deletedUid;
if (LDAP_DN_ATTRIBUTES.contains(uidAttr)) {
deletedUid = createUid(uidAttr, targetDN);
} else if ("entryUUID".equalsIgnoreCase(uidAttr)) {
deletedUid = new Uid(LdapUtil.getStringAttrValue(inputObject, "targetEntryUUID"));
} else {
// ever fallback to dn without throwing any exception more reliable
deletedUid = new Uid(targetDN);
Expand Down

0 comments on commit f17f2b7

Please sign in to comment.