2023-07-20 16:31:30 +02:00
[ package ]
name = "proxmox-notify"
2024-09-20 08:42:25 +02:00
description = "implementation of notification base and plugins"
2024-11-10 18:58:00 +01:00
version = "0.5.0"
2024-09-20 08:42:25 +02:00
2023-07-20 16:31:30 +02:00
authors . workspace = true
edition . workspace = true
2024-09-20 08:42:25 +02:00
exclude . workspace = true
homepage . workspace = true
2023-07-20 16:31:30 +02:00
license . workspace = true
repository . workspace = true
2024-09-20 08:42:25 +02:00
rust-version . workspace = true
2023-07-20 16:31:30 +02:00
[ dependencies ]
2023-11-14 13:59:13 +01:00
anyhow . workspace = true
notify: implement webhook targets
This target type allows users to perform HTTP requests to arbitrary
third party (notification) services, for instance
ntfy.sh/Discord/Slack.
The configuration for these endpoints allows one to freely configure
the URL, HTTP Method, headers and body. The URL, header values and
body support handlebars templating to inject notification text,
metadata and secrets. Secrets are stored in the protected
configuration file (e.g. /etc/pve/priv/notification.cfg) as key value
pairs, allowing users to protect sensitive tokens/passwords.
Secrets are accessible in handlebar templating via the secrets.*
namespace, e.g. if there is a secret named 'token', a body
could contain '{{ secrets.token }}' to inject the token into the
payload.
A couple of handlebars helpers are also provided:
- url-encoding (useful for templating in URLs)
- escape (escape any control characters in strings)
- json (print a property as json)
In the configuration, the body, header values and secret values
are stored in base64 encoding so that we can store any string we want.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
2024-11-08 15:41:12 +01:00
base64 = { workspace = true , optional = true }
2024-03-19 10:29:27 +01:00
const_format . workspace = true
2023-07-20 16:31:42 +02:00
handlebars = { workspace = true }
notify: implement webhook targets
This target type allows users to perform HTTP requests to arbitrary
third party (notification) services, for instance
ntfy.sh/Discord/Slack.
The configuration for these endpoints allows one to freely configure
the URL, HTTP Method, headers and body. The URL, header values and
body support handlebars templating to inject notification text,
metadata and secrets. Secrets are stored in the protected
configuration file (e.g. /etc/pve/priv/notification.cfg) as key value
pairs, allowing users to protect sensitive tokens/passwords.
Secrets are accessible in handlebar templating via the secrets.*
namespace, e.g. if there is a secret named 'token', a body
could contain '{{ secrets.token }}' to inject the token into the
payload.
A couple of handlebars helpers are also provided:
- url-encoding (useful for templating in URLs)
- escape (escape any control characters in strings)
- json (print a property as json)
In the configuration, the body, header values and secret values
are stored in base64 encoding so that we can store any string we want.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
2024-11-08 15:41:12 +01:00
http = { workspace = true , optional = true }
2023-11-14 13:59:20 +01:00
lettre = { workspace = true , optional = true }
2023-07-20 16:31:31 +02:00
log . workspace = true
2023-11-14 13:59:18 +01:00
mail-parser = { workspace = true , optional = true }
2023-07-20 16:31:31 +02:00
openssl . workspace = true
notify: implement webhook targets
This target type allows users to perform HTTP requests to arbitrary
third party (notification) services, for instance
ntfy.sh/Discord/Slack.
The configuration for these endpoints allows one to freely configure
the URL, HTTP Method, headers and body. The URL, header values and
body support handlebars templating to inject notification text,
metadata and secrets. Secrets are stored in the protected
configuration file (e.g. /etc/pve/priv/notification.cfg) as key value
pairs, allowing users to protect sensitive tokens/passwords.
Secrets are accessible in handlebar templating via the secrets.*
namespace, e.g. if there is a secret named 'token', a body
could contain '{{ secrets.token }}' to inject the token into the
payload.
A couple of handlebars helpers are also provided:
- url-encoding (useful for templating in URLs)
- escape (escape any control characters in strings)
- json (print a property as json)
In the configuration, the body, header values and secret values
are stored in base64 encoding so that we can store any string we want.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
2024-11-08 15:41:12 +01:00
percent-encoding = { workspace = true , optional = true }
2024-03-19 10:27:25 +01:00
regex . workspace = true
2024-04-19 16:17:09 +02:00
serde = { workspace = true , features = [ "derive" ] }
2024-03-19 10:27:25 +01:00
serde_json . workspace = true
2023-07-20 16:31:36 +02:00
proxmox-http = { workspace = true , features = [ "client-sync" ] , optional = true }
2023-07-26 16:18:23 +02:00
proxmox-http-error . workspace = true
2023-07-20 16:31:42 +02:00
proxmox-human-byte . workspace = true
2024-04-19 16:17:09 +02:00
proxmox-schema = { workspace = true , features = [ "api-macro" , "api-types" ] }
2023-07-20 16:31:31 +02:00
proxmox-section-config = { workspace = true }
2024-03-19 10:27:25 +01:00
proxmox-serde . workspace = true
2023-07-20 16:31:34 +02:00
proxmox-sys = { workspace = true , optional = true }
2023-07-20 16:31:42 +02:00
proxmox-time . workspace = true
2024-04-19 16:17:10 +02:00
proxmox-uuid = { workspace = true , features = [ "serde" ] }
2023-07-20 16:31:34 +02:00
[ features ]
notify: implement webhook targets
This target type allows users to perform HTTP requests to arbitrary
third party (notification) services, for instance
ntfy.sh/Discord/Slack.
The configuration for these endpoints allows one to freely configure
the URL, HTTP Method, headers and body. The URL, header values and
body support handlebars templating to inject notification text,
metadata and secrets. Secrets are stored in the protected
configuration file (e.g. /etc/pve/priv/notification.cfg) as key value
pairs, allowing users to protect sensitive tokens/passwords.
Secrets are accessible in handlebar templating via the secrets.*
namespace, e.g. if there is a secret named 'token', a body
could contain '{{ secrets.token }}' to inject the token into the
payload.
A couple of handlebars helpers are also provided:
- url-encoding (useful for templating in URLs)
- escape (escape any control characters in strings)
- json (print a property as json)
In the configuration, the body, header values and secret values
are stored in base64 encoding so that we can store any string we want.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
2024-11-08 15:41:12 +01:00
default = [ "sendmail" , "gotify" , "smtp" , "webhook" ]
2024-04-19 16:17:08 +02:00
mail-forwarder = [ "dep:mail-parser" , "dep:proxmox-sys" ]
notify: implement webhook targets
This target type allows users to perform HTTP requests to arbitrary
third party (notification) services, for instance
ntfy.sh/Discord/Slack.
The configuration for these endpoints allows one to freely configure
the URL, HTTP Method, headers and body. The URL, header values and
body support handlebars templating to inject notification text,
metadata and secrets. Secrets are stored in the protected
configuration file (e.g. /etc/pve/priv/notification.cfg) as key value
pairs, allowing users to protect sensitive tokens/passwords.
Secrets are accessible in handlebar templating via the secrets.*
namespace, e.g. if there is a secret named 'token', a body
could contain '{{ secrets.token }}' to inject the token into the
payload.
A couple of handlebars helpers are also provided:
- url-encoding (useful for templating in URLs)
- escape (escape any control characters in strings)
- json (print a property as json)
In the configuration, the body, header values and secret values
are stored in base64 encoding so that we can store any string we want.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
2024-11-08 15:41:12 +01:00
sendmail = [ "dep:proxmox-sys" , "dep:base64" ]
2023-07-20 16:31:36 +02:00
gotify = [ "dep:proxmox-http" ]
2023-11-14 13:59:19 +01:00
pve-context = [ "dep:proxmox-sys" ]
pbs-context = [ "dep:proxmox-sys" ]
2023-11-14 13:59:20 +01:00
smtp = [ "dep:lettre" ]
notify: implement webhook targets
This target type allows users to perform HTTP requests to arbitrary
third party (notification) services, for instance
ntfy.sh/Discord/Slack.
The configuration for these endpoints allows one to freely configure
the URL, HTTP Method, headers and body. The URL, header values and
body support handlebars templating to inject notification text,
metadata and secrets. Secrets are stored in the protected
configuration file (e.g. /etc/pve/priv/notification.cfg) as key value
pairs, allowing users to protect sensitive tokens/passwords.
Secrets are accessible in handlebar templating via the secrets.*
namespace, e.g. if there is a secret named 'token', a body
could contain '{{ secrets.token }}' to inject the token into the
payload.
A couple of handlebars helpers are also provided:
- url-encoding (useful for templating in URLs)
- escape (escape any control characters in strings)
- json (print a property as json)
In the configuration, the body, header values and secret values
are stored in base64 encoding so that we can store any string we want.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
2024-11-08 15:41:12 +01:00
webhook = [ "dep:base64" , "dep:http" , "dep:percent-encoding" , "dep:proxmox-http" ]