Last activity: 16 Dec 2016 0:57 EST
How to check if the blob is encrypted ?
I was trying the Encrpyt Blob option available in Class.
I had performed a obj-save and commit on the work object.
Now i need to find whether the blob is really encrypted or not.
Can we use pr_read_from_stream to check if the blob is encrppyted or not
PRPC version: Pega 7.1.7
I expect that if you ran a query using UDFs to try to read a property from the blob it either wouldn't find the property at all or would give you the encryped value.
You could try something like this. The value in the first parameter is the string name of the property that you are looking for. Case is important. Since every blob should have a pxObjClass property that is one that should work for what you want, adjusting the table name and pzInskey value in the where clause as needed.
select pr_read_from_stream('pxObjClass',pzinskey,pzpvstream) from pc_work where pzinskey = 'PEGASAMPLE C-1';
I doubt we can even get pxObjClass from an encrypted stream.
Right. So when it is unencrypted you can read it and when it is encrypted it will come back with no rows found thus proving it is encrypted.
I am able to read it through UDF , it means i missed something for encrypt blob option
Tetrasoft India Private Limited
You may refer following link to cross verify blob encryption once:
Going through the Links,
Till now i have created a DSS crypto.sitecipherclass for holding the value com.pega.pegarules.crypto.PRCipherSampleBF,
Then restarted a single node in multinode environment.
Went to the class and checked the Encrypt Blob option, and did a commit on a work object.
But still able to read the blob content through udf.
I doubt if PRCipherSampleBF exist in our system, as i tried to isntantiate it in java step method i get error saying that cannot resolve com.pega.pegarules.crypto
Will it be ok to raise an SR for detailed steps for encryption of BLOB, inlcuding detailed steps for runPega Utility? It seems the runPega Utility is not working,
(echo $1|cut -c1-2)" = "--" is not getting executed
If hard code the driver prweb, and propfile, still it gives classnotfound error
What will be my dynamic sysem setting for enabling encryption, suppose my class for encryption is com.pega.pegarules.crypto.PRCipherSampleBF,then the setting is crypto.sitecipherclass and com.pega.pegarules.crypto.PRCipherSampleBF in Pega-Engine Ruleset ?
P.S Steps followed to enable encryption
1. Used RunPega Utility to run the List the supported Cipher
2. Used RunPega Utility to Create Cipher[Got the Java code]
3. Used CompileandLoad Utility to load the java code generated [By Replacing the class name and package name com.pega.pegarules.crypto.PRCipherSampleBF]
4. Created DSS setting specified above.
5. Restarted the 2 nodes out of the 4 nodes.
6. Clicked on Encrypt Blob on the Class, and performed a commint on the work object of that class.
7. Still able to read the blob from udf
What is DSS and other settings that needs to be done to apply the Encryption
As you can see in this article under the section "Updating the prconfig.xml file to refer to the new cipher class" you can see the prconfig setting that is needed to specify what the cipher class to use is.
While most prconfig settings can be specified as DSS instead I am not sure if this particular prconfig setting is one that can be specified as a DSS. Refer to this article for how to set prconfig values as DSS.
encryptPropertyValue method can be used to check if the encryption is hapeening or not.
If encryption is happening then it returns the encrypted value otherwise it gives error , "No cite specific cipher present"