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
45 stars 17 forks source link

dbt-oracle with LDAP connection support #150

Open VenkatArra opened 1 month ago

VenkatArra commented 1 month ago

Is there an existing issue for this?

Current Behavior

I did not find any documentation on how to establish connection using LDAP.

Expected Behavior

Share documentation and samples on how to establish connection using LDAP. Like any additional setup needed, how profiles.yml look etc.

Steps To Reproduce

Mac/Linux.

Relevant log output using --debug flag enabled

NA

Environment

- OS:Mac/Linux
- Python:3.10.9
- dbt: Core 1.4.99
12:04:46  oracle adapter: Running in thin mode

What Oracle database version are you using dbt with?

19c, 21c

Additional Context

No response

aosingh commented 1 month ago

dbt-oracle uses python-oracledb for Connecting to Database. We will check if the Python driver supports LDAP authentication

aosingh commented 1 month ago

@VenkatArra

Could you give some details ?

To enable the thick mode, you can set ORA_PYTHON_DRIVER_TYPE and run dbt:

export ORA_PYTHON_DRIVER_TYPE=thick && dbt <command>

Note that thick mode needs access to the Oracle Client Libraries installed. You can follow instructions here : https://docs.getdbt.com/docs/core/connect-data-platform/oracle-setup#install-oracle-instant-client-libraries

VenkatArra commented 1 month ago

@aosingh Thanks for looking into this.

Please find my answers below.

Please share any other information and may be samples with LDAP if available. Thanks again.

aosingh commented 1 month ago

Hi @VenkatArra

For LDAP connection, Could you try the following:

and

ldaps://ldapserver.example.com/cn=orcl,cn=OracleContext,dc=example,dc=com?DIRECTORY_SERVER_TYPE=AD&WALLET_LOCATION=/app/wallet&AUTHENTICATE_BIND=true&AUTHENTICATE_BIND_METHOD=LDAPS_SIMPLE_AUTH
aosingh commented 1 month ago

@VenkatArra Were you able to verify LDAP connection ?

VenkatArra commented 1 month ago

@aosingh Thanks for the instructions for LDAP connection. Since it involves thick driver mode and other setup we are not planning to do this currently. We'd like to continue with thin mode for now without LDAP.