kombu icon indicating copy to clipboard operation
kombu copied to clipboard

support self signed certificates

Open vogt31337 opened this issue 3 years ago • 3 comments

Hi,

I'm using pyamqp maybe this is also valid / interesting for other transport layers. Since version 4.6.8 kombu doesn't accept self signed certificates (at least for amqps connections), which is problematic at least for me... If I understood issues #1149 and #1151 correctly there is some way to configure the ssl behaviour. Maybe you could update the documentation to explain how to enable self signed certificates.

BR

vogt31337 avatar Feb 20 '22 17:02 vogt31337

Hey @vogt31337 :wave:, Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider backing us - every little helps!

We also offer priority support for our sponsors. If you require immediate assistance please consider sponsoring us.

Since about a month has passed, I'd like to ask if there was something done? @thedrow Maybe you could provide some quick tips?

BR

vogt31337 avatar Mar 31 '22 23:03 vogt31337

Hey @vogt31337 ran into this issue trying to get setup with SSL myself. Posting for posterity in case any else does too :)

These celery configuration options work for me and allowed kombu to talk with my self-signed SSL configured Redis instance

import ssl
from app import config
from celery import Celery


app = Celery(
    __name__,
    broker=config.REDIS_URI,
    broker_use_ssl={
        "ssl_cert_reqs": ssl.CERT_NONE,
        "ssl_keyfile": config.REDIS_SSL_KEY,
        "ssl_certfile": config.REDIS_SSL_CERT,
        "ssl_ca_certs": config.REDIS_SSL_CA_CERT,
    },
)
  • You should setup the following configuration variables, pointing to the full path of your config (recommend) but relative paths are also supported
  • REDIS_SSL_KEY: e.g. "redis.key"
  • REDIS_SSL_CERT: e.g. "redis.crt"
  • REDIS_SSL_CA_CERT: e.g. "ca.crt"

davidjrice avatar Nov 28 '23 11:11 davidjrice