-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Make xpack.actions.rejectUnauthorized setting work
#88690
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
Conversation
|
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
YulNaumenko
left a comment
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
pmuellr
left a comment
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:
ActionsConfigTypebecause it is a duplicate / subset ofActionsConfigthat wasn't needed. This allowed me to add more functionality to theconfigurationUtilitiesin following commits.configurationUtilitiesdown to thegetProxyAgentsfunction from every possible path. TheconfigurationUtilitieshas a new functionisRejectUnauthorizedCertificatesEnabled.proxySettingswas happening at the same places thatconfigurationUtilitieswas, I moved the access toproxySettingstoconfigurationUtilities.error.isAxiosErrordidn't always work (ex: when it mentions missing kbn-xsrf header) so I changed it toerror.code.