diff --git a/metadata-ingestion/src/datahub/configuration/common.py b/metadata-ingestion/src/datahub/configuration/common.py index 067370e4ba123c..0484bfc3190dbc 100644 --- a/metadata-ingestion/src/datahub/configuration/common.py +++ b/metadata-ingestion/src/datahub/configuration/common.py @@ -105,7 +105,7 @@ class OauthConfiguration(ConfigModel): scopes: Optional[List[str]] = Field( description="scopes required to connect to snowflake" ) - use_certificate: Optional[bool] = Field( + use_certificate: bool = Field( description="Do you want to use certificate and private key to authenticate using oauth", default=False, ) diff --git a/metadata-ingestion/src/datahub/ingestion/source_config/sql/snowflake.py b/metadata-ingestion/src/datahub/ingestion/source_config/sql/snowflake.py index 4018692ac82fcd..8202f877d6274a 100644 --- a/metadata-ingestion/src/datahub/ingestion/source_config/sql/snowflake.py +++ b/metadata-ingestion/src/datahub/ingestion/source_config/sql/snowflake.py @@ -213,12 +213,12 @@ def authenticator_type_is_valid(cls, v, values, field): f"but should be set when using {v} authentication" ) if values.get("oauth_config").use_certificate is True: - if values.get("oauth_config").base64_encoded_oauth_private_key is None: + if values.get("oauth_config").encoded_oauth_private_key is None: raise ValueError( "'base64_encoded_oauth_private_key' was none " "but should be set when using certificate for oauth_config" ) - if values.get("oauth").base64_encoded_oauth_public_key is None: + if values.get("oauth").encoded_oauth_public_key is None: raise ValueError( "'base64_encoded_oauth_public_key' was none" "but should be set when using use_certificate true for oauth_config"