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/10 03:23:54 UTC

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

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



##########
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:
       Thanks @Z0ltrix and @villebro. Looks good!




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