Skip to content

Commit

Permalink
Add ActiveRecord encryption test seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
rgarner committed Feb 5, 2025
1 parent 2120f54 commit 718fead
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ REDIS_URL=redis://localhost:6379
SECRET_KEY_BASE=abcdefghijklmnopqrstuvwxyz12345678
NOTIFY_VIEW_TEMPLATE=b541df04-add8-458e-a7d3-2e156386e150
NOTIFY_OTP_VERIFICATION_TEMPLATE=1a832f2e-b13b-47f0-b32a-9cd6672364d2
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=yO1HDsDP6Eu5y7zkgqD97T6w5U4xmhH2
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=AS3X6Ikv2qCawCIYKJpIe5NHJXFaYLg3
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=gCtDin0pxDs3jE6OyzC1oTooNa0YICcF
4 changes: 4 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ class Application < Rails::Application

config.time_zone = "London"

config.active_record.encryption.primary_key = ENV["ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY"]
config.active_record.encryption.deterministic_key = ENV["ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY"]
config.active_record.encryption.key_derivation_salt = ENV["ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT"]

# Default headers
config.action_dispatch.default_headers["X-XSS-Protection"] = "0"

Expand Down

0 comments on commit 718fead

Please sign in to comment.