Support proxying /oauth2 to enable OAuth authentication #190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi folks,
Thank you for open-sourcing the presto-gateway, it's a very nifty piece of software!
We're currently using it with Trino backends and OAuth2 authentication, which works very well on its own but breaks when clusters are put behind the presto-gateway, as OAuth2 does an HTTP callback to Trino under
/oauth2
. This returns a 404 as the presto-gateway doesn't know about this path and treats is as an error.This small PR whitelists paths starting with
/oauth2
and instructs presto-gateway to reverse-proxy it to a backend, enabling authenticating via OAuth2.Let me know if there's anything else I can do to make this PR more likely to land, as we're happy using upstream rather than a fork. :)
Thank you!