Per the 1.0.0 feature list:
POST /webook/:projectID/:secret)The gateway should create an event named webhook, and the payload should be whatever data was posted.
For :secret, we need to generate a per-project secret that can be embedded in the URL and validated per request. This prevents someone from finding all the projects and just spamming these projects with requests.
It should be disabled by default, and the main documentation should include enabling it:
$ helm install brigade/brigade --set generic-gateway=true
Started a PoC for this on my local fork here, looking for an initial review before I submit a WIP PR:
Points:
{
"ref":"master",
"commit": "lolo"
}
Is it enough?
genericWebhookSecret would be equal to the empty stringThank you!
@dgkanatsios the PoC looks great to me. Let me know when I can help test and perhaps later next week @technosophos and others can take a look (hectic conference schedule currently!)
Thanks for the review! I鈥檓 off as well, will resume mid next week and let you know :)
PR created here
First of all, sorry for commenting so late in the development process for this feature.
This approach to implementing the generic gateway poses an interesting question - up until the implementation of this feature, the Brigade API server was read-only (accepting only GET requests).
Because the generic gateway is intended to be exposed publicly and used by other services, this means that unless we use ingress paths (not necessarily a straightforward task, and depends on what ingress is used), we would be exposing the entire Brigade API.
Is there a reason why this wouldn't be a separate service, like all other Brigade gateways?
Thanks!
cc @technosophos, @vdice, @dgkanatsios
As discussed, Generic Webhook is now a separate component
Most helpful comment
Started a PoC for this on my local fork here, looking for an initial review before I submit a WIP PR:
Points:
Is it enough?
genericWebhookSecretwould be equal to the empty stringThank you!