#30178: Support duck-typing for database passwords in settings
-------------------------------------+-------------------------------------
     Reporter:  Dan Davis            |                    Owner:  Dan Davis
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  2.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  oracle               |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Dan Davis):

 * status:  assigned => closed
 * resolution:   => wontfix


Comment:

 So, the solution of creating a "DBConfig(dict)" class rather than
 DBPassword() object that imitates a string did in fact work for me against
 a 3-dimensional matrix as follows:

 Django versions - 1.11.18, 2.1.7, 2.2b1
 Database backends - Oracle, PostgreSQL
 Scenarios - basic database and test database

 In addition to working for my users (and colleagues), using a special sort
 of dict allows me to set certain parameters we are always going to want,
 such as "CREATE_DB": False.   There are some subtle requirements in making
 sure that the PASSWORD is already present in the TEST settings, so that
 'PASSWORD' in test_settings or some such thing will work.   I'm not sure
 this will work for all databases.

 FWIW, we also explored the notion of expanding the service that manages
 passwords to restart applications when the passwords change.  This brings
 in a whole different kettle of fish - security has allowed our CI/CD
 server to ssh around (within a project), but would likely not be happy
 about the password application doing so.   Furthermore, the password
 application currently does not need to know what sort of application this
 is - and would need to do so to restart Django/Tomcat/Node express/etc.
 So, despite the 12-factor app, it seems we (my colleagues and I) are stuck
 with this until "all the things" are in the cloud.

 With 2.2b1 I did some character encoding errors that might indicate
 another problem with 2.2 on Windows.   A traceback was thrown that I
 resolved by entering `chcp 65001`.   I'll report that traceback under a
 different ticket for decision on whether it is worthwhile to fix.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30178#comment:11>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.ee6c9090ee4c73c9d886a406a60c8694%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to