-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix www-authenticate header parsing bug when refreshing tokens #485
Fix www-authenticate header parsing bug when refreshing tokens #485
Conversation
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 cla@trino.io. 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 |
please see ci complaints and squash the commits into one Thanks for the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % ci and commit
7b6bd59
to
e1ce8bc
Compare
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 cla@trino.io. 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 |
e1ce8bc
to
3f9a64d
Compare
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 cla@trino.io. 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 |
3f9a64d
to
1bd210b
Compare
For multi-valued www-authenticate headers the previous code could throw: trino.exceptions.TrinoAuthError: Error: header info didn't have x_token_server
1bd210b
to
8eade11
Compare
reworded the commit message. Will merge on CI done. |
Description
This PR applies a minimal change to fix the issue where the OAuth refresh token flow results in the "Header info didn't have x_token_server" error:
This error was introduced in #467. The regression was not captured by the test
test_oauth2_refresh_token_flow
; Trino returns multi-valuedWww-Authenticate
headers whilePostStatementCallback
does not, and the new parsing logic does not handle this appropriately. This PR also updates the test.Non-technical explanation
This PR fixes the issue where Trino returns "Header info didn't have x_token_server" after some time and starts working again after a longer time.
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: