adding encryption security to your Rails user file

By | April 16, 2016

Our Rails app needed to keep user name and account information more secure, so we implemented
an encryption gem to store encrypted data. This encryption allows for writing and reading
encrypted field contents, and it isolates the encryption fields to the rails model
and database, while allowing the rest of the rails application – controller and views –
to use “normal” field names. This is demonstrated below using rails console.
———————————————————————————
encryption file mods
———————————————————————————
encryption demo 4
(Command image pulled from Heroku, substitue ATTR_ENCRYPT_KEY, or whatever you
name your environment variable.)
Configuration_and_Config_Vars___Heroku_Dev_Center
———————————————————————————
enccryption demo 1
———————————————————————————
encryption demo 3

Leave a Reply

Your email address will not be published. Required fields are marked *