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

Added Proxy support for action types which are integrating with external services #72783

Closed
wants to merge 0 commits into from

Conversation

YulNaumenko
Copy link
Contributor

@YulNaumenko YulNaumenko commented Jul 22, 2020

Added proxy settings for defining proxyUrl and proxyHeaders under kibana.yml xpack.actions configuration.
The decision was to use HTTP/HTTPS proxy, not SOCKS, because it is the most commonly used and all action types libraries support it.
For enabling self-signed certificates added rejectUnauthorized: false for all external requests (axios, nodemailer, slack).

  1. For email action type is used Nodemailer library and proxy configuration is built-in https://nodemailer.com/smtp/proxies/#1-using-http-proxy
  2. For slack action type is used node-slack-sdk, which does not have a built-in proxy, but allows to configure it using https-proxy-agent
  3. For the rest of action types axios library is used to make requests to external services. This library has built-in proxy configuration for HTTPS, but for enabling self-signed certificates we need to setting rejectUnauthorized: false which is configurable only under the agent options. So implemented proxy support using httpsAgent for HTTPS proxy config and use native proxy implementation for the HTTP proxy.

@YulNaumenko YulNaumenko added Feature:Alerting v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Jul 22, 2020
@YulNaumenko YulNaumenko requested a review from a team as a code owner July 22, 2020 01:21
@YulNaumenko YulNaumenko self-assigned this Jul 22, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@YulNaumenko YulNaumenko requested review from a team as code owners August 4, 2020 14:13
@YulNaumenko YulNaumenko requested a review from a team August 4, 2020 14:13
@YulNaumenko YulNaumenko requested a review from a team as a code owner August 4, 2020 14:13
@YulNaumenko YulNaumenko requested a review from a team August 4, 2020 14:13
@YulNaumenko YulNaumenko requested review from a team as code owners August 4, 2020 14:13
@YulNaumenko YulNaumenko requested a review from a team August 4, 2020 14:13
@YulNaumenko YulNaumenko requested a review from a team as a code owner August 4, 2020 14:13
@kibanamachine
Copy link
Contributor

kibanamachine commented Aug 4, 2020

💔 Build Failed

Failed CI Steps

Build metrics

‼️ metrics were not reported for [#72783@0830627]

History

  • 💔 Build #63821 failed 0b2a649519c505bf3e489e8c86b1624cac2c2f90
  • 💔 Build #63769 failed f29a6c4fea925ef185f7c82e33d92a91d88347f7
  • 💔 Build #63728 failed adb5bbcb599ee7bee82e1ec3ad18c2bd023e0b31
  • 💔 Build #63491 failed 856e1c301b84dda656f8b10e6f0578ed173f8b54

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@YulNaumenko YulNaumenko closed this Aug 4, 2020
@YulNaumenko YulNaumenko force-pushed the actions-proxy-support branch from 0830627 to 466380e Compare August 4, 2020 14:27
@YulNaumenko YulNaumenko removed request for a team August 4, 2020 14:35
@YulNaumenko YulNaumenko deleted the actions-proxy-support branch August 4, 2020 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants