By default, Liferay encrypts the passwords that go into the database. The default algorithm is SHA-1 in 6.0 and 6.1 versions, which changed to PBKDF2WithHmacSHA1/160/128000 in version 6.2. The encryption algorithm can be changed and even turned off via the portal-ext.properties.
Because of this if you upgrade to 6.2 and you were using the default passwords encryption algorithm, you will need to set the legacy property to the old one.
Resolution
Liferay allows for our users to choose from a variety of encryption algorithms to suit their needs. The algorithms are selected with the passwords.encryption.algorithm= in the portal-ext.properties.
#
# Set the following encryption algorithm to encrypt passwords. The default
# algorithm is PBKDF2WithHmacSHA1/160/128000, generating 160 bit hashes
# using 128,000 rounds.
#
# It is possible to decrease the rounds value in case of slow production
# hardware, but be aware that 128,000 is the recommended value for 2014
# by OWASP.
#
# If set to NONE, passwords are stored in the database as plain text.
#
#passwords.encryption.algorithm=BCRYPT/10
#passwords.encryption.algorithm=MD2
#passwords.encryption.algorithm=MD5
#passwords.encryption.algorithm=NONE
passwords.encryption.algorithm=PBKDF2WithHmacSHA1/160/128000
#passwords.encryption.algorithm=SHA
#passwords.encryption.algorithm=SHA-256
#passwords.encryption.algorithm=SHA-384
#passwords.encryption.algorithm=SSHA
#passwords.encryption.algorithm=UFC-CRYPT
If this property is set to NONE, passwords are stored in the database as plain text.
In 6.1 and lower, the default encryption was set to SHA (SHA-1). This changed in 6.2 to PBKDF2WithHmacSHA1/160/128000 as seen above. Please be sure to use the following property when upgrading to 6.2 to ensure that your passwords are upgraded to the new encryption algorithm upon log in:
passwords.encryption.algorithm.legacy=SHA
The snippet from portal.properties file is:
#
# Set the following encryption algorithm to designate the password
# encryption algorithm to migrate from. This is only necessary if
# upgrading from a release prior to 6.2 or if you wish to switch password
# encryption algorithms when there are existing users with passwords in the
# portal.
#
#passwords.encryption.algorithm.legacy=BCRYPT
#passwords.encryption.algorithm.legacy=MD2
#passwords.encryption.algorithm.legacy=MD5
#passwords.encryption.algorithm.legacy=NONE
#passwords.encryption.algorithm.legacy=SHA
#passwords.encryption.algorithm.legacy=SHA-256
#passwords.encryption.algorithm.legacy=SHA-384
#passwords.encryption.algorithm.legacy=SSHA
#passwords.encryption.algorithm.legacy=UFC-CRYPT
Additional Information
Please check out the full passwords properties available in portal.properties:
https://docs.liferay.com/portal/6.2/propertiesdoc/portal.properties.html#Passwords