Add system and pipeline tests for Zoom#598
Add system and pipeline tests for Zoom#598andrewkroh merged 3 commits intoelastic:masterfrom andrewkroh:feature/zoom/add-tests
Conversation
Changes: - Remove logfile input. It was only needed for testing purposes, but we are now testing via pipeline and webhook callbacks. - Remove prefix config option. Changing the value would break the pipeline. - Add url config option. - Fix basic auth parameters in handlebar template (missing password option, and username was set to password). - Add missing field definition for input.type. Remaining issues: ``` FAILURE DETAILS: zoom/webhook test-chat-message.json: [0] parsing field value failed: field "zoom.chat_message.message"'s Go type, <nil>, does not match the expected field type: keyword (field value: <nil>) zoom/webhook test-phone.json: [0] parsing field value failed: field "zoom.phone.duration"'s Go type, string, does not match the expected field type: long (field value: 1235) ERROR: simulating pipeline processing failed: unexpected response status for Simulate (400): 400 Bad Request: elasticsearch error (type=illegal_argument_exception): field [members] not present as part of path [zoom.chat_channel.members] ```
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
|
- Convert `zoom.phone.duration` to a long from a string. - Drop null `zoom.chat_message.message` values. - Add ignore_missing to foreach loop dealing with zoom.chat_channel.members. - Add display name to `related.user` for zoom.chat_channel events (otherwise that info was lost).
| - script: | ||
| lang: painless | ||
| if: ctx?.zoom?.duration != null | ||
| if: ctx?.zoom?.phone?.duration != null |
There was a problem hiding this comment.
There was a problem hiding this comment.
@andrewkroh
Its been a while, but both of those are correct assumptions. This one does not seem to be in minutes, though it is a bit hard to know for sure 100%. In most cases I tested myself with the API, though voicemail I would have to depend on the schemas.
Usually there is a 90-100% similarity with the webhook objects and the REST API Objects, and looking at that as a reference, since those API's actually has example documents:
Example: https://marketplace.zoom.us/docs/api-reference/zoom-api/phone/phoneuservoicemails
voice_mails": [
{
"id": "Excepteur",
"date_time": "2019-05-19T20:00:00Z",
"download_url": "ani_maborumu7labojgde.com",
"duration": "18677",
"caller_number": "12345678",
"caller_number_type": "1",
"caller_name": "ullamconame",
"callee_number": "34567889",
"callee_number_type": "2",
"callee_name": "somename",
"status": "read"
}
]
It would seem to commonly be either in seconds or milliseconds, though it's hard to say with 100% certainty what the number would represent if it was received from an actual webhook.
There was a problem hiding this comment.
Ok, then I'm not going to touch the calculation at this time since I don't know what to change it to.
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
P1llus
left a comment
There was a problem hiding this comment.
Some really nice changes here, thanks for fixing up some of the broken references. LGTM for me, though the question around duration is still a bit uncertain.
There was testing done with this manually, but it's been quite some time, and there was a reason why I initially went with thinking minutes.
| prefix: zoom | ||
| basic_auth: {{basic_auth}} | ||
| username: {{password}} | ||
| username: {{username}} |
There was a problem hiding this comment.
I think we can remove username and password, as the Zoom Webhook does not support Basic Auth, though if they want to have a proxy between then users could always have the proxy authenticate? WDYT?
The secret.header and secret.value should at least be taking care of any filtering of unwanted data.
There was a problem hiding this comment.
If basic auth is not supported then I'll remove it from here to de-clutter the UI.
| listen_address: 0.0.0.0 | ||
| listen_port: 9080 | ||
| url: /zoom | ||
| secret_value: abc123 |
There was a problem hiding this comment.
Might not be relevant, but its secret.value. The secret.header used by zoom is also authorization if we want to simulate that somehow
There was a problem hiding this comment.
The test is relying on the default being Authorization. The webhook test client is sending Authorization: abc123.
|
Might be others that want to review as well, from my side I looked at the input and output data structure, the pipelines, default configs etc, but might be someone that also want to look at the package/integration parts as well. |
- Add configuration textbox for SSL options. - Hide options that are advanced/optional. - Remove options that should not be configurable. - Add note about HTTPS requirement from Zoom. - Link to TLS documentation. - Add additional test for HTTPS.


What does this PR do?
Add system and pipeline tests for Zoom.
Changes:
zoom.phone.durationto a long from a string.zoom.chat_message.messagevalues.related.userfor zoom.chat_channel events (otherwise that info was lost).These were the original failures I got when I setup the tests.
Checklist
Related issues
Screenshots