Foren

Password policy properties

Anil KC, geändert vor 10 Jahren.

Password policy properties

Junior Member Beiträge: 35 Beitrittsdatum: 21.12.12 Neueste Beiträge
It is well known that password policies(Password Expiration,User Account Lockout....) can be well handled from Control Panel. Is there any properties that can perform all the things without using control panel?
thumbnail
Apoorva Prakash, geändert vor 10 Jahren.

RE: Password policy properties

Liferay Master Beiträge: 658 Beitrittsdatum: 15.06.10 Neueste Beiträge
Anil KC:
It is well known that password policies(Password Expiration,User Account Lockout....) can be well handled from Control Panel. Is there any properties that can perform all the things without using control panel?


Hi Anil,

See portal.properties for referance, you can overwrite them using portal-ext.properties. Following are the possibilities:
##
## Passwords
##

    #
    # 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.
    #
    #passwords.encryption.algorithm=BCRYPT
    #passwords.encryption.algorithm=UFC-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 implements
    # com.liferay.portal.security.pwd.Toolkit. This class will be called to
    # generate and validate passwords.
    #
    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.
    #
    #passwords.passwordpolicytoolkit.generator=static
    passwords.passwordpolicytoolkit.generator=dynamic
    passwords.passwordpolicytoolkit.static=iheartliferay

    #
    # Set the character sets for password validation.
    #
    passwords.passwordpolicytoolkit.charset.lowercase=abcdefghjkmnpqrstuvwxyz
    passwords.passwordpolicytoolkit.charset.numbers=0123456789
    passwords.passwordpolicytoolkit.charset.symbols=_.!@$*=-?
    passwords.passwordpolicytoolkit.charset.uppercase=ABCDEFGHJKLMNPQRSTUVWXYZ

    #
    # 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 first pattern ensures that passwords must have at least 4 valid
    # characters consisting of digits or letters.
    #
    # The second pattern ensures that passwords must have at least 8 valid
    # characters consisting of digits or letters.
    #
    passwords.regexptoolkit.pattern=(?=.{4})(?:[a-zA-Z0-9]*)
    #passwords.regexptoolkit.pattern=(?=.{8})(?:[a-zA-Z0-9]*)

    #
    # Set the length and key for generating passwords.
    #
    #passwords.regexptoolkit.charset=0123456789
    passwords.regexptoolkit.charset=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
    #passwords.regexptoolkit.length=4
    passwords.regexptoolkit.length=8

    #
    # Set the name of the default password policy.
    #
    passwords.default.policy.name=Default Password Policy


Hope this will help.

Thanks and Regards,
Apoorva Prakash