Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

PRISMA_FIELD_DECRYPTION_KEYS is never set, so the AES key cannot be rotated

Đang mở
#946 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
57/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
helm, typescript
Lĩnh vực
backend, security

Hướng nghiên cứu

Start with .helm/ctrl/templates/backend/deployment.yaml and cron.yaml, where PRISMA_FIELD_ENCRYPTION_KEY is currently set; then check how the application and prisma-field-encryption read environment variables. Configure retired decryption keys through PRISMA_FIELD_DECRYPTION_KEYS while preserving the current key setup. Done when both deployments can load the retired keys needed for gradual rotation and restoring backups.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

backend tech debt

We have no way to hold more than one encryption key at a time. PRISMA_FIELD_ENCRYPTION_KEY is set in .helm/ctrl/templates/backend/deployment.yaml and cron.yaml, and that single key is all the app ever sees.

prisma-field-encryption does support more. It takes a current encryption key plus a list of retired decryption keys via PRISMA_FIELD_DECRYPTION_KEYS, and every encrypted value already carries a fingerprint of the key that wrote it, so reads can pick the right one per row. We just never configure the list.

Two things depend on that:

  1. Rotation. Changing the key means decrypting everything under the old one and re-encrypting under the new one. With only one key loaded, there's no window where both are available, so it can't be done gradually.
  2. Old backups. A backup stays tied to whichever key was current when it was taken. Restoring one and reading the encrypted columns needs that key, whether or not we've rotated since.

So retired keys would need to outlive the backups that depend on them, and right now there's no mechanism to load them even if we kept them somewhere.

Ngôn ngữ chính
TypeScript
Star
4
Fork
0
Merge trung bình
14 giờ 50 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Garvan-Data-Science-Platform/ctrl

Tất cả issue của Garvan-Data-Science-Platform/ctrl

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.