Create a login rule
The login rules are applied when a user logs into the application. Use the login rules to validate either the number of failed login attempts by a user or the number of failed login attempts from a specific URL. The login rule can also be used to check expiry of passwords.
Procedure
-
In Application Manager, perform the following steps:
- Expand the Configure User Security group.
- Click the icon adjacent to Define Rules For Password Policies.
- Open the Applications Manager and select Password Policy Management > Password Rule Definition. The Password Rule Definition List window is displayed.
- In the list window, click the Create New icon. The Rule Definition Details window is displayed.
-
Specify the following:
Field Description Rule Name Specify a name that is indicative, for the new rule. There is no restriction as to the length, case and type. Rule Description Provide a description for the rule. Class Name The login rules must be implemented in the IPasswordPolicyForLogininterface.Each rule definition has its own class for implementation. Specify the class to be used for validating the parameters provided in the policy configuration. This class must implement the interface associated with the specified rule type.
We provide the following class as a reference on how
IPasswordPolicyForLoginis implemented as out-of-the-box. For example,com.yantra.ycp.passwordpolicy.defaultimpl.login.YCPFailedLoginValidatorNote: The example implementation that is provided out of the box is not a full working example of how the interface should be implemented. You must add further logic to implement the login rules.Rule Type Select Login from the drop-down list. The interface associated with this rule is specified in Class Name.
- After you define a rule, you must define the rule parameters. Click the Create New icon in the Rule Parameters panel. A pop-up window is displayed.
-
Specify the following:
Field Description Name Specify a parameter name that is indicative. The parameter name must be unique as this value is used in the class that validates the rule. Description Provide a description of the parameter. Data Type Specify the data type (number, string, long etc) of the parameter.
- Click OK to close the pop-up window.
- Repeat steps 5-6 to add more rule parameters, as applicable.
- Click the Save icon in the Rule Definition Details panel to save the rule definition details.
- Proceed with configuring the policy parameters.