Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Securely store p12 file in rails

How do I securely store my p12 file in rails? My production web app will be in Heroku. The file is used to sign some documents dynamically.

like image 735
Kidada Avatar asked Oct 07 '22 07:10

Kidada


1 Answers

Storing the p12 contents in an environment variable should be sufficiently secure on Heroku. This way it's at least not available in your code base or through your database.

You can setup Heroku environment variables like this:

heroku config:add P12_CONTENTS="$(cat /path/to/file.p12)"
like image 105
Lee Ourand Avatar answered Oct 10 '22 04:10

Lee Ourand