zenstack icon indicating copy to clipboard operation
zenstack copied to clipboard

[Feature Request] Add a `@encrypted` enhancer

Open genu opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. Relevant discord discussion: https://discord.com/channels/1035538056146595961/1267557057784053924

I'm trying to eliminate the need for this extension: https://github.com/47ng/prisma-field-encryption

It allows marking some fields as encrypted thus the field is never stored in plain text in the db, but only can be read in plain text at runtime through the prisma client.

Describe the solution you'd like A simple @encrypted enhancer would suffice. It would encrypted the field when writing, and unencrypted as plain text when reading.

Describe alternatives you've considered Currently using https://github.com/47ng/prisma-field-encryption but it doesn't work well with zenstack generator because it relies on specific annotations which zenstack moves around during generate

genu avatar Aug 14 '24 19:08 genu