Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

ActiveRecord::Encryption::Errors::Configuration: key_derivation_salt is not configured. Please configure it via credential active_record_encryption.key_derivation_salt or by setting config.active_record.encryption.key_derivation_salt #419

Open
adbatista opened this issue May 23, 2023 · 1 comment
Assignees
Labels

Comments

@adbatista
Copy link
Member

View details in Rollbar: https://rollbar.com/punchlock/punchlock/items/173/


ActiveRecord::Encryption::Errors::Configuration: key_derivation_salt is not configured. Please configure it via credential active_record_encryption.key_derivation_salt or by setting config.active_record.encryption.key_derivation_salt
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/encryption/scheme.rb", line 85, in validate_credential
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/encryption/scheme.rb", line 78, in validate_keys!
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/encryption/scheme.rb", line 49, in key_provider
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/encryption/encrypted_attribute_type.rb", line 15, in key_provider
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/encryption/encrypted_attribute_type.rb", line 128, in encryption_options
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/encryption/encrypted_attribute_type.rb", line 115, in block in encrypt
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/encryption/scheme.rb", line 67, in with_context
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/encryption/encrypted_attribute_type.rb", line 15, in with_context
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/encryption/encrypted_attribute_type.rb", line 114, in encrypt
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/encryption/encrypted_attribute_type.rb", line 110, in serialize_with_current
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/encryption/encrypted_attribute_type.rb", line 38, in serialize
  File "/app/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4.3/lib/active_model/type/helpers/mutable.rb", line 8, in cast
  File "/app/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4.3/lib/active_model/attribute.rb", line 179, in type_cast
  File "/app/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4.3/lib/active_model/attribute.rb", line 43, in value
  File "/app/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4.3/lib/active_model/attribute.rb", line 159, in changed_from_assignment?
  File "/app/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4.3/lib/active_model/attribute.rb", line 64, in changed?
  File "/app/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4.3/lib/active_model/attribute_mutation_tracker.rb", line 79, in attribute_changed?
  File "/app/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4.3/lib/active_model/attribute_mutation_tracker.rb", line 45, in changed?
  File "/app/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4.3/lib/active_model/attribute_mutation_tracker.rb", line 41, in block in any_changes?
  File "/app/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4.3/lib/active_model/attribute_mutation_tracker.rb", line 41, in any?
  File "/app/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4.3/lib/active_model/attribute_mutation_tracker.rb", line 41, in any_changes?
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/attribute_methods/dirty.rb", line 160, in has_changes_to_save?
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/timestamp.rb", line 130, in should_record_timestamps?
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/timestamp.rb", line 112, in _update_record
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/persistence.rb", line 1067, in create_or_update
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/callbacks.rb", line 457, in block in create_or_update
  File "/app/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb", line 118, in block in run_callbacks
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/autosave_association.rb", line 370, in around_save_collection_association
  File "/app/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb", line 127, in block in run_callbacks
  File "/app/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb", line 138, in run_callbacks
  File "/app/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb", line 929, in _run_save_callbacks
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/callbacks.rb", line 457, in create_or_update
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/timestamp.rb", line 126, in create_or_update
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/persistence.rb", line 648, in save!
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/validations.rb", line 53, in save!
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/transactions.rb", line 302, in block in save!
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/transactions.rb", line 354, in block in with_transaction_returning_status
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/connection_adapters/abstract/transaction.rb", line 319, in block in within_new_transaction
  File "/app/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb", line 25, in handle_interrupt
  File "/app/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb", line 25, in block in synchronize
  File "/app/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb", line 21, in handle_interrupt
  File "/app/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb", line 21, in synchronize
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/connection_adapters/abstract/transaction.rb", line 317, in within_new_transaction
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/connection_adapters/abstract/database_statements.rb", line 316, in transaction
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/transactions.rb", line 350, in with_transaction_returning_status
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/transactions.rb", line 302, in save!
  File "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/suppressor.rb", line 54, in save!
  File "/app/vendor/bundle/ruby/3.1.0/gems/draper-4.0.2/lib/draper/automatic_delegation.rb", line 12, in method_mis
@adbatista
Copy link
Member Author

repro

Steps to reproduce the issue

Open /user page
Click on Enable 2FA
Expected behavior
Page loads correctly

Actual behavior
HTTP 500

@adbatista adbatista self-assigned this Dec 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant