betterapp/laravel-db-encrypter

Command to roll key

Jamesking56 opened this issue · 1 comments

Would be nice if this package could also provide an artisan command to help with rolling over a key if it has been accidentally leaked.

  1. Put app in maintenance mode
  2. Generate a new key (don't store in APP_KEY yet)
  3. Go through every model's encrypted values and decrypt / re-encrypt using new key.
  4. Set APP_KEY to new key.

good point. I will think about to develop it