47ng / 47ng/prisma-field-encryption
Work on the edge with crypto providers
- Lenguaje dominante
- TypeScript
- Estrellas
- 306
- Forks
- 40
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Prisma has just started letting some users test out a version of Prisma compiled to WASM so that it can run on the edge. I've tested it myself and it looks really promising, yet one problem I have encoutered is that it does not work with prisma-field-encryption yet because of prisma-field-encryption's reliance on Node.js's crypto module which is not available in edge contexts.
My suggestion is to have 'crypto providers' for different contexts, similar to what Stripe does with their Node.js module (see: https://github.com/stripe/stripe-node/tree/master/src/crypto) to support edge contexts. My thinking is that when instantiating prisma-field-encryption, you pass in a crypto provider that works for where you are running Prisma (likely just SublteCrypto and node:crypto are all that is required)
Let me know what you think!
Guía de contribución
Línea de trabajo
Look at the Stripe Node.js crypto provider pattern linked in the issue. Examine the current encryption module's dependency on Node.js crypto. Identify where crypto operations are performed and design an abstraction layer to accept different providers like SubtleCrypto for edge/WASM contexts. Check existing tests to understand the encryption flow.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- node.js, typescript, wasm
- Área
- backend, database
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100