You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/11/06 07:48:27 UTC

[GitHub] [superset] Z0ltrix commented on a change in pull request #17353: feat: Drill ODBC Impersonation feature

Z0ltrix commented on a change in pull request #17353:
URL: https://github.com/apache/superset/pull/17353#discussion_r744096346



##########
File path: superset/db_engine_specs/drill.py
##########
@@ -68,3 +68,12 @@ def convert_dttm(cls, target_type: str, dttm: datetime) -> Optional[str]:
     def adjust_database_uri(cls, uri: URL, selected_schema: Optional[str]) -> None:
         if selected_schema:
             uri.database = parse.quote(selected_schema, safe="")
+
+    @classmethod
+    def modify_url_for_impersonation(cls, url: URL, impersonate_user: bool, username: Optional[str]) -> None:
+        if impersonate_user and username is not None:
+            if url.drivername == "drill+odbc":
+                url.query["DelegationUID"] = username

Review comment:
       For JDBC the parameter would be `impersonation_target` as you can see here --> https://drill.apache.org/docs/configuring-inbound-impersonation/ but we have not tested this.
   
   Should i include a case for `drill+jdbc` with this parameter even if i have not tested this?  




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org