-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Make xpack.actions.rejectUnauthorized
setting work
#88690
Make xpack.actions.rejectUnauthorized
setting work
#88690
Conversation
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Seems like we could build a function test for this - create a new https server with a newly created self-signed cert (with a loooong lifetime), that just has one endpoint that we can test with webhook. Then execute the webhook, with and without the rejectUnauthorized setting - should get one to work and the other to fail. Obviously set it up to use the proxy we're testing with, in security_and_spaces . :-)
@pmuellr I went ahead and added a functional test in this commit (af638a3). I made it re-use the dev certs so it's one less thing to expire 🙂 I added it to the |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
…ana into actions/reject-unauthorized
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
* Remove ActionsConfigType due to being a duplicate * Fix rejectUnauthorized not being configured * Move proxySettings to configurationUtilities * Fix isAxiosError check to code * Add functional test * Remove comment * Close webhook server Co-authored-by: Kibana Machine <[email protected]>
* Remove ActionsConfigType due to being a duplicate * Fix rejectUnauthorized not being configured * Move proxySettings to configurationUtilities * Fix isAxiosError check to code * Add functional test * Remove comment * Close webhook server Co-authored-by: Kibana Machine <[email protected]>
* Remove ActionsConfigType due to being a duplicate * Fix rejectUnauthorized not being configured * Move proxySettings to configurationUtilities * Fix isAxiosError check to code * Add functional test * Remove comment * Close webhook server Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
* Remove ActionsConfigType due to being a duplicate * Fix rejectUnauthorized not being configured * Move proxySettings to configurationUtilities * Fix isAxiosError check to code * Add functional test * Remove comment * Close webhook server Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Resolves #87047
In this PR, I'm doing a few changes to fix the problem. The general purpose of each commit is as follows:
ActionsConfigType
because it is a duplicate / subset ofActionsConfig
that wasn't needed. This allowed me to add more functionality to theconfigurationUtilities
in following commits.configurationUtilities
down to thegetProxyAgents
function from every possible path. TheconfigurationUtilities
has a new functionisRejectUnauthorizedCertificatesEnabled
.proxySettings
was happening at the same places thatconfigurationUtilities
was, I moved the access toproxySettings
toconfigurationUtilities
.error.isAxiosError
didn't always work (ex: when it mentions missing kbn-xsrf header) so I changed it toerror.code
.