From a562b296abee170b80fa36a5f216b415cb092a42 Mon Sep 17 00:00:00 2001 From: Chris Nivera Date: Mon, 29 Jul 2024 12:53:23 -0700 Subject: [PATCH] update instructions --- README.md | 1 + semantic_model_generator/snowflake_utils/env_vars.py | 4 +++- .../snowflake_utils/snowflake_connector.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6e232bd5..72b76fcc 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ export SNOWFLAKE_PASSWORD="" ```bash export SNOWFLAKE_AUTHENTICATOR="username_password_mfa" export SNOWFLAKE_PASSWORD="" +export SNOWFLAKE_MFA_PASSCODE="" # if your authenticator app says "123 456", enter "123456" (no spaces) ``` 3. Single Sign-On (SSO) with Okta diff --git a/semantic_model_generator/snowflake_utils/env_vars.py b/semantic_model_generator/snowflake_utils/env_vars.py index 60ad5c3d..d335b78c 100644 --- a/semantic_model_generator/snowflake_utils/env_vars.py +++ b/semantic_model_generator/snowflake_utils/env_vars.py @@ -8,7 +8,9 @@ SNOWFLAKE_HOST = os.getenv("SNOWFLAKE_HOST") SNOWFLAKE_AUTHENTICATOR = os.getenv("SNOWFLAKE_AUTHENTICATOR") SNOWFLAKE_ACCOUNT_LOCATOR = os.getenv("SNOWFLAKE_ACCOUNT_LOCATOR") -SNOWFLAKE_PASSCODE = os.getenv("SNOWFLAKE_PASSCODE") # optional, only required for MFA +SNOWFLAKE_MFA_PASSCODE = os.getenv( + "SNOWFLAKE_MFA_PASSCODE" +) # optional, only required for MFA def assert_required_env_vars() -> list[str]: diff --git a/semantic_model_generator/snowflake_utils/snowflake_connector.py b/semantic_model_generator/snowflake_utils/snowflake_connector.py index e9b31ef4..f3892388 100644 --- a/semantic_model_generator/snowflake_utils/snowflake_connector.py +++ b/semantic_model_generator/snowflake_utils/snowflake_connector.py @@ -348,7 +348,7 @@ def _get_authenticator(self) -> Optional[str]: return auth def _get_mfa_passcode(self) -> Optional[str]: - passcode = env_vars.SNOWFLAKE_PASSCODE + passcode = env_vars.SNOWFLAKE_MFA_PASSCODE return passcode @contextmanager