Wednesday, 26 June 2013

Password policy in Alfresco Share

Many of us have a requirement in our projects to implement password policies when creating or editing users.
If you are required to implement the same in Alfresco Share, I am ready with the code and UI.

You can customize the password policy according to the project requirement like:
  • Min 1 special char, 1 case-sensitive letter, 1 case-insensitive letter, 1 number required
  • Min password length – 6, max password length – 20 required
  • Min 3 special char, 3 numbers and 1 case-sensitive letter, etc. required

Can be any one of the mentioned above or a new one.


Here is the implementation part:

When a new user is created in share, the password field has a default validation (of minimum 3 characters). I have put a new constraint that atleast 6 characters are required with minimum 1 number, 1 special character, 1 case-sensitive and 1 case-insensitive letter.

If anyone of the above is violated, it won't be accepted.
The following screenshots demonstrate the same.


The password entered (as shown in above screenshot) is only four characters and that too without containing any special character, number or case-sensitive letter.

On clicking "Create User" button, a message as shown in below screenshot will be displayed.



Until the user enters a password with the above defined password policy, it won't be accepted.

Similar implementation is done while editing user details.\



Also, when a user tries to change his password,



he won't be allowed until he follows the pre-defined password policy.



Contact me if anybody has such requirement to be implemented.

Thank you for going through the blog.  

5 comments:

  1. Dear Sanket,

    We want to implement such password policy in our environment. Please revert.

    With Regards,
    Manish Patel
    manish@tmspl.com

    ReplyDelete
  2. Dear Sanket,

    We want to implement such password policy in our environment, too.

    Please help me.

    best regards,

    jinyyo71@gmail.com

    ReplyDelete
    Replies
    1. Sure. Which version of alfresco you are using? I did the share customization for an older version

      Delete
  3. Can you please send me code to zawminoomm@gmail.com? I am using version 5. Thanks.

    ReplyDelete
  4. hello, is it useful for version 5.2 comunitty ?, panda1200@hotmail.com would help me a lot

    ReplyDelete