Search code examples
pythonoraclekerberoscx-oracle

Python Oracle Connection using cx_Oracle and Kerberos Auth


Is there a way to use the oracle python driver package cx_Oracle and specify Kerberos authentication?

I've seen this done using oracle jdbc drivers, but not with cx_Oracle specifically. Below is my current connection code:

dsn = cx_Oracle.makedsn(host="some host", port="some port", service_name="some service")
con = cx_Oracle.connect("user", "password", dsn, threaded=True)

Solution

  • Maybe these will help:

    Similar setup? Connect to Database using oracle client and kerberos with Python

    CX-Oracle or Python OracleDB with External Auth: https://github.com/oracle/python-cx_Oracle/issues/61#issuecomment-320121457