Sun GlassFish Web Space Server 10.0 Administration Guide

Passwords

Passwords is a property in the portal.properties file, which is the default configuration file for Sun GlassFish Web Space Server. You can override this property using portal-ext.properties file.

Set the following encryption algorithm to encrypt passwords. The default algorithm is SHA (SHA-1). If set to NONE, passwords are stored in the database as plain text. The SHA-512 algorithm is currently unsupported.

Examples:


passwords.encryption.algorithm=CRYPT
passwords.encryption.algorithm=MD2
passwords.encryption.algorithm=MD5
passwords.encryption.algorithm=NONE
passwords.encryption.algorithm=SHA
passwords.encryption.algorithm=SHA-256
passwords.encryption.algorithm=SHA-384
passwords.encryption.algorithm=SSHA

Digested passwords are encoded via base64 or hex encoding. The default is base64.


passwords.digest.encoding=base64
#passwords.digest.encoding=hex

Input a class name that extends com.liferay.portal.security.pwd.BasicToolkit. This class will be called to generate and validate passwords.

Examples:


passwords.toolkit=com.liferay.portal.security.pwd.PasswordPolicyToolkit
passwords.toolkit=com.liferay.portal.security.pwd.RegExpToolkit

If you choose to use com.liferay.portal.security.pwd.PasswordPolicyToolkit as your password toolkit, you can choose either static or dynamic password generation. Static is set through the property passwords.passwordpolicytoolkit.static and dynamic uses the class com.liferay.util.PwdGenerator to generate the password. If you are using LDAP password syntax checking, you will also have to use the static generator so that you can guarantee that passwords obey its rules.

Examples:


passwords.passwordpolicytoolkit.generator=static
passwords.passwordpolicytoolkit.generator=dynamic
passwords.passwordpolicytoolkit.static=iheartliferay

If you choose to use com.liferay.portal.security.pwd.RegExpToolkit as your password toolkit, set the regular expression pattern that will be used to generate and validate passwords.

Note that \ is replaced with \\ to work in Java.

The second pattern ensures that passwords must have at least 8 valid characters consisting of digits or letters.

Examples:


passwords.regexptoolkit.pattern=(?=.{4})(?:[a-zA-Z0-9]*)
passwords.regexptoolkit.pattern=(?=.{8})(?:[a-zA-Z0-9]*)

Set the length and key for generating passwords.

Examples:


passwords.regexptoolkit.charset=0123456789
passwords.regexptoolkit.charset=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcde-
fghijklmnopqrstuvwxyz

Examples:


passwords.regexptoolkit.length=4
passwords.regexptoolkit.length=8

Set the name of the default password policy.


passwords.default.policy.name=Default Password Policy