How to proper handle backend only columns in shapes? #2252
gartz
started this conversation in
Bug reports
Replies: 1 comment 1 reply
-
This seems like a bug actually :-D The "columns" feature was added fairly recently and it looks like we forgot to filter the schema down to just the selected columns. You could definitely trim down the schema yourself in the meantime in your proxy but we should be able to get this fixed fairly soon. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, I want to say I really appreciate the concepts behind Electric-SQL—it's an amazing project!
While learning about the shapes for proxy/gatekeeping, I noticed the recommendation to filter out sensitive or backend-only columns to ensure they aren't exposed to the client. However, I observed that the
electric-schema
header still includes columns that are not part of the shape.Example
For instance, a
users
table might include sensitive columns such assalt
andpassword_hash
, which shouldn't be synced with the client. However, columns likeusername
andemail
should be exposed. Despite excluding sensitive columns from the shape, they still appear in theelectric-schema
header.Question
What is the best approach to address this issue? Could the documentation provide more clarity on this scenario? Some potential solutions I've considered are:
electric-schema
JSON: Modify the schema header to include only client-safe columns before propagating it.Could you provide guidance on the recommended approach or suggest a best practice? Additionally, if a specific method is preferred, it would be helpful to include it in the documentation for others encountering this scenario.
Thank you for your time and for building such an exciting tool!
Beta Was this translation helpful? Give feedback.
All reactions