Support skipping Redis TLS cert verification #4717

Closed
opened 2025-12-29 19:19:50 +01:00 by adam · 0 comments
Owner

Originally created by @mraerino on GitHub (Apr 3, 2021).

Originally assigned to: @mraerino on GitHub.

NetBox version

v.2.10.8

Feature type

Change to existing functionality

Proposed functionality

Allow setting ssl_cert_reqs=None on the redis client used for Cacheops and Django-RQ.

Use case

This is required for using the Heroku-provided Redis instances with Netbox. They force you to use TLS, but don't provide proper certificates. See https://devcenter.heroku.com/articles/heroku-redis#connecting-in-python

Database changes

No response

External dependencies

No response

This is how it could be implemented:


For Django-RQ the option is available as SSL_CERT_REQS on the config dict (code change)


For Django-Cacheops it seems switching from an url to a kwargs dict for redis-py would suffice: https://github.com/Suor/django-cacheops/blob/master/cacheops/redis.py#L103-L107

e.g. changing the config block in settings.py to

CACHEOPS_REDIS = {
  'host': CACHING_REDIS_HOST,
  'port': CACHING_REDIS_PORT,
  'password': CACHING_REDIS_PASSWORD,
  'ssl': CACHING_REDIS_SSL,
  'ssl_cert_reqs': CACHING_REDIS_VERIFY_CERT ? 'required' : None,
}
Originally created by @mraerino on GitHub (Apr 3, 2021). Originally assigned to: @mraerino on GitHub. ### NetBox version v.2.10.8 ### Feature type Change to existing functionality ### Proposed functionality Allow setting `ssl_cert_reqs=None` on the redis client used for Cacheops and Django-RQ. ### Use case This is required for using the Heroku-provided Redis instances with Netbox. They force you to use TLS, but don't provide proper certificates. See https://devcenter.heroku.com/articles/heroku-redis#connecting-in-python ### Database changes _No response_ ### External dependencies _No response_ This is how it could be implemented: --- For Django-RQ the option is available as `SSL_CERT_REQS` on the config dict ([code change](https://github.com/rq/django-rq/pull/468/files#diff-badadead2c3366292ace3e0fe95fe4dcbde3cabf08c091902f8dbdc036868b6dR115)) --- For Django-Cacheops it seems switching from an url to a kwargs dict for `redis-py` would suffice: https://github.com/Suor/django-cacheops/blob/master/cacheops/redis.py#L103-L107 e.g. changing the config block in `settings.py` to ``` CACHEOPS_REDIS = { 'host': CACHING_REDIS_HOST, 'port': CACHING_REDIS_PORT, 'password': CACHING_REDIS_PASSWORD, 'ssl': CACHING_REDIS_SSL, 'ssl_cert_reqs': CACHING_REDIS_VERIFY_CERT ? 'required' : None, } ```
adam added the status: acceptedtype: feature labels 2025-12-29 19:19:50 +01:00
adam closed this issue 2025-12-29 19:19:50 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4717