{"repo":"47ng/prisma-field-encryption","free":true,"listed":false,"github":"https://github.com/47ng/prisma-field-encryption","clone":"git clone https://github.com/47ng/prisma-field-encryption.git","description":"Transparent field-level encryption at rest for Prisma","language":"TypeScript","stars":307,"topics":["prisma","middleware","encryption"],"license":"MIT","category":"security-tools","readme_excerpt":"prisma-field-encryption Transparent field-level encryption at rest for Prisma. Installation Using your package manager of choice: Prisma version compatibility This extension requires Prisma 4.7.0 up to 6.13.0. For Prisma versions 4.7.0 to 4.15.0, you will need to activate the clientExtensions preview feature, or use the middleware interface. For Prisma versions 4.16.0 and higher, client extensions are generally available and don't require a preview feature flag. Note : The previous middleware interface is still available for Prisma versions 3.8.0 to 4.6.x, but will be removed in a future update. It is recommended to update your Prisma client and use the extension mechanism, as support for middlewares was removed from Prisma in 6.14.0. Usage 1. Extend your Prisma client Read more about how to use Prisma client extensions. 2. Setup your encryption key Generate an encryption key: - Via a web UI: cloak.47ng.com - Via the command line: Note: the cloak CLI comes pre-installed with prisma-field-encryption as part of the @47ng/cloak dependency. The preferred method to provide your key is via the PRISMA FIELD ENCRYPTION KEY environment variable: You can also pass it directly in the configuration: Tip: a key provided in code will take precedence over a key from the environment. 3. Annotate your schema In your Prisma schema, add /// @encrypted to the fields you want to encrypt: Tip: make sure you use a triple-slash. Double slash comments won't work. #### Note on @db.VarChar & field max ","default_branch":null,"files":null,"tree":[],"storefront":"/r/47ng","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/47ng/prisma-field-encryption/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}