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

Injected proxy variables into endpoint elasticsearch does not include NO_PROXY variable #6209

Open
janniten opened this issue Dec 4, 2024 · 4 comments
Labels
bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@janniten
Copy link
Contributor

janniten commented Dec 4, 2024

Hello,
We did an upgrade from 8.14.2 to 8.16.1.
In our environment the agent has the HTTP_PROXY, HTTPS-PROXY and NO_PROXY configured.
NO_PROXY variable is not being injected into endpoint .
As a result, the elastic endpoint is trying to connect the ES cluster Via proxy, which is not correct.

Thank you

@janniten janniten added the bug Something isn't working label Dec 4, 2024
@cmacknz cmacknz added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Dec 4, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@michel-laterman
Copy link
Contributor

HTTP_PROXY/HTTPS_PROXY injection was added with: #5044
We'll probably need to alter the injectProxyURL func to add NO_PROXY.

@intxgo, would the expected value in the config be no_proxy: string, or no_proxy: []string?

@intxgo
Copy link
Contributor

intxgo commented Dec 6, 2024

Since the env vars are injected as a regular output proxy settings, there's no place for NO_PROXY (endpoint won't recognize it, ignore it). However since the output URL is known, I think the NO_PROXY can be matched against the output URL at Agent side before deciding to inject HTTP_PROXY/HTTPS_PROXY variable to the output config.

@intxgo
Copy link
Contributor

intxgo commented Dec 24, 2024

Alternative solution would be to pass all three HTTP_PROXY, HTTPS_PROXY, NO_PROXY to Endpoint as Agent env variables, a new structure in the config message instead of injecting them to the output configuration. We will need to handle this on Endpoint side too, but in general Endpoint proxy table already has place for storing Agent env variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

5 participants