1.1 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; publicclass CustomUserCryptographyProvider implements IUserCryptographyProvider { @Override public String decrypt(String value) { // TODO Auto-generated method stub returnnull; } @Override public String encrypt(String value) { // TODO Auto-generated method stub returnnull; } }
- Add one entry in Preferences.xml if not present for name
'UserConfig’
Example:
<Preference name="UserConfig’" PreferencesProvider="com.ofss.digx.infra.config.impl.DBBased PropertyProvider" 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);
- Add provider that implements
Note:
If above configuration is done, it will useCustomUserCryptographyProvider
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.
Parent topic: OBAPI User Password Print Configuration