Mert Caldag
Tue, 21 May 2024 07:00:41 +0000
General

Pega Platform 8.8.3 - Encrypting system data by using a custom key management service

1. I’ve created a GetCustomMccmMasterKey activity under Data-Admin-Security-Keystore class.

I am getting “Failed to add keystore to cache error” message after executing activity. Is there any way to successfully add keystore to cache and get this issue resolved?

I’ve also created a data page described in second step of the document in link below. However, we should resolve the activity error issue first to move further steps.

References

Encrypting application data by using a custom key management service (pega.com)

Other Encryption Approach We Tried After Failing Encrypting system data by using a custom key management service

1. We have used methods (tools.getPRCrypto().encrypt(dataContent) and tools.getPRCrypto().decrypt(dataContent)) from the engine api in order to find different way to achieve encrypt and decrypt on pega platform. However, it is working like one way encryption so we could not achieve decryption with this approach.

Whenever we call tools.getPRCrypto().decrypt(dataContent) function, we are expeting to see “Mert” value but it is showing the encrypted text.

Regarding Other Encryption Approach We Tried After Failing Encrypting system data by using a custom key management service, approach I’ve realised that it is actually working as the pop-up includes the encrypted text trimmed appeared after Show-Property Activity method so that whenever testing decryption with the encrypted text appeared in the pop-up the same value appeared so the perception was two way encryption / decryption not works with the plain text. I’ve realise that whenever writing the encrypted text in one of DB table, there are some space and the tab character at the beginning of {pr}… encrypted text persisted in one of DB table column so whenever testing the decryption with the actual value (copied directly from the DB table column), cipher text decrypted successfully. Nevertheless, this approach is not recommended for encrypting the application data as you can read my last post in this thread. One last note from my end is that apart from the java codes shared in the image, I’ve used encryptPW and decryptPW functions but looks like those functions are also using similar java codes in those function rules. I’ve executed my latest tests on Pega platform 24.2.2 version. I think 8.8.3 version was also working literally same as Pega platform 24.2.2.

Regards.
Mert.

12 posts - 1 participant