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

[Cloudflare] Add option to include Bot fields in API requests #8155

Merged

Conversation

chemamartinez
Copy link
Contributor

Proposed commit message

#8093 added support for Bot Managements fields in Cloudflare requests. These fields require a Cloudflare Bot Management license so they are not always present, receiving the following error from the Cloudflare API when this situation happens:

[elastic_agent.filebeat][error] Error while processing http request: failed to execute rf.collectResponse: failed to execute http client.Do: server responded with status code 403

This pull request adds a toggle to enable the Bot Management fields when configuring the Cloudflare integration. It is disabled by default.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • Added a system test case for the new option
  • The default system test has been reverted so it doesn't include optional fields

Screenshots

image

@chemamartinez chemamartinez marked this pull request as ready for review October 10, 2023 15:06
@chemamartinez chemamartinez requested a review from a team as a code owner October 10, 2023 15:06
@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@elasticmachine
Copy link

elasticmachine commented Oct 10, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-10-10T15:06:52.115+0000

  • Duration: 15 min 6 sec

Test stats 🧪

Test Results
Failed 0
Passed 20
Skipped 0
Total 20

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (2/2) 💚
Files 100.0% (3/3) 💚
Classes 100.0% (3/3) 💚
Methods 100.0% (37/37) 💚
Lines 94.772% (707/746) 👍 7.215
Conditionals 100.0% (0/0) 💚

@kgeller kgeller merged commit 851f8a6 into elastic:main Oct 10, 2023
4 checks passed
@elasticmachine
Copy link

Package cloudflare - 2.19.1 containing this change is available at https://epr.elastic.co/search?package=cloudflare

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants