Are there any security recommendations for using Rails and Heroku Postgres with the PGP public key pgcrypto.
A naive and direct way is to store the private key and password using Heroku ENV variables. However, it seems like it does not add much security, since now both values โโare easily accessible to anyone who has access to the environment.
The purpose of this would be to encrypt any confidential information, such as SINs, appropriately.
Scenario:
Suppose you have several fields that require a specific or standard privacy requirement that is required to store data, such as government identifiers (such as SINs). What is a suitable or even common process for encrypting this information with pgcrypto.
If anyone has an alternative suggestion for the script, I would be happy to include it as well.
ruby-on-rails postgresql encryption heroku
Chris nicola
source share