Attribute Converter with context based encryption [message #1849087] |
Mon, 03 January 2022 09:33 |
Hans Pikkemaat Messages: 9 Registered: January 2021 |
Junior Member |
|
|
Hi,
I'm using eclipselink 2.7 with payara server and JPA for persistence. I'm using AttributeConverters to encrypt my fields and that works great. I love the separation between the model and persistence.
I have a requirement now to enhance security by using a different encryption scheme where context based encryption is used. Effectively this means I need to pass some external data which is used for encryption and decryption.
E.g. when you have an order system this could be an order number and account number. The security enhancement then would be : if you don't pass the same order and account number then you cannot decrypt the data.
The problem however is that an attribute converter does not allow to pass context so I'm unable to get this working.
A simple approach would be to simply do it programmatically, so when I set a field simply encrypt the data at that point. I however don't like this because I need to change the field types in the model or add extra fields in the model where the encrypted data is stored.
So my question is : does eclipselink provide a mechanism where such an encryption schema can be applied without changing the model.
best regards,
Hans
|
|
|
Powered by
FUDForum. Page generated in 0.01515 seconds