#28322: `manage.py dbshell` does not support mysql client certificates
-------------------------------------+-------------------------------------
               Reporter:  Paul       |          Owner:  Paul Tiplady
  Tiplady                            |
                   Type:             |         Status:  assigned
  Uncategorized                      |
              Component:  Database   |        Version:  1.11
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  1
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 A common security procedure for DB access is to require mutual TLS for the
 DB connection, e.g. as implemented by Google Cloud SQL for their hosted
 MySQL offering.

 This involves specifying a server certificate, client certificate, and
 client key when connecting.

 Django already supports this configuration, it looks like this:



 {{{
 DATABASES = {
         'default': {
             'ENGINE': 'django.db.backends.mysql',
             'HOST': db_host,
             'NAME': 'test',
             'USER': 'root',
             'PASSWORD': 'root',
             'OPTIONS': {
                'ssl': {
                     'ca': 'server-ca.pem',
                     'cert': 'client-cert.pem',
                     'key': 'client-key.pem',
                 }
             },
         },
     }
 }}}


 However the dbshell command does not support the client cert params
 ('cert' and 'key'), though it is aware of the server cert param 'ca'.

 Should be a trivial fix to add in support for the other 'ssl' parameters
 required here, I'll take a look.

--
Ticket URL: <https://code.djangoproject.com/ticket/28322>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.f9edab2665ab9017ba90521ce1c7bc58%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to