oracle / dbt-oracle

dbt (data build tool) adapter for Oracle Autonomous Database
https://docs.getdbt.com/docs/core/connect-data-platform/oracle-setup
Apache License 2.0
50 stars 17 forks source link

Kerberos Support for On-prem Kerberized Oracle databases #157

Open aadishsanghvi opened 1 month ago

aadishsanghvi commented 1 month ago

Describe the Feature

I am trying to use this adapter to connect to my Oracle database which only supports kerberos for authentication and username/password is not supported. Can we please add this feature to the adapter or show me how to leverage this if already implemented ?

Describe alternatives you've considered

No response

Who will this benefit?

All users of a kerberized Oracle database

Anything else?

No response

aosingh commented 1 month ago

We are investigating this. We use python-oracledb as the underlying database driver. So, any external authentication method needs to be supported by the driver

aadishsanghvi commented 1 month ago

As I understand python-oracledb does support kerberos auth in thick mode

aosingh commented 3 weeks ago

@aadishsanghvi

Could you let me know how do you connect to Oracle Database using SQLPlus and Kerberos Authentication ? I am interested in understanding the SQL net configuration used. Also, have you tried the thick mode ?

I am trying to setup Kerberos instance to test the setup but that might take a few days.

aadishsanghvi commented 3 weeks ago

I am not sure about sql plus. but I have an oracle instance which supports only kerberos authentication, I was able to connect to it using cx_Oracle which is also a python library very similar to python-oracledb, this requires an instant client which has a sqlnet.ora file configuration pointing to the location of your krb5.conf file and the keberos credential cache file, then you use the drivers provided by the cx_oracle and define your instance's dsn etc etc.

aosingh commented 3 weeks ago

@aadishsanghvi

I know of cx_Oracle and python-oracledb. Could you share the code using cx_Oracle to connect using Kerberos ?