Commit Graph

15 Commits

Author SHA1 Message Date
Stefan Prodan caec764ccc Refactor notifies to use Flux Event API v1beta1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-09 12:05:51 +00:00
Paulo Gomes 8d95dc087a
build: Improve fuzz tests' reliability
Establish conventions which aligns with what is supported upstream
today, whilst expanding on documentation to ensure folks have
pointers on how to debug/check for issues going forwards.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-11-23 14:56:32 +00:00
Stefan Prodan 224b12a2b8 Refactor notifiers to use Event API v1beta1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-11-22 11:00:25 +00:00
Max Jonas Werner a76b9a0c63
Add "generic-hmac" Provider
This commit adds the "generic-hmac" Provider type for authenticating
webhook requests coming from notification-controller. I extended the
`Forwarder` notifier to accept an optional key used for generating the
HMAC. If the key is nil or empty no HMAC header is generated and the
forwarder behaves as before. If it is provided an `X-Signature` HTTP
header is added to the request carrying the HMAC.

I transformed the `TestForwarder_Post` test into a table-driven test
so that we can use the same setup and testing code for testing HMAC
and non-HMAC forwarder instances.

Any existing `X-Signature` header value set through
a `Provider.spec.secretRef` Secret's `header` field will be
overwritten.

closes #99

Signed-off-by: Max Jonas Werner <max@e13.dev>
2022-10-04 18:41:45 +02:00
Paulo Gomes 5b1d1b1721
fuzz: Refactor Fuzzers based on Go native fuzzing
The existing fuzzers were converted into the Go native format.
Based on how the code was structured on this project, the fuzzers
can be quite effective, allowing for entire E2E fuzzing in some
cases, but with very low execution cost.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-09-07 10:46:29 +01:00
Philip Laine 2c69c847d3 Add context to Post function
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2022-07-27 18:26:28 +02:00
Moritz Schmitz von Hülst 3c7363234a Pass headers to generic provider through secretRef
Co-authored-by: Moritz Schmitz von H<C3><BC>lst <moritz@hauptstadtoffice.com>
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-01-26 12:39:02 +01:00
Ali AKCA 7ded18f850
chore: Drop deprecated io/ioutil
Signed-off-by: Ali AKCA <ali@akca.io>
2021-10-27 09:44:51 +02:00
Philip Laine 8f3b685f17 Add self signed cert to provider
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2021-04-15 00:08:59 +02:00
Somtochi Onyekwere a99a0bc50d Use deepcopy method for event
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-03-22 09:40:16 +01:00
Kevin McDermott 9222181998 Add support for sending a component header from the forwarder.
This adds support for sending an HTTP header `gotk-component` with the
originating controller, this can be identifed in receiving servers.

Signed-off-by: Kevin McDermott <bigkevmcd@gmail.com>
2020-11-18 14:01:52 +00:00
Stefan Prodan 2437884a97
Change copyright to Flux authors
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-27 18:52:14 +02:00
Stefan Prodan 1f5d108d1d
Implement http(s) proxy for alerts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-17 14:21:20 +03:00
Hidde Beydals bb7c241c83 Change CRD domain 'notification.toolkit.fluxcd.io'
Due to required domain changes for the helm-controller so that it
can co-exist in a cluster with the Helm Operator, other Toolkit
components are moving to a *.toolklit.fluxcd.io domain too.
2020-07-30 22:32:07 +02:00
stefanprodan a44891b760 Add forwarder to notification providers 2020-07-01 15:59:24 +03:00