Search code examples
passwordssap-commerce-cloudbackoffice

Password Policies to be set for User credentials in hac and BackOffice in Hybris 6.7


We have a requirement where in we need to set the Password Policies like -1 Digit to be mandatory. -1 Special character to be mandatory -length to be minimum 8-25 characters.

Additionally we need to implement password history upto to last 3 password set, only for hac and Backoffice users i.e for Employee group.

Is there any OOTB features available to achieve this.Pointers for this requirements will be very helpful. We are using hybris 6.7.0.0 version.


Solution

  • Hybris offers OOTB(Out Of The Box) the possibility to set password policies for employees. This can be achieved by

    • setting multiple regex in local.properties which will be used for validating the new password. Ex:

      password.policy.regex.required.mustcontainuppercaseletter=.*[A-Z]+.*

    • specifying the user group for which these policies will apply

      password.policy.regex.groups.included=CustomUserGroupOnWhichPoliciesWillApply

    • configuring some internationalized messages to be displayed when a certain policy is not met

      password.policy.violation.regex.required.mustcontainuppercaseletter=Password must contain at least 1 upper case letter.

    More information about setting the password policies can be seen here: https://help.sap.com/viewer/d0224eca81e249cb821f2cdf45a82ace/1905/en-US/dfeec89a46c64774892b46936d65d530.html