Dietmar Maurer
fd18775ac1
worker_state: move tasktype() code to src/api2/node/tasks.rs
...
Because this is API related code, and only used there.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:47:48 +02:00
Dietmar Maurer
e678a50ea1
buildsys: drop double-build hack to avoid linkage issues
...
basically a (semantic) revert of commit
991be99c37
"buildsys: workaround
linkage issues from openid/curl build server stuff separate"
This is no longer required because we moved proxmox_restore_daemon
code into extra crate (previous commit)
Originally-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
36b7085ec2
rest server: cleanup auth-log handling
...
Handle auth logs the same way as access log.
- Configure with ApiConfig
- CommandoSocket command to reload auth-logs "api-auth-log-reopen"
Inside API calls, we now access the ApiConfig using the RestEnvironment.
The openid_login api now also logs failed logins and return http_err!(UNAUTHORIZED, ..)
on failed logins.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
1b552c109d
move src/server/formatter.rs to proxmox-rest-server crate
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
8bca935f08
move src/tools/daemon.rs to proxmox-rest-server workspace
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
fd6d243843
move ApiConfig, FileLogger and CommandoSocket to proxmox-rest-server workspace
...
ApiConfig: avoid using pbs_config::backup_user()
CommandoSocket: avoid using pbs_config::backup_user()
FileLogger: avoid using pbs_config::backup_user()
- use atomic_open_or_create_file()
Auth Trait: moved definitions to proxmox-rest-server/src/lib.rs
- removed CachedUserInfo patrameter
- return user as String (not Authid)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dominik Csapak
8eef31724f
api: disks/directory: add 'name' property to list of mounts
...
so that we actually have the property that 'match_all' refers to for
the templated API path.
This is mostly for improving usage of the WIP pbs-shell, i.e., its
`ls` command, it has no other functional/semantic impact.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-15 11:59:02 +02:00
Dominik Csapak
2de1b06a06
api: disks/directory: factor out BASE_MOUNT_DIR path
...
will be reused in the next commit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-15 11:54:18 +02:00
Thomas Lamprecht
a332040a7f
api: nodes: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-15 11:42:28 +02:00
Dominik Csapak
957133077f
api2: nodes: add missing node list api call
...
to have an api call for api path traversal
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-09-15 11:32:58 +02:00
Dietmar Maurer
ccc3896ff3
avoid type re-exports
2021-09-14 08:35:43 +02:00
Dietmar Maurer
cef5c72682
move src/tape/helpers/snapshot_reader.rs to src/backup/snapshot_reader.rs
2021-09-14 07:42:06 +02:00
Dietmar Maurer
048b43af24
split tape code into new pbs_tape workspace
2021-09-13 12:54:59 +02:00
Dietmar Maurer
67a5cf4714
fix regression tests
2021-09-10 12:45:06 +02:00
Dietmar Maurer
6227654ad8
more api type cleanups: avoid re-exports
2021-09-10 12:25:32 +02:00
Dietmar Maurer
89725197c0
move PruneOptions to pbs_api_types workspace
2021-09-10 09:21:27 +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
5af3bcf062
changer config cleanup: use Updater
2021-09-08 09:29:01 +02:00
Dietmar Maurer
cdc83c4eb2
tape job cleanup: user Updater
2021-09-08 08:55:55 +02:00
Dietmar Maurer
ffa403b5fd
verify job cleanup: use Updater/flatten
2021-09-08 08:40:32 +02:00
Dietmar Maurer
5bd77f00e2
sync job cleanup: use Updater/flatten
2021-09-08 08:28:09 +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
45d5d873ce
move Kdf and KeyInfo to pbs_api_types workspace
2021-09-07 09:59:59 +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
dd2162f6bd
more import cleanups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-31 14:01:03 +02:00
Wolfgang Bumiller
86582454e8
make api2::helpers::list_dir_content a CatalogReader method
...
this is its natural place and everything required is already
part of the catalog module
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-31 11:29:17 +02:00
Wolfgang Bumiller
013b1e8bca
move some more API types
...
ArchiveEntry -> pbs-datastore
RestoreDaemonStatus -> pbs-api-types
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-31 11:29:17 +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
Wolfgang Bumiller
7b570c177d
move some API return types to pbs-api-types
...
they'll be required by the api client
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-30 11:39:01 +02:00
Dietmar Maurer
dbda1513c5
tape: media_pool: derive and use Updater
2021-08-30 11:17:14 +02:00
Dietmar Maurer
c62a6acb2e
drive config cleanup: derive and use Updater
2021-08-30 10:50:20 +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
Dominik Csapak
cffe0b81e3
tape backup: mention groups that were empty
...
otherwise a user might get a task log like this:
-----
...
found 7 groups
TASK OK
-----
which could confuse the users as why there were no snapshots backed up
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-08-09 09:28:01 +02:00
Dietmar Maurer
efe96ec039
tape: compute next-media-label for each tape backup job
2021-08-04 09:59:12 +02:00