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

Improved proxy support via standard environment variables #7451

Open
romain-grecourt opened this issue Aug 24, 2023 · 0 comments
Open

Improved proxy support via standard environment variables #7451

romain-grecourt opened this issue Aug 24, 2023 · 0 comments
Labels
3.x Issues for 3.x version branch 4.x Version 4.x enhancement New feature or request P3
Projects
Milestone

Comments

@romain-grecourt
Copy link
Contributor

romain-grecourt commented Aug 24, 2023

Environment Details

  • Helidon Version: 3.2.2

Problem Description

Add general support for the standard http[s]_proxy and no_proxy environment variables:

  • WebClient
  • Everything else

E.g. Using google-login security provider, one has to do this:

security:
  providers:
    - google-login:
        proxy-host: "proxy.acme.com"
        proxy-port: "80"

Yes, this can be overridden with environment variables like this:

export security_providers_0_google_dash_login_proxy_dash_host="proxy.acme.com"
export security_providers_0_google_dash_login_proxy_dash_host="80"

However, this is cumbersome. Also. this configuration is provider specific, so adding another provider would make it worse.

Instead we should support the defacto standard *NIX user experience:

export http_proxy="proxy.acme.com:80"
export https_proxy="proxy.acme.com:80"
export no_proxy="localhost,127.0.0.1,*.acme.com"

# every integrated outbound call is configured
java -jar myapp.jar

It could be done with JAVA_TOOL_OPTIONS, but that makes one more variable to change when switch on and off proxy.
Supporting the standard environment variables simplifies the user experience.


We should provide a generic mechanism in a common module to be used by any code that makes outbound calls (E.g. GoogleTokenProvider).

We could abstract io.helidon.webclient.Proxy to decouple it from WebClient and add the environment variable support.

@romain-grecourt romain-grecourt added enhancement New feature or request 3.x Issues for 3.x version branch labels Aug 24, 2023
@github-actions github-actions bot added this to Triage in Backlog Aug 24, 2023
@romain-grecourt romain-grecourt added this to the 3.2.3 milestone Aug 24, 2023
@m0mus m0mus added 4.x Version 4.x P3 labels Sep 7, 2023
@m0mus m0mus moved this from Triage to Normal priority in Backlog Sep 7, 2023
@barchetta barchetta modified the milestones: 3.2.3, 3.2.4, 3.x Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issues for 3.x version branch 4.x Version 4.x enhancement New feature or request P3
Projects
Backlog
  
Normal priority
Development

No branches or pull requests

3 participants