USER PASSWORD PRINTING CONFIGURATION GUIDE
The User Password Printing Guide contains following:
- Configure Password Encryption/Decryption Provider
- Configure Password Printing adapter
Configure Password Encryption/Decryption Provider
- When you create any new user or reset password for any existing user, user credential gets stored in system using two way cryptography so that same to be available for password printing
- To override existing cryptography implementation, you need to perform following steps:
- Add provider that implements com.ofss.digx.app.sms.crypto.IUserCryptographyProvider. Here you can add encryption and decryption implementation for Password.
Example:
package com.ofss.digx.app.sms.crypto;
public class CustomUserCryptographyProvider implements IUserCryptographyProvider {
@Override
public String decrypt(String value) {
// TODO Auto-generated method stub
return null;
}
@Override
public String encrypt(String value) {
// TODO Auto-generated method stub
return null;
}
}
- Add one entry in Preferences.xml if not present for name ‘UserConfig’
Example:
<Preference name="UserConfig’" 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 = 'UserConfig’'" syncTimeInterval="36000000" />
- Add one entry in database table digx_fw_config_all_b for category_id =’UserConfig’ and prop_id =’USER_CRYPTO_PROVIDER’
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_CRYPTO_PROVIDER','UserConfig ','com.ofss.digx.app.sms.crypto.CustomUserCryptographyProvider ','N',null,'Custom provider for Password Encryption and decryption','ofssuser',sysdate,'ofssuser',sysdate,'A',1);
Note: If above configuration is done, it will use CustomUserCryptographyProvider for password encryption and decryption and same encrypted password will be stored in DIGX_UM_PWD_PRINTINFO table. Currently by default com.ofss.digx.app.sms.crypto.UserCryptographyProvider provider will used if no configuration is done.
Configure Password Printing adapter
- After successfully storing password in System, same will be available for printing to administrator.
- Currently when admin performs password printing for user, password printing data stored in system in blob using adapter.
- To override existing password printing implementation, you need to perform following steps:
- Add adapter that implements com.ofss.digx.app.sms.user.printinformation.provider.IUserInformationPrintAdapter. Here you can add implementation for printing document for a user. PasswordPrintInformationDTO object will contain username, password and other documents(Password Letter/Welcome Letter).
Example:
package com.ofss.digx.app.sms.user.printinformation.provider;
import com.ofss.digx.app.sms.dto.user.printInformation.PasswordPrintInformationDTO;
import com.ofss.digx.infra.exceptions.Exception;
public class CustomUserInformationPrintAdapter implements IUserInformationPrintAdapter {
@Override
public void print(PasswordPrintInformationDTO userprintDTO) throws Exception {
// TODO Auto-generated method stub
}
}
- Add one entry in Preferences.xml if not present for name ‘UserPrintConfig’
Example:
<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" />
- Add one entry in database table digx_fw_config_all_b for category_id =’UserPrintConfig’ and prop_id =’USER_INFORMATION_PRINT_PROVIDER’
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);
Note: If above configuration is done, it will use CustomUserInformationPrintAdapter for user Password Information printing. Currently by default com.ofss.digx.app.sms.user.printinformation.provider.UserInformationPrintAdapter adapter will used if does not found any configuration.