Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Anil KC
Password policy properties
2. April 2013 01:53
Antwort

Anil KC

Rang: Junior Member

Nachrichten: 35

Eintrittsdatum: 20. Dezember 2012

Neue 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?
Apoorva Prakash
RE: Password policy properties
2. April 2013 05:02
Antwort

Apoorva Prakash

Rang: Liferay Master

Nachrichten: 659

Eintrittsdatum: 15. Juni 2010

Neue 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:
 1##
 2## Passwords
 3##
 4
 5    #
 6    # Set the following encryption algorithm to encrypt passwords. The default
 7    # algorithm is SHA (SHA-1). If set to NONE, passwords are stored in the
 8    # database as plain text. The SHA-512 algorithm is currently unsupported.
 9    #
10    #passwords.encryption.algorithm=BCRYPT
11    #passwords.encryption.algorithm=UFC-CRYPT
12    #passwords.encryption.algorithm=MD2
13    #passwords.encryption.algorithm=MD5
14    #passwords.encryption.algorithm=NONE
15    passwords.encryption.algorithm=SHA
16    #passwords.encryption.algorithm=SHA-256
17    #passwords.encryption.algorithm=SHA-384
18    #passwords.encryption.algorithm=SSHA
19
20    #
21    # Digested passwords are encoded via base64 or hex encoding. The default is
22    # base64.
23    #
24    passwords.digest.encoding=base64
25    #passwords.digest.encoding=hex
26
27    #
28    # Input a class name that implements
29    # com.liferay.portal.security.pwd.Toolkit. This class will be called to
30    # generate and validate passwords.
31    #
32    passwords.toolkit=com.liferay.portal.security.pwd.PasswordPolicyToolkit
33    #passwords.toolkit=com.liferay.portal.security.pwd.RegExpToolkit
34
35    #
36    # If you choose to use com.liferay.portal.security.pwd.PasswordPolicyToolkit
37    # as your password toolkit, you can choose either static or dynamic password
38    # generation. Static is set through the property
39    # "passwords.passwordpolicytoolkit.static" and dynamic uses the class
40    # com.liferay.util.PwdGenerator to generate the password. If you are using
41    # LDAP password syntax checking, you will also have to use the static
42    # generator so that you can guarantee that passwords obey its rules.
43    #
44    #passwords.passwordpolicytoolkit.generator=static
45    passwords.passwordpolicytoolkit.generator=dynamic
46    passwords.passwordpolicytoolkit.static=iheartliferay
47
48    #
49    # Set the character sets for password validation.
50    #
51    passwords.passwordpolicytoolkit.charset.lowercase=abcdefghjkmnpqrstuvwxyz
52    passwords.passwordpolicytoolkit.charset.numbers=0123456789
53    passwords.passwordpolicytoolkit.charset.symbols=_.!@$*=-?
54    passwords.passwordpolicytoolkit.charset.uppercase=ABCDEFGHJKLMNPQRSTUVWXYZ
55
56    #
57    # If you choose to use com.liferay.portal.security.pwd.RegExpToolkit as
58    # your password toolkit, set the regular expression pattern that will be
59    # used to generate and validate passwords.
60    #
61    # Note that \ is replaced with \\ to work in Java.
62    #
63    # The first pattern ensures that passwords must have at least 4 valid
64    # characters consisting of digits or letters.
65    #
66    # The second pattern ensures that passwords must have at least 8 valid
67    # characters consisting of digits or letters.
68    #
69    passwords.regexptoolkit.pattern=(?=.{4})(?:[a-zA-Z0-9]*)
70    #passwords.regexptoolkit.pattern=(?=.{8})(?:[a-zA-Z0-9]*)
71
72    #
73    # Set the length and key for generating passwords.
74    #
75    #passwords.regexptoolkit.charset=0123456789
76    passwords.regexptoolkit.charset=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
77    #passwords.regexptoolkit.length=4
78    passwords.regexptoolkit.length=8
79
80    #
81    # Set the name of the default password policy.
82    #
83    passwords.default.policy.name=Default Password Policy


Hope this will help.

Thanks and Regards,
Apoorva Prakash