To allow Administrators and other Application Definition writers to practice their Application Definition creation skills, the Password Test application is included in the software package. It is designed to replicate an application logon panel and supports the following processes:
If you do not have the test application, contact Novell Technical Support.
The following example, Application Definition for the Password Test application, further explains the SecureLogin Application Definition principles.
The Application Definition for the PSL Password Test Application (PasswordTest.Exe) provides an example of a typical Windows* Application Definition, including error handling and changing the password. Remember, the password for this application is hard coded to single when the application is closed and restarted. This can cause confusion when setting strong password policies and changing passwords. You must also create a password policy called PwdTestPolicy, per the password policy defined in this Application Definition. The password policy must require a minimum of 6 characters, but no complex rules, in order to use single as a password.
Here is the sample Application Definition in its entirety. Following this Application Definition is the explanation of what each section does.
# Set Password Policy RestrictVariable $Password PwdTestPolicy Application Definition continued on the next page # ==== BeginSection: Log on ==== Dialog Class "#32770" Ctrl #1001 Title "Log on" EndDialog SetPrompt "Username =====>" Type $Username #1001 SetPrompt "Password =====>" Type $Password #1002 SetPrompt "Domain =====>" Type $Domain #1003 Click #1 SetPrompt "Please enter your Username and Password to access NSL Test. SecureLogin will remember and automatically log you on in future. IT Helpdesk x4546" # ==== EndSection: Log on ==== # ==== BeginSection: Log on Failure ==== Dialog Class "#32770" Title "Log on Failure" EndDialog # Read the error message and set it as a temporary variable, then clear it ReadText #65535 ?ErrorMessage Click #2 # If log on failed, display the current stored Username and Password and prompt the user to verify them, then retry log on If "You have failed to log on." -In ?ErrorMessage DisplayVariables "Log on to PSL Test Application failed. The password for this app must be single when it first starts up. IT Helpdesk x4563" # Press Alt>F and L to invoke the Logon box so the User doesn't have to. Type -Raw "\Alt+F" Type -Raw "L" Type $Username Type $Password Type $Domain EndIf # ==== EndSection: Log on ==== # ==== Begin Section: Change Password ==== # Change Password Dialog Box Dialog Class "#32770" Title "Change Password" EndDialog # Backup password, fill in the Old Username and Password, then start the change password routine Application Definition continued on the next page Set ?PwdBackup $Password Type $Username #1015 Type $Password #1004 ChangePassword ?NewPwd "Please enter a new password for the appli-cation." Type ?NewPwd #1005 Type ?NewPwd #1006 Click #1 # Change Password Successful message Dialog Class "#32770" Ctrl #65535 "You have changed the password successfully." Title "Change Successful" EndDialog # Clear Application owned message and accept new password Click #2 Set $Password ?NewPwd # ==== End Section: Change Password ====
You can use the same Application Definition to show what function each section performs. Dialog/EndDialog blocks define a windows dialog box. When the dialog box appears, SecureLogin detects this dialog box is based on the information found within the dialog block. The Dialog/EndDialog block must contain enough information for the block to be unique, or the Application Definition will run when other dialog boxes owned by the same executable with the same information appear.
When SecureLogin detects all the information between Dialog and EndDialog is contained in the dialog box on the screen (for example, the application logon box, the change password box, or the failed logon box), it runs the Application Definition commands until it sees the next dialog statement or the end of the Application Definition, whichever is applicable. The order does not matter in windows Application Definitions, because SecureLogin watches for all dialog boxes while the executable is running. Use a logical order for troubleshooting purposes.
The following Application Definition example shows screen captures of the relevant dialog boxes. You can use the Window Finder tool to gather information about the title of the window, class names, dialog IDs, and so on. Use the wizard to automate the Application Definition creation.
Table 6-1 Description