Skip to content

Commit

Permalink
[DNA-0000]: Add Trino original user header for impersonated users (#29)
Browse files Browse the repository at this point in the history
* [DNA-00000]: Fix dependencies version

* [DNA-00000]: Add Trino original user header
  • Loading branch information
puneet-bdp authored Aug 6, 2024
1 parent f2ca720 commit ba920a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion redash/query_runner/trino.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ def run_query(self, query, user):
host=self.configuration.get("host", ""),
port=self.configuration.get("port", 8080),
catalog=self.configuration.get("catalog", "hive"),
http_headers={trino.constants.HEADER_CLIENT_INFO: str(user)},
http_headers={
trino.constants.HEADER_CLIENT_INFO: str(user),
"X-Trino-Original-User": str(user)
},
source="Redash",
schema=self.configuration.get("schema", "default"),
user=self.configuration.get("username"),
Expand Down

0 comments on commit ba920a0

Please sign in to comment.