trino-python-client icon indicating copy to clipboard operation
trino-python-client copied to clipboard

Fix Update user-related HTTP headers to fix impersonation

Open izeigerman opened this issue 9 months ago • 2 comments

Description

The latest version of Trino changed how the HTTP headers are handled: https://trino.io/docs/current/develop/client-protocol.html#client-request-headers when the server returns the X-Trino-Set-Authorization-User header.

Thus, the X-Trino-Authorization-User header is no longer supported. Instead, X-Trino-User should be set to the authorization user, and X-Trino-Original-User should be set to the originally authenticated user.

Without these changes, the impersonation doesn't work with the latest versions of trino.

Release notes

( ) This is not user-visible or docs only and no release notes are required. ( ) Release notes are required, please propose a release note for me. (x) Release notes are required, with the following suggested text:

* Fix impersonation support

izeigerman avatar Jun 19 '25 22:06 izeigerman

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

cla-bot[bot] avatar Jun 19 '25 22:06 cla-bot[bot]

@hashhar is this something you can help review? Thanks!

The CLA has been signed

izeigerman avatar Jun 23 '25 17:06 izeigerman

@raunaqmorarka @hashhar kind reminder to take a look. This is a significant blocker for anyone using impersonation today

izeigerman avatar Jul 07 '25 19:07 izeigerman

@izeigerman have you signed CLA? Without it, we can't merge this change

wendigo avatar Jul 09 '25 10:07 wendigo

@wendigo yes, CLA has been signed and I’ve just joined the trinodb organization.

izeigerman avatar Jul 10 '25 17:07 izeigerman

@cla-bot check

martint avatar Jul 10 '25 22:07 martint

The cla-bot has been summoned, and re-checked this pull request!

cla-bot[bot] avatar Jul 10 '25 22:07 cla-bot[bot]

Hey @martint @raunaqmorarka @hashhar @wendigo is there anything else preventing this PR from being merged?

izeigerman avatar Jul 14 '25 03:07 izeigerman

Hey @martint @raunaqmorarka @hashhar @wendigo folks, it's been over a month. Any chance we can make progress here?

izeigerman avatar Jul 29 '25 03:07 izeigerman

@izeigerman Sorry about the delay. I was unavailable due to some travel.

Thanks for making the fix. It looks good.

hashhar avatar Jul 31 '25 14:07 hashhar