Commit graph

19 commits

Author SHA1 Message Date
finga 81be79d46d ci: Add a basic ci config
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Do things like build docs, check fmt, clippy and build in non-release
and release mode as well as the debian package. Include a badge which
reflects the status of the ci for the main branch to the readme.
2022-02-10 00:56:49 +01:00
finga c1b322bc52 Add link to webhooks wiki page to readme
So that we have one thing which points to an explaination about what
webhooks are.
2021-11-22 14:42:38 +01:00
finga 33e39f0b40 Improve readme and fix typos
Improve wording and fix typos in readme.
2021-11-19 17:21:29 +01:00
finga 181edf589c Update readme with filters not and header 2021-11-17 15:19:38 +01:00
finga f24a786ec6 Make the metrics page configurable
Make the metrics page configurable with an `ip_filter`.

This closes #10.
2021-11-09 14:57:41 +01:00
finga b7cb27ed22 Update readme as nightly is not needed anymore
Due to the update to `rocket v0.5` nightly is not needed anymore.
2021-11-06 12:21:12 +01:00
finga 65430e65b7 Restructure and minor improvements
In order to keep things together the code was restructured. Some small
improvements such as clippy warnings and the validation of a hook in
regards of the ip filter.
2021-06-15 12:48:00 +02:00
finga 43b7fd5625 Support so called conjunction filters
This introduces thee so called conjunction filters and therefore
restructures the configuration file. The most obvious changes from an
users perspective are that the `filters` field was renamed to `filter`
and can, from now on, only support a single filter at first
level. Thats why now different filter types are implemented, please
consult the readme for further information on their usage.

To reflect the changes the readme file is updated as well as the
example config file contained in this repository.

This is related to #8
2021-05-31 15:55:50 +02:00
finga 891a8a70ae Update build deps and improve readability
The ip filtering is improved as well as the replacing of
parameters. The index page is removed.
2021-05-29 01:03:07 +02:00
finga 7f143e0b08 Split from_data() up in smaller pieces
To still be able to handle errors correctly, also regarding the http
status code, `thiserror::Error` is used.
2021-04-03 01:10:50 +02:00
finga 8314214e06 Add optional ip_filter to hook config
In order to allow or deny sources of requests the possibility to
configure a list of allowed or denied IP addresses was added as
described by the readme.

Closes #3
2021-04-02 01:59:45 +02:00
finga 8099bf773f Arbitrary header fields in commands
Adopt the parser to be able to parse header fields.
2021-03-30 01:16:15 +02:00
finga 2c00441b34 Restructuring of from_data() and configuration
For better readability, correctness and maintainability the
body (which is still rather large, though) was restructured.

Regarding the signature, to be able to configure different fields in
the HTTP header the configuration parameter signature was added.
2021-03-29 04:32:09 +02:00
finga ee32424f8c Use signature field for verification
Instead of looking for a "secret" field hmac is used. Therefore the
raw payload is hashed with all secrets consecutively in order to
validate its content. If the content is certified the established
behaviour is pursued..
2021-03-28 04:18:35 +02:00
finga b05acf9c72 Housekeeping of example config and readme
Update readme to current state and rename the example config to
prevent confusion.
2021-03-21 23:35:08 +01:00
finga 0610fd49c9 Replace command parameters with values
To create a minimalistic parser, nom is used to identify and replace
parameters given in the command field.

For clarity the `action` field for hooks was renamed to `command`.
2021-03-21 22:38:14 +01:00
finga 54e48c66b3 Extend README.md a bit
Add some high-level description.
2021-03-19 14:37:53 +01:00
finga b370d59b40 Implement secret functionality
In order to validate requests a field called `secret` has to be sent
containing a secret key which validates the request. A hook will be
executed only if the secret sent with the request matches the hook's
secret.
2021-03-19 10:40:19 +01:00
finga 2539e75071 Add readme file to give at least some infos 2021-03-12 16:59:30 +01:00