Allow REDIS KWARGS to be set in configuration.py #402

Closed
opened 2026-04-05 16:29:54 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @arthanson on 2/6/2026

Fixes: #21240

Adds a KWARGS to REDIS['tasks'] and REDIS['caching'] that gets passed to django-rq and django-redis to allow more flexibility in configuration like setting ssl options. All current settings options still work so completely backwards compatible.

REDIS = {
    'tasks': {
        'KWARGS': {
        #     'ssl_certfile': '/path/to/client-cert.pem',
        #     'ssl_keyfile': '/path/to/client-key.pem',
        #     'ssl_min_version': ssl.TLSVersion.TLSv1_2,
        #     'ssl_ciphers': 'HIGH:!aNULL',
        },
    },
    'caching': {
        'KWARGS': {
        #     'ssl_certfile': '/path/to/client-cert.pem',
        #     'ssl_keyfile': '/path/to/client-key.pem',
        #     'ssl_min_version': ssl.TLSVersion.TLSv1_2,
        #     'ssl_ciphers': 'HIGH:!aNULL',
        },
    }
}
*Originally created by @arthanson on 2/6/2026* ### Fixes: #21240 Adds a KWARGS to REDIS['tasks'] and REDIS['caching'] that gets passed to django-rq and django-redis to allow more flexibility in configuration like setting ssl options. All current settings options still work so completely backwards compatible. ``` REDIS = { 'tasks': { 'KWARGS': { # 'ssl_certfile': '/path/to/client-cert.pem', # 'ssl_keyfile': '/path/to/client-key.pem', # 'ssl_min_version': ssl.TLSVersion.TLSv1_2, # 'ssl_ciphers': 'HIGH:!aNULL', }, }, 'caching': { 'KWARGS': { # 'ssl_certfile': '/path/to/client-cert.pem', # 'ssl_keyfile': '/path/to/client-key.pem', # 'ssl_min_version': ssl.TLSVersion.TLSv1_2, # 'ssl_ciphers': 'HIGH:!aNULL', }, } } ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#402