ENTERPRISE PLUS: How to restore old encrypted password if it has been changed
When encrypted password is enabled, artifactory will generate an encrypted key pair under the access_users_custom_data table for each user. The keypair will be used to encrypt/decrypt encrypted passwords for the user.
If for any reason, this key pair has changed. The encrypted password value for the user will also change. If user does not want to change the encrypted password value, he can try to restore the public_key and private key in the DB table to force restore the old encrypted password value ( Assuming master.key, aritifactory.key, and plain text password has not changed )
Resolution- Restore old key pare from DB snapshots or backup
SELECT public_key FROM access_users_custom_data where user_id='3';
2. Updates the key pair for the user
UPDATE access_users_custom_data SET prop_value='JEj4P1F1CAy31XfpHuKBo7MCxgtSageii7aUpcMEEqEmwVAHGhJf6ztxs4sCdtqmGk2VJsFhMGjMEz1sCXcgun6FiqQCjr57vuSknjE7WQcXY63aMGtzEtzQ4NErCJMugJDq4um2Cmcds29Q6P6E9Aykd8wNNTdM4SMcF94JpUzghYbExLs1oVdVKHAtYncDmxCmEfZncdAeYgerrEB5RxCAG1YsUtKq' where props_key=public_key and user_id=3
UPDATE access_users_custom_data SET prop_value='JES4vus66KYf9GxU4pc17tyqFq3pUbE2feXwJK4dXs8hcd6wB9UvKT62MMJt6YApW9EtFhZfPiYg3yc17d85Nf4x93EhWoszsMpwsuEwZwESwNgXJCtBhkotvWaEiR8wnEFbykQu5u3c456isPrDpqu232nxCuNVFVdSjAvVgn6M5YKw81vezwp2hgnvyxcb8T8CMbCVgR4sv8ettuFT3udoGQdrEEDUZydUQ7v953iuHbHFakn2JZbWDqoAAB57pqJFHwtyFQubQoy2KogoapNpNRzfLy5fhJJg1rDmYtLp9Mjy99Z9XyksFq1EjoKUEd22Wj5fXNP9WD8GcW3Caj3eFWyQJL6JNRGCQ8f8vU7qq9nKZ8bMLqrxAivzf7KAzdfZHg1F4bWfhXYrF1zAebVrmfewrjJtx6p1RXZE1ADZX5dcsyagvf3wiYvb5gpZznTnpSGUZerZzULKTjsLSy7r2ExNmFEwfDNMShB2x1hKLdWioqtNdZvyWWAEF3yLk6ttunZzGPNdvceVnRAvBRPtv1aF2iw4USg4KSrH6hFCoEbaCYpZ62f3kBoNhuVnCwbqrKr4EfT8MjhUXzP62hrszXsuxTVGyFGcrLrR8r71TXoTGxaSdWUeoC8XURQyH9KcXDUTwg6a1mDAkw8uTVRsfpngfZgEQFoLp9sVhgc' where prop_key='private_key' and user_id=3;
3. Without restart, the encrypted password should be restored to the previous value.
Note: Modifying the database should be done with caution and should always be executed by a user that is comfortable doing so. Take database snapshot before the database action. Reach out to JFrog Support for an assistant if you are not sure and have an active subscription entitled to support