[PR #863] [MERGED] feat: add server crypto #1216

Closed
opened 2026-02-26 19:32:20 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/863
Author: @dguyen
Created: 1/24/2024
Status: Merged
Merged: 1/25/2024
Merged by: @dguyen

Base: mainHead: feat/encryption


📝 Commits (2)

  • 5c549b7 feat: add server crypto
  • bc581f2 fix: update based on feedback

📊 Changes

9 files changed (+137 additions, -2 deletions)

View changed files

📝 .env.example (+4 -2)
📝 packages/lib/constants/crypto.ts (+22 -0)
packages/lib/server-only/crypto/decrypt.ts (+33 -0)
packages/lib/server-only/crypto/encrypt.ts (+42 -0)
packages/trpc/server/crypto/router.ts (+17 -0)
packages/trpc/server/crypto/schema.ts (+15 -0)
📝 packages/trpc/server/router.ts (+2 -0)
📝 packages/tsconfig/process-env.d.ts (+1 -0)
📝 turbo.json (+1 -0)

📄 Description

Description

Currently we are required to ensure PII data is not passed around in search parameters and in the open for GDPR reasons.

Allowing us to encrypt and decrypt values with expiry dates will allow us to ensure this doesn't happen.

Changes Made

  • Added TPRC router for encryption and decryption methods

Testing Performed

  • Tested encrypting and decrypting data with and without expiredAt
  • Tested via directly accessing API and also via trpc in react components
  • Tested parsing en email search param in a page and decrypting it successfully

Checklist

  • I have tested these changes locally and they work as expected.
  • I have followed the project's coding style guidelines.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/863 **Author:** [@dguyen](https://github.com/dguyen) **Created:** 1/24/2024 **Status:** ✅ Merged **Merged:** 1/25/2024 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `feat/encryption` --- ### 📝 Commits (2) - [`5c549b7`](https://github.com/documenso/documenso/commit/5c549b7dedea31e591d0280a7584bb8f81dc5380) feat: add server crypto - [`bc581f2`](https://github.com/documenso/documenso/commit/bc581f2f96f3779a76cbfd168311b260562f33b7) fix: update based on feedback ### 📊 Changes **9 files changed** (+137 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+4 -2) 📝 `packages/lib/constants/crypto.ts` (+22 -0) ➕ `packages/lib/server-only/crypto/decrypt.ts` (+33 -0) ➕ `packages/lib/server-only/crypto/encrypt.ts` (+42 -0) ➕ `packages/trpc/server/crypto/router.ts` (+17 -0) ➕ `packages/trpc/server/crypto/schema.ts` (+15 -0) 📝 `packages/trpc/server/router.ts` (+2 -0) 📝 `packages/tsconfig/process-env.d.ts` (+1 -0) 📝 `turbo.json` (+1 -0) </details> ### 📄 Description ## Description Currently we are required to ensure PII data is not passed around in search parameters and in the open for GDPR reasons. Allowing us to encrypt and decrypt values with expiry dates will allow us to ensure this doesn't happen. ## Changes Made - Added TPRC router for encryption and decryption methods ## Testing Performed - Tested encrypting and decrypting data with and without `expiredAt` - Tested via directly accessing API and also via trpc in react components - Tested parsing en email search param in a page and decrypting it successfully ## Checklist - [X] I have tested these changes locally and they work as expected. - [X] I have followed the project's coding style guidelines. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:32:20 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1216
No description provided.