Skip to content
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

Cannot use HTTP Proxy for OAuth2 client #13216

Closed
kyyung opened this issue May 24, 2023 · 2 comments
Closed

Cannot use HTTP Proxy for OAuth2 client #13216

kyyung opened this issue May 24, 2023 · 2 comments
Assignees
Labels
status: duplicate A duplicate of another issue

Comments

@kyyung
Copy link

kyyung commented May 24, 2023

I have configured OAuth2 client in Spring Security as below

image

It works well with Internet connection. When I run the app with VPN and outbound traffic through HTTP Proxy, I got the following error:

image

By looking at the source code here:
https://github.com/spring-projects/spring-security/blob/7c54c0e4fa7e026157f492002e4ef29809ec3a07/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/registration/ClientRegistrations.java#LL60C1-L67C3

It seems that ClientRegistrations do not honour http.proxyHost and http.proxyPort properties during the creation of RestTemplate.

Please advise any workaround or solution so that we can use ClientRegistrations requesting OIDC metadata through Proxy. Thanks

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 24, 2023
@brbaje-matillion
Copy link

We are also experiencing the same issue with our new SAAS agent, if there is an operational work round, that would be amazing.

Ben

@marcusdacoregio
Copy link
Contributor

Hi @kyyung, thanks for the report.

I believe that this is related to #8882, therefore I'm closing this as a duplicate. If this is not related to #8882, we can reopen this.

You might want to add your use case to the other issue if it is not already covered there.

@marcusdacoregio marcusdacoregio self-assigned this May 25, 2023
@marcusdacoregio marcusdacoregio added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants