trinodb / trinodb/trino-python-client

Add support for passing user's original role for impersonation

Open
#547 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

important
Dominant language
Python
Stars
439
Forks
206
PR merge metrics
No merged PRs in 30d

Description

Describe the feature

Motivated by https://github.com/trinodb/trino/pull/25371

  • X-Trino-Set-Original-Roles
  • Instructs the client to set the roles of the original user in the
    X-Trino-Original-Roles request header in subsequent client requests.
Describe alternatives you've considered

No response

Are you willing to submit PR?
  • Yes I am willing to submit a PR!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the client for request-header construction and any existing role or impersonation handling. Trace how subsequent requests are prepared, then verify that the original roles are sent in X-Trino-Original-Roles when X-Trino-Set-Original-Roles instructs the client to do so. Done means the behavior is covered by the relevant client tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.