Password synchronizer

ADSelfService Plus' password sync feature helps synchronize users' AD passwords across their enterprise systems and apps in real time, as well as unlock the users' linked accounts.

When users change their passwords using the self-service portal, the new password can be automatically synced to their respective linked accounts. You can fine-tune this setting by either enforcing password synchronization for all the users' connected apps, or letting the user choose which apps to sync passwords for. Learn more

Note: Password resets or changes, and account unlocks by users done via ADSelfService Plus can be synced across their connected applications using these settings. However, if a user changes their AD password from their machine's native GUI (Ctrl+Alt+Del) screen, or an admin changes a user's password using the ADUC console on a domain controller (DC), the password sync agent must be installed on all the DCs in the domain to synchronize that password to ADSelfService Plus, and subsequently synchronize the password across the user's connected apps. It also unlocks the users' linked apps.

Password synchronization can be achieved using,

  1. The real-time password synchronizer.
  2. Custom scripts.

Password sync settings

Log into the ADSelfService Plus portal with admin credentials and navigate to Configuration > Self-Service > Policy Configuration > Advanced > Password Sync.

Password-Sync

Password sync using post-action scripts

Post Action

Note:You will need to upload your script file to the [ADSelfServicePlus_InstallationDirectory]/Scripts folder. Upon selecting either of the options under Post Action, a text box for the Script Command pops up, where you must mention the filename and the arguments to be passed to the script. The arguments will be encoded in Base64.

Important security considerations

The steps mentioned below must be adhered to while implementing custom scripts:

Decoding Arguments

Insufficient input validation of command line commands allows a threat actor to execute arbitrary commands on the host operating system. To protect users from these attacks, all arguments to the script will be encoded in Base64. These arguments should be decoded in the script before they are executed.

Note: facilitate the above, the scripts folder comes with two files - sample-base64.vbs and sample-base64.ps1. These files contain sample code to decode from Base64.

Decoding Base64 in VBScript:

A helper file present in [Installation Directory]/Scripts/utils/Base64Decoder.vbs contains the Base64Decode function. You can utilize this function in your scripts to decode Base64 value.

Sample VBScript code to decode the arguments passed in Base64:

Include("utils\Base64Decoder.vbs")
For Each arg In WScript.Arguments
   	Dim decodedArg
   	decodedArg = Base64Decode(arg)
   	f.WriteLine("Before decoding: " + arg)
   	f.WriteLine("After decoding: " + decodedArg)
Next

Decoding Base64 in PowerShell script:

Sample PowerShell code to decode the arguments passed in Base64:

foreach ($arg in $args) {
	$decodedArg = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($arg))
   	Add-Content -Path sample-base64-test.txt -Value "Before decoding: $arg"
	Add-Content -Path sample-base64-test.txt -Value "After decoding: $decodedArg"
}

Copyright © 2024, ZOHO Corp. All Rights Reserved.