Commit Graph

114 Commits

Author SHA1 Message Date
Wolfgang Bumiller
bb8460bc0f time: bump to 2.0.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-20 13:49:56 +02:00
Wolfgang Bumiller
533954ed38 bump bitflags dependency to 2.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-20 13:48:32 +02:00
Wolfgang Bumiller
0f33d603ef router: bump to 2.1.5-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-20 10:56:05 +02:00
Wolfgang Bumiller
57fb1004b8 sys: bump to 0.5.7-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-20 10:56:05 +02:00
Wolfgang Bumiller
d8eb6d1bde lang: bump to 1.3.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-20 10:56:05 +02:00
Shannon Sterz
84537a02b1 access-control: factor out user config handling
this commit factors out the user config. it also add two new functions
to the `AccessControlConfig` trait to handle caching in a more
generalized way.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-06-19 13:38:56 +02:00
Shannon Sterz
86ffeef24a access-control: add the proxmox-access crate to reuse acl trees
this commit factors out the acl tree from proxmox-backup so we can
re-use it accross other products. to use it, the product needs to
implement the `AcmConfig` trait and provide this crate with a
location to safe its configuration files.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-06-19 13:38:50 +02:00
Wolfgang Bumiller
c336cb9ab7 io: bump to 1.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 12:21:43 +02:00
Wolfgang Bumiller
e2cd917394 product-config: bump to 0.2.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 12:07:37 +02:00
Dietmar Maurer
7e4121d26e acme-api: add function to extract certificate data from .pem data
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-06-06 14:07:43 +02:00
Dietmar Maurer
53ff71772f simple-config: new crate to read/write proxmox simple text config files
Copied from proxmox-backup/src/tools/config.rs

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-06-06 10:16:28 +02:00
Dietmar Maurer
40f812f324 remove system-management-api
Which is now split into separate crates:

- time-api
- network-api
- dns-api
- syslog-api
2024-05-30 09:53:59 +02:00
Dietmar Maurer
f6bcb6b50b syslog-api: new crate, split out from system-management-api 2024-05-30 09:44:48 +02:00
Dietmar Maurer
6bb74338b4 network-api: new crate, split out from system-management-api
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-05-30 09:27:49 +02:00
Dietmar Maurer
83b6f673b3 time-api: new crate, split out from system-managent-api
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-05-30 09:06:19 +02:00
Dietmar Maurer
b7f0cc7c1e dns-api: new crate, split out from system-management-api
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-05-30 08:44:50 +02:00
Dietmar Maurer
34b21106dd config-digest: split out config digest api type into separate crate
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-05-29 17:59:03 +02:00
Gabriel Goller
1d68cc33a3 metrics: influxdb test uri creation
Extract the URI creation for write and health URIs. Add unit test to
test the encoding of special characters in the organization and bucket
parameters.

Follow-up-to: bfa73aad ("metrics: encode influxdb org and bucket parameters")

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>

FG: downgraded form_urlencoded version to packaged one
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-05-24 10:10:38 +02:00
Wolfgang Bumiller
bf9dc73246 sys: bump version to 0.5.5-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-05-22 15:48:34 +02:00
Dietmar Maurer
cfc155a06b acme-api: reusable ACME api implementation.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-05-16 12:35:14 +02:00
Dietmar Maurer
49b97b6a5f bump proxmox-schema to 3.1.1-1
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-05-16 09:35:50 +02:00
Dietmar Maurer
3c19dd757a rename proxmox-system-config-api to proxmox-system-management-api
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-05-15 13:23:42 +02:00
Dietmar Maurer
751b578d6e rename proxmox-dns-api to proxmox-system-config-api
Because we want to bundle system configuration APIs in one crate,
i.e. Time, DNS, Network. We may separate them in future using
cargo features.
2024-05-07 13:32:26 +02:00
Dietmar Maurer
64e8a72a0b fix typo in proxmox-product-config workspace dependency
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-05-03 09:28:33 +02:00
Dietmar Maurer
c2f85d418a dns-api: new crate which implements the DNS api
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-05-02 13:04:43 +02:00
Dietmar Maurer
9fc48d96d2 new crate for commonly used functions to read and write configuration files
Factor out functions to read and write configuration files with
product specific permissions.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-05-02 11:17:27 +02:00
Wolfgang Bumiller
d653ac343b bump proxmox-schema to 3.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-19 11:08:28 +01:00
Dietmar Maurer
0c5e2640d0 proxmox-schema: use const_format to define static strings.
Macro rules are not hygienic, and current rust macro visibility rules
are a nightmare. Using const_format::concatcp!() is a much cleaner
solution.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-03-18 10:19:46 +01:00
Maximiliano Sandoval R
430df21720 sys: Use safe wrapper for libc::isatty
Use the `std::io::IsTerminal` trait introduced in Rust 1.70.

Internally it calls `libc::isatty`, see [1, 2]. Note that it switches
the comparison from `== 1` to `!= 0` which shouldn't make a difference
assuming that libc::isatty upholds the promises made in its man page.

The MSRV was set on the workspace to reflect this change.

[1] https://doc.rust-lang.org/src/std/io/stdio.rs.html#1079
[2] https://doc.rust-lang.org/src/std/sys/unix/io.rs.html#79

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-02-16 16:55:58 +01:00
Wolfgang Bumiller
890d9e58f7 bump proxmox-rest-server to 0.5.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:58:05 +01:00
Wolfgang Bumiller
f67ea142bc bump proxmox-router to 2.1.3-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:56:34 +01:00
Wolfgang Bumiller
ca6ca904ad bump proxmox-api-macro to 1.0.8-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:56:01 +01:00
Wolfgang Bumiller
245524d0d8 bump proxmox-schema to 3.0.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:53:12 +01:00
Lukas Wagner
5cbc8a4b66 add proxmox-rrd to workspace
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-01 10:30:57 +01:00
Wolfgang Bumiller
8fdf696eed bump proxmox-time dependency to 1.1.6
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-08 12:18:12 +01:00
Wolfgang Bumiller
e703725049 add proxmox-acme to workspace
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-04 11:45:00 +01:00
Wolfgang Bumiller
4a8cadc7e0 bump proxmox-rest-server to 0.5.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-27 14:39:22 +01:00
Thomas Lamprecht
af660f1fee sys: bump version to 0.5.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-17 10:42:38 +01:00
Lukas Wagner
53627a1952 notify: add 'smtp' endpoint
This commit adds a new endpoint type, namely 'smtp'. This endpoint
uses the `lettre` crate to directly send emails to SMTP relays.

The `lettre` crate was chosen since it is by far the most popular SMTP
implementation for Rust that looks like it is well maintained.
Also, it includes async support (for when we want to extend
proxmox-notify to be async).

For this new endpoint type, a new section-config type was introduced
(smtp). It has the same fields as the type for `sendmail`, with the
addition of some new options (smtp server, authentication, tls mode,
etc.).

Some of the behavior that is shared between sendmail and smtp
endpoints has been moved to a new `endpoints::common::mail` module.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 08:31:36 +01:00
Lukas Wagner
5f7ac875f6 notify: add mechanisms for email message forwarding
As preparation for the integration of `proxmox-mail-foward` into the
notification system, this commit makes a few changes that allow us to
forward raw email messages (as passed from postfix).

For mail-based notification targets, the email will be forwarded
as-is, including all headers. The only thing that changes is the
message envelope.
For other notification targets, the mail is parsed using the
`mail-parser` crate, which allows us to extract a subject and a body.
As a body we use the plain-text version of the mail. If an email is
HTML-only, the `mail-parser` crate will automatically attempt to
transform the HTML into readable plain text.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 08:31:36 +01:00
Wolfgang Bumiller
1a6f1efe63 workspace: set resolver to 2 to silence a warning
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-10-16 08:53:35 +02:00
Fabian Grünbichler
04e2d0e5c3 bump proxmox-api-macro to 1.0.6-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-03 09:37:01 +02:00
Fabian Grünbichler
c83627b1a6 bump proxmox-sortable-macro to 0.1.3-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-03 09:37:01 +02:00
Fabian Grünbichler
4fd7359677 bump proxmox-router to 2.1.1-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-02 09:25:10 +02:00
Wolfgang Bumiller
b232b580a0 update to syn 2
This mostly affected attribute parsing (due to the syn::Meta changes).
Also creating `DelimSpan`s for custom-built `syn::Attribute`s is a
bit... ugly.
Upshot: turns out we can drop some helpers in util.rs with the new
`syn::Meta` changes.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-09-29 13:52:21 +02:00
Wolfgang Bumiller
eb1abe45b6 router: bump env_logger to 0.10 and move to workspace
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-09-28 09:59:48 +02:00
Wolfgang Bumiller
34a79cdd0c bump proxmox-api-macro to 1.0.5-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-08-03 08:25:13 +02:00
Wolfgang Bumiller
25024fa687 import proxmox-client crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-08-01 15:49:43 +02:00
Lukas Wagner
779c45eaad http-error: add new http-error crate
Break out proxmox-router's HttpError into it's own crate so that it can
be used without pulling in proxmox-router.

This commit also implements `Serialize` for `HttpError` so that it can
be returned from perlmod bindings, allowing Perl code to access the
status code as well as the message.

Also add some smoke-tests to make sure that the `http_bail` and
`http_err` macros actually produce valid code.

Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-28 10:47:03 +02:00
Wolfgang Bumiller
7ea502b351 bump proxmox-section-config to 2.0.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-24 11:03:15 +02:00