MicroStrategy ONE
Adding Custom Password Validation Rules
In this scenario, you add custom password rules that are validated each time a user changes his or her password. For example, you can specify that a password must consist of six alphanumeric characters and include at least one numeric character and one capitalized alpha character. Or, you may want to specify that a user cannot include his or her name in the password or reuse any of the previous five passwords. This feature allows you to integrate corporate password policy into your MicroStrategy applications.
This customization can be accomplished using either of the following methods:
Deploying the plug-in provided with MicroStrategy SDK
MicroStrategy SDK provides a plug-in (ZIP file) that can simply be extracted to thepluginsfolder to view the customization in MicroStrategy Web. The following steps guide you in locating the plug-in and deploying it.
-
Access the plug-in: JSP version or ASP .NET version.
-
Extract the plug-in to the plugins subfolder inside the MicroStrategy Web installation folder.
-
Launch MicroStrategy Web to view the customization.
Using the Web Customization Editor to create a plug-in
MicroStrategy SDK provides a Web Customization Editor that can be used to create a customization plug-in. The following steps guide you in creating the plug-in and deploying it.
-
Click on MicroStrategy Web Configuration inside the Application Settings view to expand the hierarchical tree. The expanded list comprises the different settings that can be modified to perform customizations.
-
Click on Pages to expand the list of pages used in MicroStrategy Web.
-
Navigate to chPwd (Change Password)->Beans.
-
Right-click changePassword (Type=ChangePasswordBean) and select New Event Handler. This launches the Custom Event Handler Creation wizard. In this step you create an event handler that contains logic to check whether new passwords contain between six and eight characters and have at least one numeric character.
-
Click Browse to select the source folder for the project.
-
Enter com.microstrategy.sdk.samples.events in the Package text field.
-
Enter CustomChangePasswordEventHandler in the Name text field.
-
Select the radio button for Use Existing Event.
-
Click Next.
-
Click Finish. CustomChangePasswordEventHandler.java opens in the editor. The sample, CustomChangePasswordEventHandler.java, contains the entire code for this custom event handler. This code contains logic to check whether new passwords contain between six and eight characters and have at least one numeric character. You can modify this sample code to use other password rule logic by replacing the code that follows the comment //Custom logic to validate password and precedes the comment //Regular handling to change password.
-
Save your changes.
-
Navigate to Pages->prefChPwd (Preferences Change Password)->Beans->changePassword (Type=ChangePasswordBean).
-
Double-click changePassword (Type=ChangePasswordBean) to launch the Bean Properties editor in the right frame.
-
In the Properties section, enter com.microstrategy.sdk.samples.events.CustomChangePasswordEventHandler in the text field for Event Handler.
-
Save your changes.
-
Launch MicroStrategy Web to view the customization.
See Also
-
Fundamentals of customization: Page Configuration file
-
Customizing Events: Events and Event Handling