Fill an encrypted text field from a record producer for user wo any role

Patrick Boutet
Mega Expert

Hi

We have a record producer to create data in a specific table (say u_test)
This table contains an encrypted text field (say u_secret)
Itil role is associated to a specified encryption context

When an itil user creates a record in this table using our record producer, everything is fine.
Field u_secret is encrypted using our encryption context

But when end users (without any role) do the same thing, field u_secret is empty.

We tried

1. Direct mapping to field from record producer
2. Script in RP with 
current.u_secret.setContextID(ourEncryptionContextId);
current.u_secret.setDisplayValue(producer.u_secret);

3. Business Rule to encrypt  field u_secret when inserting data in table u_test

None of these works ! 

I think that the issue could be related to the fact that users without any role could not be associated to our Encryption Context.

Do you have any idea ?

Regards

1 ACCEPTED SOLUTION

Ian Mildon
Tera Guru

I have previously used Easy Encryption from the Share site to handle this issue. By use of the "to_be_encrypted" field you can have a public facing text field that anyone can enter data in plain text, and on the "back end" the data is encrypted to the encryption context selected.

On my Record Producer I had the following in the Script section to handle the text and formatting:

current.to_be_encrypted = 'NPI Number: ' + producer.npi_num + '\n' + 'Care Team: ' + producer.care_team; //pass data for encryption

 

But one thing you will need to consider when using encryption off of a Record Producer; all variables are stored in plain text. You will need to do some follow-up scripting to remove the entries on the question_answer table.

View solution in original post

8 REPLIES 8

Ian Mildon
Tera Guru

I have previously used Easy Encryption from the Share site to handle this issue. By use of the "to_be_encrypted" field you can have a public facing text field that anyone can enter data in plain text, and on the "back end" the data is encrypted to the encryption context selected.

On my Record Producer I had the following in the Script section to handle the text and formatting:

current.to_be_encrypted = 'NPI Number: ' + producer.npi_num + '\n' + 'Care Team: ' + producer.care_team; //pass data for encryption

 

But one thing you will need to consider when using encryption off of a Record Producer; all variables are stored in plain text. You will need to do some follow-up scripting to remove the entries on the question_answer table.

Hi and thanks for your advice, 

I installed Easy Encryption but have the same issue

Creator of the record may see encrypted field but other users may not.

I didn't find any UI Policy or ACL that could cause this 

Any idea ?

 

Thanks, 

This share development is just fine.

Is it safe to remove or clear entries in question_answer table ?

Regards

Yes it is okay to clear the values on the table. It is intended more as a reference and a means to transfer variables from record producers to generated records.