From f17f2b76974ea62c34d3f49982ef6da588a4fa8a Mon Sep 17 00:00:00 2001 From: Sylinsic <38617929+Sylinsic@users.noreply.github.com> Date: Tue, 27 Feb 2024 22:56:07 +0000 Subject: [PATCH] Remove targetEntryUUID 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 --- .../bundles/ldap/sync/GenericChangeLogSyncStrategy.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/net/tirasa/connid/bundles/ldap/sync/GenericChangeLogSyncStrategy.java b/src/main/java/net/tirasa/connid/bundles/ldap/sync/GenericChangeLogSyncStrategy.java index 8e46507..70f2fd5 100644 --- a/src/main/java/net/tirasa/connid/bundles/ldap/sync/GenericChangeLogSyncStrategy.java +++ b/src/main/java/net/tirasa/connid/bundles/ldap/sync/GenericChangeLogSyncStrategy.java @@ -224,7 +224,6 @@ public void sync( builder.setAttributesToGet( changeNumberAttr, "targetDN", - "targetEntryUUID", "changeType", "changes", "newRdn", @@ -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);