connectors icon indicating copy to clipboard operation
connectors copied to clipboard

added support to read proxy settings from env vars

Open chris-gunawardena opened this issue 9 months ago • 5 comments

part of https://github.com/elastic/connectors/issues/2017

This solves the issue of the connectors ignoring system proxy settings in env vars.

Added trust_env=True according to https://docs.aiohttp.org/en/stable/client_advanced.html#aiohttp-client-proxy-support

The use of proxy is needed when running the connector alongside elastic cluster behind a corporate firewall, a proxy is used to expose outgoing traffic. For example, to externally SaaS products like ServiceNow, Sharepoint intranet, Teams and Confluence

Checklists

Pre-Review Checklist

  • [x] this PR does NOT contain credentials of any kind, such as API keys or username/passwords (double check config.yml.example)
  • [x] this PR has a meaningful title
  • [x] this PR links to all relevant github issues that it fixes or partially addresses
  • [x] if there is no GH issue, please create it. Each PR should have a link to an issue
  • [x] this PR has a thorough description
  • [ ] Covered the changes with automated tests
  • [x] Tested the changes locally
  • [ ] Added a label for each target release version (example: v7.13.2, v7.14.0, v8.0.0)
  • [ ] Considered corresponding documentation changes
  • [ ] Contributed any configuration settings changes to the configuration reference
  • [] if you added or changed Rich Configurable Fields for a Native Connector, you made a corresponding PR in Kibana

Changes Requiring Extra Attention

  • [ ] Security-related changes (encryption, TLS, SSRF, etc)
  • [ ] New external service dependencies added.

Related Pull Requests

https://github.com/elastic/connectors/pull/2266

Work around

In case this doesn't go through, it's possible to do this in the docker build with RUN sed -i 's/aiohttp.ClientSession(/aiohttp.ClientSession(trust_env=True,/g' /app/connectors/sources/sharepoint_online.py

chris-gunawardena avatar May 20 '24 17:05 chris-gunawardena