conditional password sync to a SQL Server DB

This topic has 1 reply, 2 voices, and was last updated 6 years, 4 months ago by Chris Drake.

  • Author
  • #7944


    Is there a way I can do a password sync only when the operation is create and not update ?

    I save password in SQL Server DB and dont want to get it updated every time a user is updated in OpenIDM.
    Can some one please suggest any way to do this ?


     Chris Drake


    The way to do this is via a onUpdate trigger within your mapping:

    1. Remove your password property mapping from your OpenIDM -> SQL Server mapping. This will ensure that under normal circumstances the password will never be pushed out to the remote SQL Server.
    2. Add a onCreate trigger within your OpenIDM -> SQL Server mapping which performs the following:

    var clearObj = openidm.decrypt(source);
    target.password = clearObj.password;

    The above will decrypt the full source object and set the target.password to the current decrypted Managed User password whenever a Create operations is executed.


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

You must be logged in to reply to this topic.

©2022 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?