Add option to enable use of TLS for connection to Redis

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
django, python, redis
Lĩnh vực
backend, databases, security

Hướng nghiên cứu

Bắt đầu tại purldb_project/settings.py, các dòng 308-315, và so sánh các bản vá DejaCode và ScanCode.io được tham chiếu. Kiểm tra các tùy chọn kết nối django-rq liên quan đến TLS, sau đó xác minh rằng PurlDB cung cấp một thiết lập TLS có thể sử dụng và rằng kết nối Redis sử dụng thiết lập đó khi được bật.

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

Mô tả

Describe the bug
Currently PurlDB does not use TLS when connecting to Redis and does not offer an option to enable it. This is an issue when attempting to deploy PurlDB with Redis hosted on a separate system (e.g. a cloud deployment with ElastiCache), unlike the default docker-compose deployment.

The root cause is that PurlDB uses django-rq, which disables TLS by default unless specific options are passed.

As can be seen in the following lines, only HOST, PORT, PASSWORD, and DEFAULT_TIMEOUT are being set by PurlDB:
https://github.com/aboutcode-org/purldb/blob/e638d183b35c579f56140f453c530f0288fe182d/purldb_project/settings.py#L308-L315

Without either SSL set to True or URL set to contain rediss:// (two s!), it will not use TLS:
https://github.com/rq/django-rq/blob/cd05d2f427e6bd54ce91f78549f05884fa96753e/django_rq/queues.py#L137

Patches for this have already been added to DejaCode and ScanCode.io:

To Reproduce
See above.

Expected behavior
PurlDB should provide an option to enable TLS for the Redis connection in order protect the confidentiality and integrity of the data transmitted between the systems.

Screenshots
Not applicable

Context (OS, Browser, Device, etc.):
Not applicable

Ngôn ngữ chính
HTML
Star
70
Fork
74
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
7

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

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

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 aboutcode-org/purldb

Tất cả issue của aboutcode-org/purldb

Issue tương tự

Thêm issue về Backend & API Design

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.