(I understand this is an ancient question, but as the author of the related blog post, I wanted to add a few comments)
As the accepted answer says, everything is correct. Once your file system is compromised, there is no protection. In addition, yes, if poorly written, you can provide the data in unencrypted form. This tool was intended simply to simplify the processing of data encryption in the database. If you do not like the automatic decryption function, it would be trivial to remove the afterFind () callback for the behavior so that it no longer works, as well as any number of other adjustments that could improve security (due to convenience).
I hope this helps someone else who stumbles on this post. Someone has it since I just got a couple of hits on my blog from this question. :)
source share