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

[Filebeat Input][HTTP_endpoint] Add possibility to override content-type header #20232

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

P1llus
Copy link
Member

@P1llus P1llus commented Jul 27, 2020

What does this PR do?

Webhooks like Zoom does not add any content-type headers on incoming requests, the content type now defaults to application/json but is possible to set to another value or null.

This is a preliminary change needed before adding some more validation steps, which will be created in separate PR's

Why is it important?

Adds support for webhooks which does not set content-type headers.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
    - [ ] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

…ertain webhooks that is not able to set content-headers at all. Still defaults to application/json
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 27, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 27, 2020
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20232 opened]

  • Start Time: 2020-07-27T07:08:38.049+0000

  • Duration: 57 min 49 sec

Test stats 🧪

Test Results
Failed 0
Passed 2434
Skipped 385
Total 2819

@marc-gr
Copy link
Contributor

marc-gr commented Jul 27, 2020

Can you add an entry in the CHANGELOG for this?

@P1llus
Copy link
Member Author

P1llus commented Jul 27, 2020

Bit unsure if that is needed for this entry as http_endpoint has not been released yet, and there is already a changelog entry for the input?

@marc-gr marc-gr merged commit 98a423d into elastic:master Jul 27, 2020
marc-gr pushed a commit to marc-gr/beats that referenced this pull request Jul 27, 2020
…ertain webhooks that is not able to set content-headers at all. Still defaults to application/json (elastic#20232)

(cherry picked from commit 98a423d)
@marc-gr marc-gr added the v7.9.0 label Jul 27, 2020
v1v added a commit to v1v/beats that referenced this pull request Jul 27, 2020
…ne-2.0

* upstream/master: (41 commits)
  adding possibility to override content-type checks, it was breaking certain webhooks that is not able to set content-headers at all. Still defaults to application/json (elastic#20232)
  fix: use a fixed worker type for tests (elastic#20130)
  [Ingest Manager] Prepare packaging for endpoint and asc files (elastic#20186)
  [Packetbeat] HTTP: Improve support for 100-continue elastic#15830 (elastic#19349)
  Increase index.max_docvalue_fields_search to 200 (elastic#20218)
  [Ingest Manager] Prevent closing closed reader (elastic#20214)
  [Metricbeat] Use MySQL Host Parser in Query metricset (elastic#20191)
  Testing: Ignore timestamp from cylance/protect dataset (elastic#20211)
  [Filebeat] Ignore cylance.protect timestamps while testing (elastic#20207)
  [CI] remove codecov step (elastic#20102)
  [docs] Indicate that SYSTEM user is required on Windows to use Endpoint (elastic#20172)
  Remove f5/firepass rsa2elk fileset (elastic#20160)
  [Elastic Agent] Improve GRPC stop to be more relaxed. (elastic#20118)
  Fix fileset field prefixing (elastic#20170)
  Fix terminating pod autodiscover issue (elastic#20084)
  Call host parser only once when building light metricsets (elastic#20149)
  [CI] fix null string with contains (elastic#20182)
  [Ingest Manager] Fix failing unit tests on windows (elastic#20127)
  [Filebeat] Update crowdstrike module (elastic#20138)
  [docs] Add x-pack role to relevant metricsets (elastic#20167)
  ...
marc-gr added a commit that referenced this pull request Jul 27, 2020
…ertain webhooks that is not able to set content-headers at all. Still defaults to application/json (#20232) (#20237)

(cherry picked from commit 98a423d)

Co-authored-by: Marius Iversen <[email protected]>
marc-gr pushed a commit to marc-gr/beats that referenced this pull request Jul 28, 2020
…ertain webhooks that is not able to set content-headers at all. Still defaults to application/json (elastic#20232)

(cherry picked from commit 98a423d)
marc-gr added a commit that referenced this pull request Jul 28, 2020
…ertain webhooks that is not able to set content-headers at all. Still defaults to application/json (#20232) (#20236)

(cherry picked from commit 98a423d)

Co-authored-by: Marius Iversen <[email protected]>
v1v added a commit to v1v/beats that referenced this pull request Jul 29, 2020
* upstream/7.9: (32 commits)
  feat(ci): support storing artifacts for PRs in separate dirs (elastic#20282) (elastic#20301)
  Cisco ASA: Fix message 106100 (elastic#20245) (elastic#20277)
  [CI] Change upstream reference (elastic#20296) (elastic#20297)
  [docs] Fix Windows download link for agent (elastic#20258) (elastic#20290)
  Cherry-pick to 7.9: [docs] Rename release highlights to what's new (elastic#20255) (elastic#20285)
  Elastic agent on k8s (elastic#19727) (elastic#20262)
  [Filebeat Module] Defender ATP - Adding dashboard (elastic#20058) (elastic#20093)
  fix: use a fixed worker type for tests (elastic#20130) (elastic#20247)
  [Elastic Agent] Fix Windows powershell install service script (elastic#20203) (elastic#20252)
  [Ingest Manager] Fixed unzip on older windows  (elastic#20088) (elastic#20109)
  adding possibility to override content-type checks, it was breaking certain webhooks that is not able to set content-headers at all. Still defaults to application/json (elastic#20232) (elastic#20237)
  [Filebeat][Gsuite] Make GSuite docs more clear (elastic#19981) (elastic#20067)
  Increase index.max_docvalue_fields_search to 200 (elastic#20218) (elastic#20221)
  Call host parser only once when building light metricsets (elastic#20149) (elastic#20190)
  [Metricbeat] Use MySQL Host Parser in Query metricset (elastic#20191) (elastic#20212)
  [Filebeat] Ignore cylance.protect timestamps while testing (elastic#20207) (elastic#20217)
  [libbeat] Fix write error in ensureWriter.Write (elastic#20112) (elastic#20145)
  Cherry-pick elastic#20127 to 7.9: Fix failing unit tests on windows  (elastic#20180)
  Remove f5/firepass rsa2elk fileset (elastic#20160) (elastic#20206)
  Cherry-pick elastic#20138 to 7.9: [Filebeat] Update crowdstrike module (elastic#20177)
  ...
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
…ertain webhooks that is not able to set content-headers at all. Still defaults to application/json (elastic#20232)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…ertain webhooks that is not able to set content-headers at all. Still defaults to application/json (elastic#20232) (elastic#20237)

(cherry picked from commit cc92167)

Co-authored-by: Marius Iversen <[email protected]>
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.

3 participants