What is the best way to import users of one instance to another?
Hi,
I have a use case where I am running my site in one AEM instance and it has 'n' number of users where we have some logic of creating our new property as cq:password inside the /home/users/{site}/{profile} and this password is encrypted using AEM crypto support so when I am packaging the user created in my 1 instance and importing it to the another then users are getting imported successfully but when user is trying to login with those user then while decrypting the password it is throwing exception as invalid padding which is basically due to the different master key which is used to generate that encrypted password. I have also read that the master key should always be same that means the key should be same from which encrypted password is generated otherwise while decrypting, it will not work. This key is under the /etc/key location and here it has master key property.
So if I am importing the key also from my old instance then it is working fine but in this case the existing user of my new instance will not work as now i have updated the master key of new instance from the old one. So i want to maintain both the keys as per the sites.
What is the best way to handle this scenario?
Thanks