3.6 Configuring Password Printing Securely
Banks need to provide new customers with system-generated credentials to enable them to login into the system for the first time. Some of the banks prefer to print the first time password on paper and then hand it over to the customer in person.
To enable banks to do this, OBAPI has the “Print Password” function built out of the box. However, the base OBAPI product will not provide an end-to-end solution since password printing is not something universal.
For the sake of this explanation, we are going to break up the process of Password Printing into 6 steps:
- Generate the password using a secure random number generation mechanism.
- Encrypt the password.
- Store the password in the Database.
- Retrieve the password for printing.
- Decrypt the password.
- Do the actual printing.
Steps 2 and 5 can be customized, but not mandatory. Please refer to section Implementing a custom Cryptography Provider.
However, it is mandatory to implement Step 6. Here is how you can plug-in your implementation of printing the password:
- Write a custom class that will implement the interface com.ofss.digx.app.sms.user.printinformation.provider.IUserInformationPrintAdapter
- The interface defines a single method as shown below:
- The DTO passed to the
print()
method will contain the password that is needed for printing. - Also, add the following entry to the file Preferences.xml
<Preference name="UserPrintConfig’" PreferencesProvider="com.ofss.digx.infra.config.impl.DBBasedPropertyProvider" parent="jdbcpreference" propertyFileName="select prop_id, prop_value from digx_fw_config_all_b where category_id = 'UserPrintConfig'" syncTimeInterval="36000000" />
- Run the following Database
script
Insert into DIGX_FW_CONFIG_ALL_B (PROP_ID, CATEGORY_ID, PROP_VALUE, FACTORY_SHIPPED_FLAG, PROP_COMMENTS, SUMMARY_TEXT, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATED_DATE, OBJECT_STATUS, OBJECT_VERSION_NUMBER) values ('USER_INFORMATION_PRINT_PROVIDER','UserPrintConfig', 'com.ofss.digx.app.sms.user.printinformation.provider.CustomUserInformationPrintAdapter','N',null,'Custom adapter for User Password Information Printing','ofssuser',sysdate,'ofssuser',sysdate,'A',1);
Parent topic: Guidance for Implementation Teams