Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Event based webhooks #296

Merged
merged 41 commits into from
Nov 12, 2020
Merged

Event based webhooks #296

merged 41 commits into from
Nov 12, 2020

Conversation

bmc-msft
Copy link
Contributor

@bmc-msft bmc-msft commented Nov 11, 2020

This PR adds support for arbitrary third-party integrations via webhooks, modeled after Github Webhooks.

Users will be able to specify URL that OneFuzz will call and a set of events that will hit said URL.

Currently, the event types supported are:

  • task_created (sends a WebhookEventTaskCreated)
  • task_stopped (sends a WebhookEventTaskStopped)
  • task_failed (sends a WebhookEventTaskFailed)

The webhooks will atempt up to 5 times, then be marked as failed.

Features:

  • onefuzz webhook logs UUID retrieves a log of all of the messages sent to the webhook for the last 7 days.
  • onefuzz webhook ping UUID sends a special webhook with a generated GUID to verify the webhooks are setup.
  • Webhook logs are automatically removed after 7 days.
  • Webhook schema (using openapi spec) have documentation & example payloads provided via code generation. (CI verifies that said documentation is up-to-date).
  • Messages sent to a webhook can optionally be verified using HMAC-SHA512.

@bmc-msft bmc-msft linked an issue Nov 11, 2020 that may be closed by this pull request
@bmc-msft
Copy link
Contributor Author

Until this is merged, this link should work to view the generated webhook documentation.

https://github.com/bmc-msft/onefuzz/blob/event-based-webhooks/docs/webhook_events.md

@bmc-msft bmc-msft changed the title WIP: Event based webhooks Event based webhooks Nov 12, 2020
@bmc-msft bmc-msft marked this pull request as ready for review November 12, 2020 17:21
@bmc-msft bmc-msft requested a review from chkeita November 12, 2020 21:22
@ghost
Copy link

ghost commented Nov 12, 2020

Hello @bmc-msft!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost
Copy link

ghost commented Nov 12, 2020

Apologies, while this PR appears ready to be merged, it looks like main is a protected branch and I have not been granted permission to perform the merge.

@bmc-msft bmc-msft merged commit 31f099d into microsoft:main Nov 12, 2020
@bmc-msft bmc-msft deleted the event-based-webhooks branch November 12, 2020 22:44
@ghost ghost locked as resolved and limited conversation to collaborators Apr 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Service level webhooks for integration
3 participants