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][New Module] Zoom webhook module #20414

Merged
merged 16 commits into from
Sep 14, 2020

Conversation

P1llus
Copy link
Member

@P1llus P1llus commented Aug 3, 2020

What does this PR do?

This PR creates a module and fileset for Zoom webhooks, allowing filebeat to ingest webhooks initiated from Zoom and map it to ECS.

Why is it important?

Adds a new supported product to Filebeat.

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.

Author's Checklist

@P1llus P1llus added enhancement in progress Pull request is currently in progress. Filebeat Filebeat Team:SIEM labels Aug 3, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Aug 3, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 3, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20414 updated]

  • Start Time: 2020-09-14T09:21:23.224+0000

  • Duration: 51 min 53 sec

Test stats 🧪

Test Results
Failed 0
Passed 5592
Skipped 825
Total 6417

@andrewkroh
Copy link
Member

CI is failing due to:

Error generating Index Pattern: field <zoom.meeting.settings.auto_recording> is duplicated, remove it or set 'overwrite: true', {Name:meeting.settings.auto_recording Type:keyword Description:Settings related to the meeting

@P1llus
Copy link
Member Author

P1llus commented Aug 4, 2020

Need to fix a few more outputs from the test logs, but except that it should be pretty complete now.

@P1llus
Copy link
Member Author

P1llus commented Aug 4, 2020

@andrewstucki didn't expect you to be this quick, was thinking about doing one final run through fields.yml and fix up some descriptions since plenty of them had been changed a bit. :)

For the zoomroom bit, the fieldname is related to the webhook endpoint. So meeting endpoint ends up under zoom.meeting.* while the zoomroom endpoint then ends up with the unfortunate name of zoom.zoomroom.* . It does have a special relation to something called zoomroom though, its conference rooms with dedicated equipment connected to zoom, which has its on API endpoint.

@P1llus
Copy link
Member Author

P1llus commented Aug 4, 2020

Okay now I think the fields.yml is ready for a review @andrewstucki :) Updated types and added better descriptions

@P1llus P1llus added review and removed in progress Pull request is currently in progress. labels Aug 4, 2020
Copy link
Contributor

@andrewstucki andrewstucki left a comment

Choose a reason for hiding this comment

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

initial comments

x-pack/filebeat/module/zoom/_meta/docs.asciidoc Outdated Show resolved Hide resolved
x-pack/filebeat/module/zoom/_meta/docs.asciidoc Outdated Show resolved Hide resolved
x-pack/filebeat/module/zoom/webhook/_meta/fields.yml Outdated Show resolved Hide resolved
x-pack/filebeat/module/zoom/webhook/_meta/fields.yml Outdated Show resolved Hide resolved
x-pack/filebeat/module/zoom/webhook/_meta/fields.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

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

I've given the fields a quick look, and entered comments for some of the things I've seen. This is not a thorough review :-)

One thing of note, in ECS a community member has recently opened an ECS RFC (RFC 0003) to capture audit logs on random things in accounts like Zoom meetings, and other. The RFC is still in the very early stages, so no action needed for now. But just putting the idea out there, that there's a place coming in ECS for audit logs on "everything else" that doesn't have a clean place in ECS (as opposed to audit logs on files, users, etc) :-)

x-pack/filebeat/module/zoom/_meta/fields.yml Outdated Show resolved Hide resolved
x-pack/filebeat/module/zoom/webhook/_meta/fields.yml Outdated Show resolved Hide resolved
x-pack/filebeat/module/zoom/webhook/_meta/fields.yml Outdated Show resolved Hide resolved
x-pack/filebeat/module/zoom/webhook/_meta/fields.yml Outdated Show resolved Hide resolved
x-pack/filebeat/module/zoom/webhook/_meta/fields.yml Outdated Show resolved Hide resolved
x-pack/filebeat/module/zoom/webhook/_meta/fields.yml Outdated Show resolved Hide resolved
x-pack/filebeat/module/zoom/webhook/_meta/fields.yml Outdated Show resolved Hide resolved
@P1llus
Copy link
Member Author

P1llus commented Aug 4, 2020

Will add in the last two comments tomorrow as they require a bit more work, but the rest should now have been marked resolved

@P1llus
Copy link
Member Author

P1llus commented Aug 5, 2020

This should also wait for #20435 to be merged first, so that the new config items is added to the manifest, else the builds will fail.

@P1llus
Copy link
Member Author

P1llus commented Aug 6, 2020

There has been a lot of changes into how similar fields are merged and how dates, timestamps, event.start/end and duration is calculated, so might need a fresh review. All the PR comments have been incorporated as well.

@P1llus
Copy link
Member Author

P1llus commented Aug 10, 2020

Running some last tests on this and then it should be ready for one last review

@P1llus
Copy link
Member Author

P1llus commented Aug 10, 2020

jenkins test this please

@P1llus
Copy link
Member Author

P1llus commented Aug 19, 2020

@andrewkroh Added the SSL option, though the documentation for that is a bit more tricky, I don't think it would be sufficient to add in the docs for the common ssl options or? The input itself is using "tls.common", so it does work the same, but wanted to hear your opinion if we wanted a custom doc for it or not.

Anything else needed to be reviewed for this module before we find it complete?

@P1llus P1llus requested a review from andrewkroh August 19, 2020 09:19
@andrewkroh
Copy link
Member

Linking to the shared SSL docs should be fine, similar to what Okta does. The inputs that accept TLS connections use those docs.

@P1llus
Copy link
Member Author

P1llus commented Aug 23, 2020

Jenkins test this please

@P1llus
Copy link
Member Author

P1llus commented Aug 23, 2020

jenkins, test this

@marc-gr
Copy link
Contributor

marc-gr commented Aug 25, 2020

In case CI issues persist for a while, locally the zoom tests are passing green:

>> python test: Integration Testing
============================================== test session starts ===============================================
platform linux -- Python 3.7.3, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
rootdir: /go/src/github.com/elastic/beats, configfile: pytest.ini
plugins: timeout-1.3.4
timeout: 90.0s
timeout method: signal
timeout func_only: True
collected 22 items                                                                                               

tests/system/test_filebeat_xpack.py ....                                                                   [ 18%]
tests/system/test_http_endpoint.py .........                                                               [ 59%]
tests/system/test_xpack_modules.py .........                                                               [100%]

================================================ warnings summary ================================================
x-pack/filebeat/tests/system/test_filebeat_xpack.py::FilebeatXPackTest::test_export_config
  /go/src/github.com/elastic/beats/filebeat/tests/system/../../../libbeat/tests/system/beat/common_tests.py:70: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    yml = yaml.load(output)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
----- generated xml file: /go/src/github.com/elastic/beats/x-pack/filebeat/build/TEST-python-integration.xml -----
============================================== slowest 20 durations ==============================================
13.37s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_0_zoom
3.51s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_3_zoom
3.35s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_5_zoom
3.28s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_7_zoom
3.13s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_8_zoom
2.97s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_1_zoom
2.91s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_4_zoom
2.86s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_2_zoom
2.86s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_6_zoom
2.28s call     x-pack/filebeat/tests/system/test_filebeat_xpack.py::FilebeatXPackTest::test_export_index_pattern
2.03s call     x-pack/filebeat/tests/system/test_filebeat_xpack.py::FilebeatXPackTest::test_export_template
1.68s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_request
1.40s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_wrong_content_header
1.39s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_correct_auth_header
1.39s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_malformed_json
1.38s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_get_request
1.37s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_wrong_auth_header
1.36s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_wrong_auth_value
1.35s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_empty_body
1.29s call     x-pack/filebeat/tests/system/test_filebeat_xpack.py::FilebeatXPackTest::test_export_config
==================================== 22 passed, 1 warning in 61.50s (0:01:01) ====================================
>> python test: Integration Testing Complete

@adriansr adriansr merged commit 1a35f77 into elastic:master Sep 14, 2020
adriansr pushed a commit to adriansr/beats that referenced this pull request Sep 14, 2020
This PR creates a module and fileset for Zoom webhooks, allowing filebeat to ingest webhooks initiated from Zoom and map it to ECS.

(cherry picked from commit 1a35f77)
v1v added a commit to v1v/beats that referenced this pull request Sep 14, 2020
* upstream/master: (362 commits)
  Add vendoring to Google Cloud Functions again (elastic#21070)
  [Elastic Agent] Add fleet.host.id for sending to endpoint. (elastic#21042)
  Do not need Google credentials before using it (elastic#21072)
  [Filebeat][New Module] Zoom webhook module (elastic#20414)
  Add support for GMT timezone offset in decode_cef (elastic#20993)
  Filebeat: Fix random error on harvester close (elastic#21048)
  Add ingress controller dashboards (elastic#21052)
  Fix loggers in composable module. (elastic#21047)
  [Ingest Manager] Increase kibana client timeout to 5 minutes (elastic#21037)
  Add changelog. (elastic#21041)
  [Elastic Agent] Add support for EQL based conditions (elastic#20994)
  Disable Kafka metricsets based on Jolokia (elastic#20989)
  Update apm agent (elastic#21031)
  Add container ECS fields in kubernetes metadata (elastic#20984)
  Sanitize event.host in Metricbeat (elastic#21022)
  Update api-keys.asciidoc - API key prerequisites (elastic#21026)
  [Filebeat][suricata] Map x509 for suricata/eve fileset (elastic#20973)
  [Filebeat][santa] Map x509 fields in santa module (elastic#20976)
  [Filebeat][fortinet] Map x509 ecs fields for fortinet fw fileset (elastic#20983)
  Bump zeek kerberos/ssl/x509 ecs version (elastic#21003)
  ...
v1v added a commit to v1v/beats that referenced this pull request Sep 14, 2020
* upstream/master: (364 commits)
  Add vendoring to Google Cloud Functions again (elastic#21070)
  [Elastic Agent] Add fleet.host.id for sending to endpoint. (elastic#21042)
  Do not need Google credentials before using it (elastic#21072)
  [Filebeat][New Module] Zoom webhook module (elastic#20414)
  Add support for GMT timezone offset in decode_cef (elastic#20993)
  Filebeat: Fix random error on harvester close (elastic#21048)
  Add ingress controller dashboards (elastic#21052)
  Fix loggers in composable module. (elastic#21047)
  [Ingest Manager] Increase kibana client timeout to 5 minutes (elastic#21037)
  Add changelog. (elastic#21041)
  [Elastic Agent] Add support for EQL based conditions (elastic#20994)
  Disable Kafka metricsets based on Jolokia (elastic#20989)
  Update apm agent (elastic#21031)
  Add container ECS fields in kubernetes metadata (elastic#20984)
  Sanitize event.host in Metricbeat (elastic#21022)
  Update api-keys.asciidoc - API key prerequisites (elastic#21026)
  [Filebeat][suricata] Map x509 for suricata/eve fileset (elastic#20973)
  [Filebeat][santa] Map x509 fields in santa module (elastic#20976)
  [Filebeat][fortinet] Map x509 ecs fields for fortinet fw fileset (elastic#20983)
  Bump zeek kerberos/ssl/x509 ecs version (elastic#21003)
  ...
adriansr added a commit that referenced this pull request Sep 14, 2020
…#21073)

This PR creates a module and fileset for Zoom webhooks, allowing filebeat to ingest webhooks initiated from Zoom and map it to ECS.

(cherry picked from commit 1a35f77)

Co-authored-by: Marius Iversen <pillus@chasenet.org>
v1v added a commit to v1v/beats that referenced this pull request Sep 18, 2020
…ne-2.0

* upstream/master: (44 commits)
  Update users.asciidoc (elastic#20802) (elastic#21108)
  Fix docker provider builder. (elastic#21118)
  [Elastic Agent] Add docker composable dynamic provider. (elastic#20842)
  Add new modules/filesets from rsa2elk for 7.10 (elastic#20820)
  Fix broken links to external websites (elastic#21061)
  [docs] typo in the command line (elastic#20799)
  [Filebeat] add panos type and sub_type (elastic#20912)
  Move the `compute_vm_scalset` to  a light metricset and map the cloud metadata (elastic#21038)
  [Filebeat] Add support for Cloudtrail digest files (elastic#21086)
  Add metrics collection from cost explorer into aws/billing metricset (elastic#20527)
  Add vendoring to Google Cloud Functions again (elastic#21070)
  [Elastic Agent] Add fleet.host.id for sending to endpoint. (elastic#21042)
  Do not need Google credentials before using it (elastic#21072)
  [Filebeat][New Module] Zoom webhook module (elastic#20414)
  Add support for GMT timezone offset in decode_cef (elastic#20993)
  Filebeat: Fix random error on harvester close (elastic#21048)
  Add ingress controller dashboards (elastic#21052)
  Fix loggers in composable module. (elastic#21047)
  [Ingest Manager] Increase kibana client timeout to 5 minutes (elastic#21037)
  Add changelog. (elastic#21041)
  ...
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.

7 participants