ibmdb / python-ibmdb-django

IBM DB2 Driver for the Django application Framework
Apache License 2.0
29 stars 42 forks source link

django db2 ssl connection #60

Closed reddibhatini closed 3 years ago

reddibhatini commented 3 years ago

How would I make django to use ssl connection to db2(sslConnection=true). What options I need to pass to DATBASES dict in settings.py file?

BTW, I use this jdbc string in a sql query tool to connect to db2 jdbc:db2://hostname/db_name:sslConnection=true;

praveen-db2 commented 3 years ago

Hi, I hadn't tried SSL yet, but u can try setting it in settings.py like below.


'default': {
        'ENGINE'     : 'ibm_db_django',
        'NAME'       : 'school',
        'USER'       : 'db2admin',
        'PASSWORD'   : 'LNdatabase#1',
        'HOST'       : 'localhost',
        'PORT'       : '50000',
        'security'    : 'ssl',
        'sslservercertificate' : 'fvtserver.arm'
    }, 

If it didnt work let me know, i ill work on that when I am free.