Commit Graph

18 Commits

Author SHA1 Message Date
Fredrik Adelöw 3f8c02c2df Merge pull request #29419 from miguelsimoes/fixes-missing-object-kind-support-on-GitlabEventRouter
Fixes missing object kind support on gitlab event router
2025-04-16 19:42:26 +02:00
djamaile 735fe12b05 fix: allow for webhookSecret to not be configured for GitHub and GitLab events backend
Signed-off-by: djamaile <rdjamaile@gmail.com>
2025-04-15 15:15:27 +02:00
djamaile ab2ace84ad chore: move modules from alpha to index
Signed-off-by: djamaile <rdjamaile@gmail.com>
2025-04-15 09:37:16 +02:00
djamaile 317ceb71c0 refactor: use default exports for gitlab and github event modules
Signed-off-by: djamaile <rdjamaile@gmail.com>
2025-04-14 21:30:11 +02:00
msimoes b60f5e3210 Added support to the 'object_kind' field as the definition of the Gitlab webhook trigger
Signed-off-by: msimoes <msimoes@tripadvisor.com>
Signed-off-by: msimoes <msimoes@gmail.com>
2025-04-01 13:50:31 +01:00
Patrick Jungermann 9816f510dc fix(events,github): fixes signature validation by using raw req body
Adds raw body information (body as buffer, encoding)
to `RequestDetails` to support more request validation
use cases.

Additionally, uses the raw body to retrieve the transmitted
JSON string unparsed/raw to correctly validate the signature.

Previously, we re-stringified the parsed JSON payload
which could lead to different JSON strings.
Those differences can lead to the rejection of requests
due to a mismatch in expected signature.

Fixes: #26709
Relates-to: PR #26884
Co-authored-by: Christopher Diaz <cdiaz@rvohealth.com>
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
2024-10-24 17:19:12 +02:00
Fredrik Adelöw 9080f57970 remove service compat too
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-08-20 13:26:25 +02:00
Fredrik Adelöw 78a0b086d2 Make createBackendPlugin and createBackendModule return BackendFeature instead of () => BackendFeature
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-06-13 15:56:24 +02:00
Patrick Jungermann eff3ca9ddd feat(events)!: migrate EventRouter implementations from EventBroker to EventsService
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
2024-02-26 12:28:41 +01:00
Patrik Oldsberg cc4228ec11 switch all backend module IDs to use kebab-case
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-11-28 11:53:57 +01:00
Vincenzo Scamporlino f66d490332 backend-test-utils: remove services from startTestBackend
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-08-15 17:47:12 +02:00
Vincenzo Scamporlino 2cccf58ef1 chore: config to rootConfig
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-07-31 17:11:00 +02:00
Johan Haals a5de745ac1 Rename event modules to comply with naming pattern
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2023-03-08 11:52:30 +01:00
Patrik Oldsberg 4c08ac06fc fix remaining alpha exports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-21 14:43:21 +01:00
Patrik Oldsberg ec7857e390 events-backend-module-gitlab: migrate to use exports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-21 14:28:20 +01:00
Patrik Oldsberg a46a0887a3 refactor all the things to use coreServices
Co-authored-by: Johan Haals <johan.haals@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-12-02 14:48:15 +01:00
Patrick Jungermann 31fe8f256a feat(events/gitlab): add webhook token verification
Add `createGitlabTokenValidator(config)` which can be used
to create a validator used at an ingress for topic `gitlab`.

On top, there is a new `gitlabWebhookEventsModule` for the new backend plugin API
which auto-registers the `HttpPostIngress` for topic `gitlab` incl. the validator.

Relates-to: PR #13931
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
2022-11-24 21:49:57 +01:00
Patrick Jungermann 63f7983398 feat(events/gitlab): add GitLabEventRouter
Add an event router for GitLab
which handles events from the topic `gitlab`
and re-publishes events under their more specific topic
based on the `$.event_name` payload field
like e.g., `gitlab.push`.

Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
2022-11-12 01:14:29 +01:00