You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/05/10 00:58:00 UTC

[jira] [Commented] (AIRFLOW-5906) Add authenticator parameter to snowflake_hook

    [ https://issues.apache.org/jira/browse/AIRFLOW-5906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17103568#comment-17103568 ] 

ASF GitHub Bot commented on AIRFLOW-5906:
-----------------------------------------

kaxil commented on a change in pull request #8642:
URL: https://github.com/apache/airflow/pull/8642#discussion_r422566593



##########
File path: tests/providers/snowflake/hooks/test_snowflake.py
##########
@@ -134,3 +136,15 @@ def test_key_pair_auth_not_encrypted(self):
         self.conn.password = None
         params = self.db_hook._get_conn_params()
         self.assertTrue('private_key' in params)
+
+    def test_authenticator(self):
+        self.conn.extra_dejson = {'database': 'db',
+                                  'account': 'airflow',
+                                  'warehouse': 'af_wh',
+                                  'region': 'af_region',
+                                  'role': 'af_role',
+                                  'authenticator': 'externalbrowser'}
+
+        uri_shouldbe = 'snowflake://user:pw@airflow/db/public?warehouse=af_wh&role=af_role' \
+                       '&authenticator=externalbrowser'
+        self.assertEqual(uri_shouldbe, self.db_hook.get_uri())

Review comment:
       This test is not related to the changes in this PR. It just checks if `extra_dejson` of any Connection object is changed, they are reflected and can be retrieved with `get_uri()`.
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Add authenticator parameter to snowflake_hook
> ---------------------------------------------
>
>                 Key: AIRFLOW-5906
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5906
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: authentication
>    Affects Versions: 1.10.6
>            Reporter: Salvador RIbolzi
>            Assignee: Salvador RIbolzi
>            Priority: Major
>              Labels: features
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> We are currently migrating to using SAML to log in to Snowflake, to do so a parameter `authenticator=externalbrowser` must be set. Currently the hook for snowflake does not check for that parameter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)