Skip to content

Commit

Permalink
Add OIDC auth support (#77)
Browse files Browse the repository at this point in the history
This allows authentication with Exasol by specifying either an
OIDC access_token or refresh_token in the dbt profiles.yml config
(instead of user+password)

Co-authored-by: Peter Kioko <kioko@grantstreet.com>
  • Loading branch information
peterkioko and Peter Kioko authored Jun 12, 2023
1 parent 7ba0bd6 commit 8479260
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dbt/adapters/exasol/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,13 @@ class ExasolCredentials(Credentials):
"""Profile parameters for Exasol in dbt profiles.yml"""

dsn: str
user: str
password: str
database: str
schema: str
# One of user+pass, access_token, or refresh_token needs to be specified in profiles.yml
user: str = ""
password: str = ""
access_token: str = ""
refresh_token: str = ""
# optional statements that can be set in profiles.yml
# some options might interfere with dbt, so caution is advised
connection_timeout: int = pyexasol.constant.DEFAULT_CONNECTION_TIMEOUT
Expand Down Expand Up @@ -193,6 +196,8 @@ def _connect():
dsn=credentials.dsn,
user=credentials.user,
password=credentials.password,
access_token=credentials.access_token,
refresh_token=credentials.refresh_token,
autocommit=True,
connection_timeout=credentials.connection_timeout,
socket_timeout=credentials.socket_timeout,
Expand Down

0 comments on commit 8479260

Please # to comment.