granian icon indicating copy to clipboard operation
granian copied to clipboard

Support SSL certificate validation for mTLS

Open iliadmitriev opened this issue 1 year ago • 0 comments

analogs have the save feature

hypercorn has verify_mode option or --verify-mode cli argument https://hypercorn.readthedocs.io/en/latest/how_to_guides/configuring.html

uvicorn has --ssl-cert-reqs cli argument or UVICORN_SSL_CERT_REQS env variable https://www.uvicorn.org/settings/

gunicorn has --cert-reqs cli argument or cert_reqs option https://docs.gunicorn.org/en/stable/settings.html

this option can be one of 3 values:

  • CERT_NONE - no certificates from the other side are required (or will be looked at if provided)
  • CERT_OPTIONAL - certificates are not required, but if provided will be validated, and if validation fails, the connection will also fail
  • CERT_REQUIRED - certificates are required, and will be validated, and if validation fails, the connection will also fail

https://github.com/python/cpython/blob/3.13/Lib/ssl.py#L39-L48

iliadmitriev avatar Apr 14 '25 09:04 iliadmitriev