Skip to content

Commit af1fc8d

Browse files
authored
fix(ingest): snowflake - fix oauth config validation (#5796)
1 parent dbcd309 commit af1fc8d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

metadata-ingestion/src/datahub/configuration/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class OauthConfiguration(ConfigModel):
105105
scopes: Optional[List[str]] = Field(
106106
description="scopes required to connect to snowflake"
107107
)
108-
use_certificate: Optional[bool] = Field(
108+
use_certificate: bool = Field(
109109
description="Do you want to use certificate and private key to authenticate using oauth",
110110
default=False,
111111
)

metadata-ingestion/src/datahub/ingestion/source_config/sql/snowflake.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ def authenticator_type_is_valid(cls, v, values, field):
213213
f"but should be set when using {v} authentication"
214214
)
215215
if values.get("oauth_config").use_certificate is True:
216-
if values.get("oauth_config").base64_encoded_oauth_private_key is None:
216+
if values.get("oauth_config").encoded_oauth_private_key is None:
217217
raise ValueError(
218218
"'base64_encoded_oauth_private_key' was none "
219219
"but should be set when using certificate for oauth_config"
220220
)
221-
if values.get("oauth").base64_encoded_oauth_public_key is None:
221+
if values.get("oauth").encoded_oauth_public_key is None:
222222
raise ValueError(
223223
"'base64_encoded_oauth_public_key' was none"
224224
"but should be set when using use_certificate true for oauth_config"

0 commit comments

Comments
 (0)