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

[Security Solution][Endpoint] Improve Axios error output for dev scripts + change default for creation of Kbn/ES clients to NOT include self-signed certs #183531

Conversation

paul-tavares
Copy link
Contributor

@paul-tavares paul-tavares commented May 15, 2024

Summary

Refactors included in this PR include:

  • Adds .catch() to calls made with Axios and wraps errors with more information about the failed request
  • Adds retry of API calls to external URLs (ex. artifacts)
  • Refactors the noCertForSsl options of kibana scripting services to:
    • Renames it to useCertForSsl
    • Defaults the value to false: by default the factory functions will NOT inject the serf-signed cert into the clients
    • Background: the initial work to make our tests work with Serverless added this cert automatically if the URL started with https. That intern cause all of our CLI scripts to not be usable against cloud instances (for testing). This change reverts that but still enables one to include it by setting the (renamed) option useCertForSsl when creating a ES or KBN client.

@paul-tavares paul-tavares added release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v8.15.0 labels May 15, 2024
@paul-tavares paul-tavares self-assigned this May 15, 2024
@paul-tavares
Copy link
Contributor Author

/ci

@paul-tavares
Copy link
Contributor Author

/ci

@paul-tavares
Copy link
Contributor Author

/ci

@paul-tavares paul-tavares marked this pull request as ready for review May 16, 2024 15:21
@paul-tavares paul-tavares requested a review from a team as a code owner May 16, 2024 15:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

Copy link
Contributor

@szwarckonrad szwarckonrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for taking care of this!

@paul-tavares paul-tavares enabled auto-merge (squash) May 20, 2024 12:52
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

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

cc @paul-tavares

@paul-tavares paul-tavares merged commit 6ecccf3 into elastic:main May 20, 2024
36 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label May 20, 2024
@paul-tavares paul-tavares deleted the task/olm-9448-add-debug-data-to-axios-failures branch May 20, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants