obl-ong / panel

Multi-tenant domain services built with Ruby on Rails, open source and forever free. Powering the obl.ong domain registry.
https://obl.ong
20 stars 5 forks source link

Add ActiveRecord::Encryption to models #100

Closed reesericci closed 7 months ago

reesericci commented 7 months ago

This pull requests adds ActiveRecord::Encryption to models to enable the encrypting of member data like names/emails/public key credentials/etc.

Steps to migrate your data

  1. Add config.active_record.encryption.support_unencrypted_data = true to your config/application.rb temporarily to allow for accessing cleartext data.
  2. Add config.active_job.queue_adapter = :solid_queue to app/environments/development.rb & allow for solid queue in config/puma.rb to start solid queue in development
  3. Start the rails server
  4. Run bin/rake mass_encryption:encrypt_all_in_parallel_jobs EXCEPT="ActionText::EncryptedRichText" --trace to create jobs that will encrypt all the data
  5. Run SolidQueue::Job.all.first.dispatch to start the job
  6. Check Mission Control to check on it
  7. You're done (hopefully)

If someone could write a rake task that would be greatly appreciated!

Closes #90