Fix Update user-related HTTP headers to fix impersonation
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
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
@hashhar is this something you can help review? Thanks!
The CLA has been signed
@raunaqmorarka @hashhar kind reminder to take a look. This is a significant blocker for anyone using impersonation today
@izeigerman have you signed CLA? Without it, we can't merge this change
@wendigo yes, CLA has been signed and I’ve just joined the trinodb organization.
@cla-bot check
The cla-bot has been summoned, and re-checked this pull request!
Hey @martint @raunaqmorarka @hashhar @wendigo is there anything else preventing this PR from being merged?
Hey @martint @raunaqmorarka @hashhar @wendigo folks, it's been over a month. Any chance we can make progress here?
@izeigerman Sorry about the delay. I was unavailable due to some travel.
Thanks for making the fix. It looks good.