-
Notifications
You must be signed in to change notification settings - Fork 579
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
OIDC authentication fails if used with proxy #4644
Comments
I'm not getting the Timeout Error:
The timeout error is a proxy error and has nothing to do with Helidon. Instead I'm getting this error:
and on keycloak, I'm seeing this problem:
Only happens when proxy is set. This issue will focus on investigating the |
Using Wireshark I have observed this request and response when using proxy (which fails):
while without proxy, it looks like this (which succeeds:
From the message request, it can be seen that the one with proxy uses absolute URL while the one without uses relative URL. This seems to be similar issue as this: #3577 which was fixed using a flag in this PR: #3614. |
How to reproduce Using Oracle Corp Proxy:
|
How to reproduce Using locally installed mitmproxy:
|
As a test, I commented lines 752 759, 760 from helidon/webclient/webclient/src/main/java/io/helidon/webclient/WebClientRequestBuilderImpl.java Lines 751 to 761 in 78db0f7
Application->Proxy->OIDC to work.
|
Using curl to send the same request via proxy also works:
and WireShark showed this request/response result:
|
Bottomline, question is why do we use absolute URI path when using proxy as this causes the recipient to receive the URL with hostname and port duplicated, hence causing a 404:
|
The use of absolute request URI on Proxy and relative request URI on non-proxy were reported and changed in #2302 and #3438. The relevant information of using absolute URI when there is proxy is mentioned in
|
The goal now is to see if PR #3614 which uses |
PR #5267 is the potential fix for this issue. Basically, the goal is to add relative-iris boolean flag in OIDC config to force internal webclient in OIDC to use relative URI if needed. |
PR #5267 has been reviewed and merged. |
Environment Details
Problem Description
OIDC identity provider is deployed in a public network.
When connected Helidon MP application behind a corporate proxy, OIDC fails to reach the identity provider, even with proxy configurations.
The problem can be consistently reproduced.
stack trace
Steps to reproduce
Expectation: The application run without any errors.
Actual: Above reported error is thrown
I have used the below configurations.
Configurations:
The text was updated successfully, but these errors were encountered: