Fabian Grünbichler
9a37bd6c84
tree-wide: fix needless borrows
...
found and fixed via clippy
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-30 13:55:33 +01:00
Wolfgang Bumiller
e6e2927e72
update proxmox-tfa to 2.0
...
and fix still-very-bad updater usage in config api call...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-29 11:19:50 +01:00
Dietmar Maurer
25877d05ac
update to proxmox-sys 0.2 crate
...
- imported pbs-api-types/src/common_regex.rs from old proxmox crate
- use hex crate to generate/parse hex digest
- remove all reference to proxmox crate (use proxmox-sys and
proxmox-serde instead)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-24 10:32:27 +01:00
Fabian Grünbichler
ea67cd70c9
tfa: handle incompatible challenge data
...
by returning default data, in case the challenge data is not parseable.
this allows a new challenge to be started for the userid in question
without manual cleanup.
currently this can be triggered if an ongoing challenge created with
webauthn-rs 0.2.5 is stored in /run and attempted to be read
post-upgrade.
Reported-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-19 14:12:31 +01:00
Wolfgang Bumiller
281a5dd1fc
cleanup unused re-exports
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-19 12:49:46 +01:00
Stoiko Ivanov
25c1420a12
config: acme: plugin: rustfmt
...
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-18 11:32:22 +01:00
Wolfgang Bumiller
9407810fe1
switch tfa api to use proxmox-tfa::api
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 09:33:04 +01:00
Dietmar Maurer
e0a19d3313
use new fsync parameter to replace_file and atomic_open_or_create
...
Depend on proxmox 0.15.0 and proxmox-openid 0.8.1
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:28:32 +02:00
Wolfgang Bumiller
890b88cbef
remove pbs-tools::ops::ControlFlow
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-12 14:36:40 +02:00
Wolfgang Bumiller
6ef1b649d9
update to first proxmox crate split
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:58:49 +02:00
Dietmar Maurer
ccc3896ff3
avoid type re-exports
2021-09-14 08:35:43 +02:00
Dietmar Maurer
6227654ad8
more api type cleanups: avoid re-exports
2021-09-10 12:25:32 +02:00
Dietmar Maurer
e7d4be9d85
move datastore config to pbs_config workspace
2021-09-10 08:40:58 +02:00
Dietmar Maurer
ba3d7e19fb
move user configuration to pbs_config workspace
...
Also moved memcom.rs and cached_user_info.rs
2021-09-10 07:09:04 +02:00
Dietmar Maurer
b65dfff574
cleanup User configuration: use Updater
2021-09-09 13:14:28 +02:00
Dietmar Maurer
8cc3760e74
move acl to pbs_config workspaces, pbs_api_types cleanups
2021-09-09 10:50:08 +02:00
Dietmar Maurer
1cb08a0a05
move token_shadow to pbs_config workspace
...
Also moved out crypt.rs (libcrypt bindings) to pbs_tools workspace.
2021-09-08 14:00:14 +02:00
Dietmar Maurer
6f4228809e
move network config to pbs_config workspace
2021-09-08 12:22:48 +02:00
Dietmar Maurer
802189f7f5
move verify.rs to pbs_config workspace
2021-09-08 08:01:07 +02:00
Dietmar Maurer
a4e5a0fc9f
move sync.rs to pbs_config workspace
2021-09-08 06:57:23 +02:00
Dietmar Maurer
e3619d4101
moved tape_job.rs to pbs_config workspace
2021-09-07 12:40:15 +02:00
Dietmar Maurer
5839c469c1
move tape_encryption_keys.rs to pbs_config workspace
2021-09-07 10:37:08 +02:00
Dietmar Maurer
bbdda58b35
moved key_derivation.rs from pbs_datastore to pbs-config/src/key_config.rs
...
Also moved pbs-datastore/src/crypt_config.rs to pbs-tools/src/crypt_config.rs.
We do not want to depend on pbs-api-types there, so I use [u8;32] instead of
Fingerprint.
2021-09-07 10:12:17 +02:00
Dietmar Maurer
aad2d162ab
move media_pool config to pbs_config workspace
2021-09-06 08:56:04 +02:00
Dietmar Maurer
1ce8e905ea
move drive config to pbs_config workspace
...
Also moved the tape type definitions to pbs_api_types.
2021-09-03 09:10:18 +02:00
Dietmar Maurer
6afdda8832
move remote config into pbs-config workspace
2021-09-02 14:25:15 +02:00
Dietmar Maurer
2121174827
start new pbs-config workspace
...
moved src/config/domains.rs
2021-09-02 12:58:20 +02:00
Wolfgang Bumiller
4c1b776168
another import cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-09-01 14:46:01 +02:00
Wolfgang Bumiller
6c76aa434d
split proxmox-file-restore into its own crate
...
This also moves a couple of required utilities such as
logrotate and some file descriptor methods to pbs-tools.
Note that the logrotate usage and run-dir handling should be
improved to work as a regular user as this *should* (IMHO)
be a regular unprivileged command (including running
qemu given the kvm privileges...)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-09-01 12:23:29 +02:00
Wolfgang Bumiller
b2065dc7d2
cleanup proxmox_backup::backup module
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-30 14:14:04 +02:00
Dietmar Maurer
97dfc62f0d
remote config: derive and use Updater
...
Defined a new struct RemoteConfig (without name and password). This makes it
possible to bas64-encode the pasword in the config, but still allow plain
passwords with the API.
2021-08-30 12:48:45 +02:00
Dietmar Maurer
e4a5c072b4
openid cleanup: derive and use Updater
2021-08-30 09:48:53 +02:00
Wolfgang Bumiller
a37c8d2431
use ApiType trait
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-25 10:43:58 +02:00
Dietmar Maurer
a8a20e9210
use new api updater features
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-25 10:43:58 +02:00
Dietmar Maurer
efe96ec039
tape: compute next-media-label for each tape backup job
2021-08-04 09:59:12 +02:00
Dietmar Maurer
68e77657e6
datastore config: cleanup code (use flatten attribute)
2021-07-23 12:43:33 +02:00
Dietmar Maurer
a301c362e3
add helpers to write configuration files
2021-07-20 18:54:23 +02:00
Dietmar Maurer
7526d86419
use new atomic_open_or_create_file
...
Factor out open_backup_lockfile() method to acquire locks owned by
user backup with permission 0660.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-20 18:54:23 +02:00
Wolfgang Bumiller
2b7f8dd5ea
move client to pbs-client subcrate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-19 12:58:43 +02:00
Dominik Csapak
934de1d691
config: acl: add PRIV_REALM_ALLOCATE
...
will be used for realm creation/update/deletion
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-09 15:36:54 +02:00
Wolfgang Bumiller
770a36e53a
add pbs-tools subcrate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-06 15:10:37 +02:00
Wolfgang Bumiller
85beb7d875
tree-wide: switch to using mod.rs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-06 12:04:52 +02:00
Wolfgang Bumiller
af06decd1b
split out pbs-buildcfg module
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-06 12:00:14 +02:00
Stoiko Ivanov
4d8bd03668
config: acme: make validation_delay crate public
...
we need the setting in acme::plugin.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-07-03 21:44:13 +02:00
Fabian Grünbichler
26a3450f19
openid: move helper from config to api2
...
it's not really needed in the config module, and this makes it easier to
disable the proxmox-openid dependency linkage as a stop-gap measure.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-07-03 01:52:01 +02:00
Dietmar Maurer
fda19dcc6f
fix CachedUserInfo by using a shared memory version counter
2021-06-30 08:54:30 +02:00
Dietmar Maurer
3b7b1dfb8e
api: add openid redirect/login API
2021-06-30 08:54:30 +02:00
Dietmar Maurer
d8a47ec649
cleanup user/token is_active() check
2021-06-30 08:54:30 +02:00
Dietmar Maurer
252cd3b781
implement new helper is_active_user_id()
2021-06-30 08:54:30 +02:00
Dietmar Maurer
0decd11efb
cli: add CLI to manage openid realms.
2021-06-30 08:54:30 +02:00