Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support skipping Redis TLS cert verification #6083

Closed
mraerino opened this issue Apr 3, 2021 · 0 comments · Fixed by #6084
Closed

Support skipping Redis TLS cert verification #6083

mraerino opened this issue Apr 3, 2021 · 0 comments · Fixed by #6084
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@mraerino
Copy link
Contributor

mraerino commented Apr 3, 2021

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,
}
@mraerino mraerino added the type: feature Introduction of new functionality to the application label Apr 3, 2021
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Apr 5, 2021
jeremystretch added a commit that referenced this issue Apr 9, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants