18F / myusa

MyUSA was a single sign-on project for government, now deprecated. (More info: https://18f.gsa.gov/2015/05/18/myusa/)
Other
42 stars 9 forks source link

Support zero-downtime key rotation #730

Open harrisj opened 9 years ago

harrisj commented 9 years ago

While it is currently possible to change the database key by dumping it and reloading with a new key environment variable, this is impossible to do without significant uptime. We really should be better prepared for key rotation, whether in reaction to staff leaving the project or some mandated policy requiring us to change keys every year.

Luckily, @yozlet has found an excellent primer on how to properly do field-level encryption in Rails projects and easy key rotation that we should probably adopt. This will require some substantial changes to our current database model though:

It's a big thing, but it's really good for security and flexibility.