-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ideas #40
Comments
there is any way to do a select with order ? example: Customer.all.order(:name), where name is blinded. |
No, you'll need to do sorting in memory ( |
ok, thanks a lot ankane, and congratulations for the gem. |
Is it possible to support ranges? i.e, class Post
encrypts :date, type: :date
blind_index :date
end
Post.where(date: ..Date.today)
Post.where(date: Date.today..)
Post.where(date: Date.yesterday..Date.today) Or is it a similar issue to using order? |
Since dates are discrete, you could pass an array of dates instead of a range. However, creating blind indexes on dates in general will leak a lot of information since it'll show which records have the same dates. |
This might be a dumb question, but I'm trying to LIKE search against an encrypted column using Blind index and it doesn't seem possible. Example. Candidate.joins(:profile).where("candidate_profiles.encrypted_inmate_number ILIKE ?", "%W45%")
=> ERROR: column candidate_profiles.encrtyped_inmate_number does not exist (profile is an alias in this example) The only value I'm able to search against is the Is there any way to achieve this kind of LIKE search for encrypted values? Didn't want to open a separate issue since this seems in line with the design of encrypting data. update |
fwiw, there's a section in the readme on this w/ alternative approaches. |
Whoops, missed this in my haste 😬 . Appreciate the callout! |
Any chance of adding Sequel support or guiding me on how I might go about implementing it? |
I don't have any plans to support Sequel, but you can check out # insert
users.insert(email_bidx: BlindIndex.generate_bidx("test@example.com", key: key))
# query
users.where(email_bidx: BlindIndex.generate_bidx("test@example.com", key: key)) |
Thanks for pointing me in the right direction, Andrew. This is needed for an active project, so I'll be diving in soon. If I'm feeling super ambitious, I may make a Sequel fork and try to remain as parallel as I can! |
No problem. Also, if you haven't already seen it, it looks like Sequel has a plugin for searchable encryption. https://sequel.jeremyevans.net/rdoc-plugins/classes/Sequel/Plugins/ColumnEncryption.html |
3.0
serialized_hash
(not great forinspect
) -serialized_hash
branchIdeas
activerecord61
branchupdate_column
andupdate_columns
-update_columns
branchsensitive: true
orextra_sensitive: true
overslow: true
The text was updated successfully, but these errors were encountered: