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

Add CRC support to the Zoom integration #6288

Merged
merged 3 commits into from
May 26, 2023

Conversation

chemamartinez
Copy link
Contributor

What does this PR do?

This pull request adds the possibility for the Zoom integration of supporting CRC requests and validating its webhook as is required from Zoom for newer webhooks. More information about this validation is available here.

Changes in the input related to this CRC validation can be found at elastic/beats#35204.

It also fixes two outdated links in the documentation.

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.

Related issues

Screenshots

Integration config
image

CRC request response

root@docker-fleet-agent:~# curl -X POST http://localhost:8181/zoom-webhook -H 'Content-Type: application/json' -H 'Authorization: secret123' -d '{"event_ts":1654503849680,"event":"endpoint.url_validation","payload":{"plainToken":"qgg8vlvZRS6UYooatFL8Aw"}}' -v
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1:8181...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8181 (#0)
> POST /zoom-webhook HTTP/1.1
> Host: localhost:8181
> User-Agent: curl/7.68.0
> Accept: */*
> Content-Type: application/json
> Authorization: secret123
> Content-Length: 110
>
* upload completely sent off: 110 out of 110 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Mon, 22 May 2023 15:06:44 GMT
< Content-Length: 123
<
* Connection #0 to host localhost left intact
{"encryptedToken":"ec1ef6227291f8e16a3ac1ad6167e86557df46bd0e06a0f3acd2bdb2be34baa4","plainToken":"qgg8vlvZRS6UYooatFL8Aw"}

Event ingested

root@docker-fleet-agent:~# curl -X POST http://localhost:8181/zoom-webhook -H 'Content-Type: application/json' -H 'Authorization: secret123' -d '{"event":"account.created","payload":{"account_id":"lq8KK_EoRCq6ByEyA73qCA","operator":"youramazingemailhere@somemail.com","operator_id":"uLohghhRgfgrbTayCX6r2Q_qQsQ","object":{"id":"aIxE1yiRR8WghhUIO6eu9L","owner_id":"e2ZHO5RSGqyfrmFnElxw","owner_email":"thesubaccountowneremail@somemail.com"}}}' -v
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1:8181...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8181 (#0)
> POST /zoom-webhook HTTP/1.1
> Host: localhost:8181
> User-Agent: curl/7.68.0
> Accept: */*
> Content-Type: application/json
> Authorization: secret123
> Content-Length: 296
>
* upload completely sent off: 296 out of 296 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Mon, 22 May 2023 15:09:28 GMT
< Content-Length: 22
<
* Connection #0 to host localhost left intact
{"message": "success"}
image

@chemamartinez chemamartinez added enhancement New feature or request Integration:zoom Zoom labels May 22, 2023
@chemamartinez chemamartinez self-assigned this May 22, 2023
@chemamartinez chemamartinez requested a review from a team as a code owner May 22, 2023 15:12
@elasticmachine
Copy link

elasticmachine commented May 22, 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-05-26T15:10:14.196+0000

  • Duration: 14 min 18 sec

Test stats 🧪

Test Results
Failed 0
Passed 13
Skipped 0
Total 13

🤖 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

elasticmachine commented May 22, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 100.0% (10/10) 💚 6.25
Classes 100.0% (10/10) 💚 6.25
Methods 96.226% (51/53) 👍 7.874
Lines 89.889% (889/989) 👍 3.963
Conditionals 100.0% (0/0) 💚

@elasticmachine
Copy link

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

Copy link
Member

@P1llus P1llus left a comment

Choose a reason for hiding this comment

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

Added a small nit, this looks good otherwise, the version bump is necessary to support the new CRC functionality as an FYI for anyone checking.

@chemamartinez chemamartinez merged commit 1a5c9c9 into elastic:main May 26, 2023
@elasticmachine
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:zoom Zoom
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants