Commit Graph

44 Commits

Author SHA1 Message Date
Wolfgang Bumiller
d422852f51 bump proxmox-http to 0.8.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-03-02 16:14:04 +01:00
Wolfgang Bumiller
b62d76e80c http: start 0.8.0 refactoring
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-03-02 16:14:04 +01:00
Wolfgang Bumiller
4ff5c59559 fix 'default-features = false' for ldap3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-02-08 14:26:34 +01:00
Lukas Wagner
6fd77c9a5e ldap: add basic user auth functionality
In the LDAP world, authentication is done using the bind operation, where
users are authenticated with the tuple (dn, password). Since we only know
the user's username, it is first necessary to look up the user's
domain (dn).

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-02-08 14:11:12 +01:00
Lukas Wagner
0e2f88ccf3 ldap: create new proxmox-ldap crate
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-02-08 14:11:08 +01:00
Fabian Grünbichler
40cb468bef bump proxmox-router to 1.3.1-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-05 12:10:00 +01:00
Fabian Grünbichler
d0c1958f86 bump proxmox-schema to 1.3.6-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-05 12:08:58 +01:00
Fabian Grünbichler
01e9b3affc bump proxmox-sys to 0.4.2-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-05 12:07:45 +01:00
Fabian Grünbichler
ff9aa2012e update nix to 0.26
it's the version currently shipped by bookworm, so let's unify this widely-used
dependency to make bootstrapping easier.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-05 12:07:16 +01:00
Wolfgang Bumiller
aaf4b72839 deps: bump api-macro to current version
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-12-12 11:51:08 +01:00
Fabian Grünbichler
ee8419cf2d workspace: switch remaining dependencies
while these are (currently) only used by a single member each, having *all*
dependency versions specified in the top level Cargo.toml only makes the whole
process of managing them less error-prone.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 11:05:30 +01:00
Fabian Grünbichler
8316fd3899 more workspace dependencies
regex was missed in the first pass, and two intra-workspace dev-dependencies as
well.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:30:30 +01:00
Fabian Grünbichler
48abc5afa3 update outdated workspace dependencies
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:47 +01:00
Fabian Grünbichler
e5abc0590e define workspace dependencies in workspace
so that we no longer have to (or forget to) bump the version in multiple places.

notable changes:
- outdated versions have been unified
- proxmox-metrics -> proxmox-async no longer uses explicit empty features
  (proxmox-async doesn't provide any anyway)
- proxmox-subscription -> proxmox-http no longer uses explicit default_features
  = false (proxmox-http has an empty default feature anyway)
- missing path dependencies added (mainly proxmox-rest-server)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:38 +01:00
Fabian Grünbichler
4189221470 inherit shared, external dependencies
noteworthy changes:
- proxmox-http had a default_features_false dep on hyper, which is dropped (the
  default feature is empty anyway)
- hyper, libc, nix, tokio and url versions are unified
- missing (cosmetic) bindgen feature on zstd enabled everywhere

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:38 +01:00
Fabian Grünbichler
64959d9ae0 move common metadata to workspace
and switch all crates to 2021 edition as well as a unified "authors" value.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:25 +01:00
Thomas Lamprecht
7c7e2f886c rest-server: add packaging and bump to 0.2.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-11 15:09:50 +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
Dominik Csapak
b8bf6a5c81 split out compression code into new crate 'proxmox-compression'
this removes quite a bit of dependecies of proxmox-async

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[set proxmox-lang dep to 1.1]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 14:10:53 +01:00
Dominik Csapak
8bf293bfc5 proxmox-metrics: implement metrics server client code
influxdb (udp + http(s)) only for now

general architecture looks as follows:

the helper functions influxdb_http/udp start a tokio task and return
a Metrics struct, that can be used to send data and wait for the tokio
task. if the struct is dropped, the task is canceled.

so it would look like this:
  let metrics = influxdb_http(..params..)?;
  metrics.send_data(...).await?;
  metrics.send_data(...).await?;
  metrics.join?;

on join, the sending part of the channel will be dropped and thus
flushing the remaining data to the server

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[renamed proxmox_async::io::udp -> proxmox_async::net::udp]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 12:56:21 +01:00
Dietmar Maurer
d357ce2070 remove proxmox crate (no longer used)
Most functionality is now in proxmox-sys. The common-regex.rs is
moved back into proxmox-backup-server, because it is only used there.
Serde code is now in new proxmox-serde crate.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-24 10:00:38 +01:00
Dietmar Maurer
194b028789 proxmox-serde: add new crate with code from proxmox/src/tools/serde.rs 2021-11-24 10:00:38 +01:00
Dietmar Maurer
e1f0eb4aec proxmox-async: start new crate
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-19 16:42:11 +01:00
Dietmar Maurer
840154f61b proxmox-sys: add new crate
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-19 09:28:32 +01:00
Dietmar Maurer
9828acd2ef proxmox-shared-memory: shared memory and shared mutex implementation 2021-11-12 18:19:36 +01:00
Wolfgang Bumiller
f35dbbd651 add proxmox-section-config crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:39:59 +02:00
Wolfgang Bumiller
41f3fdfeb9 add proxmox-schema and proxmox-router crates
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:39:59 +02:00
Wolfgang Bumiller
01a8b6f1bf add proxmox-io crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 10:07:53 +02:00
Wolfgang Bumiller
91f59f9f59 add proxmox-lang crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00
Wolfgang Bumiller
9b6fe4aceb add proxmox-time crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00
Wolfgang Bumiller
7db0a3c6df add proxmox-borrow crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00
Wolfgang Bumiller
bd67ccc1b3 add proxmox-uuid crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00
Wolfgang Bumiller
77dc52c047 add proxmox-tfa crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00
Fabian Grünbichler
7b7e1413ff meta: add empty proxmox-http sub-crate
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-05-17 09:42:16 +02:00
Wolfgang Bumiller
436bf05e0b merge api, sys and tools into proxmox directly
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-21 12:15:42 +01:00
Fabian Grünbichler
a94de245f0 build: switch to debcargo
to autogenerate crate (build)-dependencies, and correct Provides
statements.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-15 12:02:47 +01:00
Wolfgang Bumiller
068d56ed3d delete the old api macro stuff
to be replaced by a new set of macros for the current api
schema in proxmox-backup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 13:13:18 +01:00
Wolfgang Bumiller
7f4d223a4a rename sorted-data to proxmox-sortable_macro
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 13:10:37 +01:00
Wolfgang Bumiller
ceb3ff5544 import sorted-data proc macro
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 11:04:13 +01:00
Wolfgang Bumiller
fe46b11152 add an api-test module
Run with:
cargo run -p api-test -- SomeDirectory/

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-06-12 15:54:52 +02:00
Dietmar Maurer
71f2d48c2e start proxmox-sys module 2019-06-07 18:03:07 +02:00
Wolfgang Bumiller
b5c05fc85c import proxmox-api-macro crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-06-06 15:25:47 +02:00
Wolfgang Bumiller
fa2ba562ce add proxmox-api crate
This contains the router and will get helpers for
generating documentation, and for parsing command line
parameters for api methods.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-06-06 14:06:21 +02:00
Wolfgang Bumiller
2e6520a987 initial import, starting with vec & io helpers
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-06-06 14:00:25 +02:00