Commit Graph

1310 Commits

Author SHA1 Message Date
Fabian Grünbichler
1cd6a842f7 subscription: add missing path dependencies
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-19 14:20:58 +02:00
Fabian Grünbichler
d7082b037d make: add proxmox-metrics to crate list
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-19 14:20:02 +02:00
Fabian Grünbichler
9478ae2bed fixup! time: update to nom 7 2022-08-19 14:19:39 +02:00
Fabian Grünbichler
12da49b5ec schema: bump to 1.3.4
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-19 12:41:15 +02:00
Fabian Grünbichler
1349f24d49 schema: update to textwrap 0.15
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-19 12:26:42 +02:00
Fabian Grünbichler
1344ffdd94 time: bump to 1.1.4
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-19 12:22:45 +02:00
Fabian Grünbichler
552f14e916 time: update to nom 7
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-19 12:22:27 +02:00
Wolfgang Bumiller
b3e2a1f574 bump d/control files
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:39:21 +02:00
Wolfgang Bumiller
d52a1b7889 bump proxmox-subscription to 0.2.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:35:47 +02:00
Wolfgang Bumiller
7540ebd238 bump proxmox-shared-memory to 0.2.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:35:47 +02:00
Wolfgang Bumiller
2eacdbe090 bump proxmox-http to 0.6.5-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:35:47 +02:00
Wolfgang Bumiller
1d3f4a4bbd http, shared-memory, subscription: bump proxmox-sys dependency to 0.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:35:47 +02:00
Wolfgang Bumiller
6dc2393625 sys: drop comment from Cargo.toml
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:29:42 +02:00
Wolfgang Bumiller
6e857c6090 bump proxmox-sys to 0.4.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:28:21 +02:00
Wolfgang Bumiller
c5382d1b20 sys: doc fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 10:55:10 +02:00
Wolfgang Bumiller
28ee8bc6d0 http: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 10:52:50 +02:00
Wolfgang Bumiller
31a569b425 api-macro: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 10:52:07 +02:00
Wolfgang Bumiller
c78c47cff2 uuid: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 10:51:22 +02:00
Wolfgang Bumiller
6cac8d5cbe sys: another Arc::clone
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 14:45:39 +02:00
Wolfgang Bumiller
51746a0d45 sys: explicit Arc::clone
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 14:44:49 +02:00
Wolfgang Bumiller
6e247b9593 sys: use Iterator::min instead of a manual version
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 13:21:36 +02:00
Wolfgang Bumiller
36903bf2fe sys: bump edition to 2021
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 13:04:09 +02:00
Wolfgang Bumiller
4de145aaef lang: update c_str
drop the let binding, easier to use in const context since
CStr::from_bytes_with_nul_unchecked is const since 1.59

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 12:27:44 +02:00
Wolfgang Bumiller
34d2c91118 sys: drop proxmox-borrow dependency
nix now has an owning directory iterator, we don't need it
anymore

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 12:24:14 +02:00
Wolfgang Bumiller
36625fb92c tfa: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 12:24:01 +02:00
Wolfgang Bumiller
d0b4f0bf2f tfa: docs fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 12:23:50 +02:00
Wolfgang Bumiller
df0d30a106 bump proxmox-tfa to 2.1.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:38:04 +02:00
Wolfgang Bumiller
a7f808d43b tfa: bump edition to 2021
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:35:58 +02:00
Wolfgang Bumiller
d396c3ea31 tfa: clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:35:57 +02:00
Wolfgang Bumiller
ea34292850 tfa: expose 'allow_subdomains' property
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:25:52 +02:00
Wolfgang Bumiller
b84446a030 sys: enable CreateOptions::group_root/root_only
nix now has the required const fns

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 10:31:49 +02:00
Wolfgang Bumiller
d3364e07fb sys: file locking depends on timer feature
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-22 11:58:18 +02:00
Wolfgang Bumiller
e2e7ea6d62 sys: introduce 'acl', 'crypt' and 'timer' features
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 15:42:11 +02:00
Wolfgang Bumiller
f6c7d46d04 bump proxmox-subscription to 0.2.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 14:36:49 +02:00
Fabian Grünbichler
6ff1c96021 add default signing key path
for use in dependent modules. this file should be shipped via
proxmox-archive-keyring.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-21 13:30:11 +02:00
Fabian Grünbichler
5391f5313b subscription: make key optional and support multiple keys
this is a breaking change requiring updates in proxmox-perl-rs and
proxmox-backup.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-21 13:29:15 +02:00
Wolfgang Bumiller
d228ef6e20 http: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 12:58:41 +02:00
Wolfgang Bumiller
dc57115703 bump proxmox-http to 0.6.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 12:58:11 +02:00
Mira Limbeck
a8a838754d http: fix proxy authorization header to include type
and encode the username:password string as base64 [0]. This fixes the
error 407 issue when using proxy authentication [1].

[0] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authorization
[1] https://forum.proxmox.com/threads/checking-the-subscription-behind-a-proxy-fails.112063/

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
2022-07-21 12:54:59 +02:00
Wolfgang Bumiller
760c49be6e subscription: check in d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 12:54:59 +02:00
Wolfgang Bumiller
6794989b2a proxmox-subscription: initial bump to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:37:08 +02:00
Wolfgang Bumiller
757031ef33 sys: clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:35:58 +02:00
Wolfgang Bumiller
94d388b988 http: clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:31:58 +02:00
Wolfgang Bumiller
5e630472ec subscription: clippy fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:28:31 +02:00
Wolfgang Bumiller
ab17e16664 subscription: line-wrap test data
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:28:31 +02:00
Wolfgang Bumiller
0cd02a0d2b subscription: doc comment fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:28:31 +02:00
Fabian Grünbichler
3f694b5481 subscription: clippy lints
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-20 13:28:31 +02:00
Fabian Grünbichler
baf31dc2d8 subscription: properly case status enum values
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-20 13:28:31 +02:00
Fabian Grünbichler
38492bde83 check signature when reading subscription
and handle signed keys differently w.r.t. age checks, since they will be
refreshed less frequently.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-19 15:20:36 +02:00
Fabian Grünbichler
4ec9a8183d add new proxmox-subscription crate
taking over slighlty generified helpers and types:
- subscription info and status
- checking subscription status with shop
- reading/writing local subscription-related files

the perl-based code uses base64 with newlines for the data, and base64
without padding for the checksum. accordingly, calculate the checksum
with and without newlines, and compare the decoded checksum instead of
the encoded one.

furthermore, the perl-based code encodes the subscription status using
Capitalized values instead of lowercase, so alias those for the time
being.

PVE also stores the serverid as 'validdirectory', so add that as alias
as well.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-19 15:20:36 +02:00