aboutcode-org / aboutcode-org/purldb

Add option to enable use of TLS for connection to Redis

Abierto
#672 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
HTML
Estrellas
67
Forks
69
Merge medio
8 d 8 h
PR fusionados (30 d)
1

Descripción

**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:
- https://github.com/aboutcode-org/dejacode/pull/208/files
- https://github.com/aboutcode-org/scancode.io/pull/1467/files

**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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.