only update in ldap if attribute is changed

This topic has 2 replies, 2 voices, and was last updated 2 years, 10 months ago by pryton.

  • Author
    Posts
  • #21742
     pryton
    Participant

    Hello,

    we want to minimize our write operations to our LDAP target to boost the performance of our recons and lower the duration.
    According to de documentation we set up for each attribute in the mapping a condition script, which checks if the attribute is different then in the target and only if its changed we write it.
    But unfortunetly there are still replace operations visible in the audit of the LDAP target.

    Is there a specific flag needed to be set in the provisioner?

    #21743

    In order to minimize update, manual checking using condition scripts should not be necessary. OpenIDM should automatically check and avoid unnecessary update operations if source and target are equal.

    However, the comparison of source and target cat be tricky. I once had a similar issue due to using the wrong datatype. Something along the lines of

    target.attribute = 5;

    but the connector configuration specified the attribute to be of type string, so

    target.attribute = "5";

    would have been correct. Of course there was some implicit type casting, converting int to string and the code worked fine, but the change-detection insisted on ‘int 5 != string “5”‘ and triggered an update anyway.

    It’s the easiest explanation I can come up with.

    #21748
     pryton
    Participant

    Thanks Patrick,

    but i found the solution. The target object can be modified in the condition script.
    So to make sure that the target object contains only the altered attributes you have to manually remove the specific attribute in its condition script. I used the JsonValue function remove, here an example:
    target.remove("<key name of child object>")
    so
    target.remove("name")
    the name attribute will be removed from the target object and no writing operation will be executed.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

©2021 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?