Skip to content

Add impersonation option in trino datasource - #7605

Merged
yoshiokatsuneo merged 2 commits into
getredash:masterfrom
kimsehwan96:add-trino-impersonation-options
Jan 24, 2026
Merged

yoshiokatsuneo merged 2 commits into
getredash:masterfrom
kimsehwan96:add-trino-impersonation-options

Conversation

@kimsehwan96

@kimsehwan96 kimsehwan96 commented Jan 18, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

Add user impersonation support for Trino data source.

Background

Trino supports user impersonation, which allows query auditing and fine-grained access control by passing the actual user identity to Trino instead of a shared service account.

Changes

  • Added impersonation option to enable/disable user impersonation
  • Added impersonationField option to select which user attribute to use for impersonation:
    • email: Uses the user's email (default)
    • name: Uses the user's name
  • For ApiUser, falls back to name since API keys don't have an associated email

Configuration

Both options are available under "Additional Settings" in the data source configuration.

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A
스크린샷 2026-01-18 오후 10 44 48 1. Trino datasource with disabled impersonation and query 스크린샷 2026-01-18 오후 10 45 11 2. Trino datasource with impersonation as email and query 스크린샷 2026-01-18 오후 10 45 29 2. Trino datasource with impersonation as name and query

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

@kimsehwan96
kimsehwan96 force-pushed the add-trino-impersonation-options branch from 4dab221 to 0e4731b Compare January 18, 2026 13:50

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@kimsehwan96
kimsehwan96 force-pushed the add-trino-impersonation-options branch from 0e4731b to 5d1e431 Compare January 18, 2026 23:41
@kimsehwan96
kimsehwan96 force-pushed the add-trino-impersonation-options branch from 5d1e431 to c9dfe57 Compare January 19, 2026 07:44

@yoshiokatsuneo yoshiokatsuneo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not tested it.

But I believe I can approve it as:

  • The PR author looks tested well.
  • The changed code looks good.
  • There is no test failure.

@yoshiokatsuneo
yoshiokatsuneo merged commit bc0add4 into getredash:master Jan 24, 2026
@yoshiokatsuneo

Copy link
Copy Markdown
Contributor

@kimsehwan96

Thank you for your contribution with detailed description !
As I believe the PR makes redash more useful, I just approved and merged.

@kimsehwan96

Copy link
Copy Markdown
Contributor Author

@yoshiokatsuneo Thank you for the fast review and merge!
I think Presto could use this feature as well (since Trino is a forked version of Presto), but I haven't used Presto myself, so I'll leave that to someone else who's more familiar with it.

woogakoki added a commit to wooga/redash that referenced this pull request Feb 25, 2026
* master: (69 commits)
  Update Python version to 3.13 (getredash#7636)
  Update plotly.js to 3.3.1, react-pivottable to 0.11.0 (getredash#7634)
  Add charset option to RDS MySQL datasource (getredash#7616)
  Aggregate y value for same x (getredash#7631)
  fix(mysql): Change default charset to utf8mb4 (getredash#7615)
  Update packages for compatibility with setuptools 82 (getredash#7622)
  Snapshot: 26.02.0-dev
  chore: support ipv6 for server in docker (getredash#7596)
  Add impersonation option in trino datasource (getredash#7605)
  Fix Elasticsearch connector configuration key mismatch (getredash#7607)
  duckdb: Show catalog (database) where applicable (e.g. Motherduck) (getredash#7599)
  Snapshot: 26.01.0-dev
  Feature/catch notsupported exception (getredash#7573)
  Multi-org: format base path, not including protocol (getredash#7260)
  fix(destinations): Handle unicode characters in webhook notifications (getredash#7586)
  Persist updated values and apply saved dashboard parameters (getredash#7570)
  Add ibm-db package to enable DB2 as datasource: (getredash#7581)
  Snapshot: 25.12.0-dev
  PostgreSQL: allow connection parameters to be specified (getredash#7579)
  Add lineShape option for Line and Area charts (getredash#7582)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants