Enhancement 209 : ENHANCEMENT - Add support for DB Encryption of properties
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.4.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
23/01/2010
Updated 
23/01/2010
Type 
Enhancement
 
Attachments 
No attachments

Add support for using DB encryption functions to encrypt and decrypt properties.

Although configurable this translates to using MySql AES_ENCRYPT() and AES_DECRYPT(), Postgres pgp_sym_encrypt() and pgp_sym_decrypt(), Oracle DBMS_CRYPTO.ENCRYPT etc.

 
Rob 23 Jan 08:39
@Encrypted and ...

To use this feature you can mark any property you want encrypted with the @Encrypted annotation.

For H2, MySql, Postgres there is a default DbEncrypt implementation but otherwise you can configure a DbEncrypt implementation.

You will also need to implement the EncryptKeyManager interface to supply keys for the encryption and decryption.

Rob 26 Jan 09:21
Local Encryption support for byte[] ...

Added code to support the use of local encryption (rather than DB function) to encrypt byte[] content.

Optionally you can use the local encryption to encrypt other property types as well.

It is expected that DB encryption will be the preferred option for encryption of String content but that can be set via using @Encrypted(dbEncryption=false).

Rob 26 Jan 09:22
Fixed in HEAD

Code in HEAD.

Rob 11 Feb 10:32
Issues with raw query language

Note that there was issues using the raw query language.

List<EBasicEncrypt> qlList = 
            Ebean.createQuery(EBasicEncrypt.class)
                .setQuery("where description like :d")
                .setParameter("d", "testde%")
                .findList();

Rob 11 Feb 10:32
Fixed in HEAD ... the Issues with raw query language

So ready for some more testing again.

woResponse

Upload a file