Skip to content
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

Ebean should support also IN for local encrypted properties. #2774

Closed
rPraml opened this issue Aug 5, 2022 · 4 comments
Closed

Ebean should support also IN for local encrypted properties. #2774

rPraml opened this issue Aug 5, 2022 · 4 comments

Comments

@rPraml
Copy link
Contributor

rPraml commented Aug 5, 2022

While the current documentation is very clear, that EQ (and only EQ) is supported for encrypted properties, I noticed, that IN is currently not supported (which is semantically only a concatenation of multiple EQ queries)
So the documentation is right here ;)

I ponder if all exact match queries ("eq","ne","in","notIn") should work for encrypted properties? I see no technical reason, why they should not.

What do you think?

Expected behavior

found = Ebean.find(EBasicEncryptClient.class)
      .where()
      .in("description", "goodbye")
      .in("status", EBasicEncryptClient.Status.TWO)
      .in("dob", today) // <-- throws a Data Conversion error
      .findOne();

should work

@rbygrave
Copy link
Member

rbygrave commented Aug 8, 2022

The implementation detail for this to do database side (using database functions) probably isn't conducive to IN.

Have you looked at how this could be done with IN (especially on non-Postgres dbs that don't have array binding)? Everything is doable but my impression is that this would probably be messy implementation wise.

Do you need this functionality?

@rbygrave
Copy link
Member

rbygrave commented Aug 8, 2022

Oh, are you saying ONLY for client side encryption support this case?

@rPraml
Copy link
Contributor Author

rPraml commented Aug 9, 2022

Yes, I meant client side encrypted properties.

I can check, if it will also work with server side encryption.

rbygrave added a commit that referenced this issue Nov 2, 2022
…or-in

#2774 Locally encrypted properties can be used in "in" queries
@rPraml
Copy link
Contributor Author

rPraml commented Nov 2, 2022

closed. See #2872

@rPraml rPraml closed this as completed Nov 2, 2022
rbygrave added a commit that referenced this issue Nov 7, 2022
Add Postgres specific support for binding an array of byte[] with ANY(?)
which is used as with client side encryption where the bind values are
implicitly converted to byte[].

Fixes Postgres specific failure running TestEncryptClientSide.java
rbygrave added a commit that referenced this issue Nov 7, 2022
Add Postgres specific support for binding an array of byte[] with ANY(?)
which is used as with client side encryption where the bind values are
implicitly converted to byte[].

Fixes Postgres specific failure running TestEncryptClientSide.java
rbygrave added a commit that referenced this issue Nov 7, 2022
rbygrave added a commit that referenced this issue Nov 7, 2022
… prop.isDbEncrypted() and prop.isLocalEncrypted()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants