ankane / active_kms Goto Github PK
View Code? Open in Web Editor NEWSimple, secure key management for Active Record encryption
License: MIT License
Simple, secure key management for Active Record encryption
License: MIT License
Im trying to use this gem to encrypt data. Ive put into my application.rb the following line:
config.active_record.encryption.key_provider = ActiveKms::AwsKeyProvider.new(key_id: Figaro.env.KMS_KEY_ID)
But when I try saving my model I get the following error
/home/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activerecord-7.0.2.4/lib/active_record/encryption/scheme.rb:85:in `validate_credential':
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 (ActiveRecord::Encryption::Errors::Configuration)
Previously I had this in my application.rb fiole
config.active_record.encryption.primary_key = Rails.application.credentials[:active_record_encryption][:primary_key]
config.active_record.encryption.deterministic_key = Rails.application.credentials[:active_record_encryption][:deterministic_key]
config.active_record.encryption.key_derivation_salt = Rails.application.credentials[:active_record_encryption][:key_derivation_salt]
but I removed it as I assumed I wouldnt need it if the activerecord encryption uses the KMS key. Is there something Im missing? Do i still need the default configuration?
Hello!
Currently it appears that the old log styling syntax is resulting in a noisy deprecation warning about using a boolean vs. bold: true
for bolding a log line. The code has already been fixed as of c2d825c, it's just not released yet.
Could you cut a release with the change? Without it a frequent KMS-calling suite has a lot of this:
Bolding log text with a positional boolean is deprecated and will be removed
in Rails 7.2. Use an option hash instead (eg. `color("my text", :red, bold: true)`).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.