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
58bfa3b19c
remove dead code
...
backup_user() and backup_group() are now in pbs_config workspace
2021-09-08 06:34:44 +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
ed2080762c
move data_blob encode/decode from crypt_config.rs to data_blob.rs
2021-09-07 10:00:05 +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
ccb3b45e18
add missing file pbs-api-types/src/remote.rs
2021-09-02 17:36:13 +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
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
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
Dietmar Maurer and Wolfgang Bumiller
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
9789461363
bump version to 2.0-9-1
2021-08-09 09:54:33 +02:00
Dietmar Maurer
bb14ed8cab
cleanup: simplify next_expired_media()
2021-08-04 11:01:18 +02:00
Dietmar Maurer
023adb5945
ui: display next-media-label for tape backup jobs
2021-08-04 09:59:12 +02:00
Dietmar Maurer
e5545c9804
cli: proxmox-tape backup-job list: use status api and display next-run an d next-media-label
2021-08-04 09:59:12 +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
1d3ae83359
tape: media_pool: implement guess_next_writable_media()
2021-08-04 09:59:12 +02:00
Dietmar Maurer
e16c289f50
bump version toö 2.0.8-1
2021-08-02 10:35:16 +02:00
Dietmar Maurer
5ad40a3dd1
tape: media_catalog: add snapshot list cache for catalog
...
For some parts of the ui, we only need the snapshot list from the catalog,
and reading the whole catalog (can be multiple hundred MiB) is not
really necessary.
Instead, we write the list of snapshots into a seperate .index file. This file
is generated on demand and is much smaller and thus faster to read.
2021-07-29 13:34:31 +02:00
Dietmar Maurer
7116a2d9da
tape: lock media_catalog file to to get a consistent view with load_catalog
2021-07-29 13:34:25 +02:00
Dietmar Maurer
0d5e990a62
cleanup: factor out tape catalog path helpers
2021-07-29 13:34:18 +02:00
Dietmar Maurer
68e77657e6
datastore config: cleanup code (use flatten attribute)
2021-07-23 12:43:33 +02:00
Dietmar Maurer and Thomas Lamprecht
99a73fad15
doc: Document new environment variabless to specify secret values
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com >
2021-07-22 10:10:40 +02:00
Dietmar Maurer and Thomas Lamprecht
16a01c19dd
support new ENV vars to get secret values through a file or a command
...
We want to allow passing a secret not only directly through the
environment value, but also indirectly through a file path, an open
file descriptor or a command that can write it to standard out.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com >
2021-07-22 10:09:53 +02:00
Dietmar Maurer and Thomas Lamprecht
ac81ed17b9
fix regression test file permission problems
...
By simply using the current user/group instead of backup:backup
2021-07-21 09:30:22 +02:00
Dietmar Maurer and Thomas Lamprecht
a301c362e3
add helpers to write configuration files
2021-07-20 18:54:23 +02:00
Dietmar Maurer and Thomas Lamprecht
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
Dietmar Maurer
bfd357c5a1
depend on proxmox 0.11.6 (changed make_tmp_file() return type)
2021-07-14 13:37:26 +02:00
Dietmar Maurer
9ee4c23833
tape: changer: sg_pt: always retry until timeout
2021-07-13 10:39:28 +02:00
Dietmar Maurer and Thomas Lamprecht
a0cd0f9cec
change tape drive lock path
...
New kernel has stricter checks on tmpfs with stick-bit on directories, so some
commands (i.e. proxmox-tape changer status) fails when executed as root, because
permission checks fails when locking the drive.
This patch move the drive locks to /run/proxmox-backup/drive-lock.
Note: This is incompatible to old locking mechmanism, so users may not
run tape backups during update (or running backup can fail).
2021-07-12 17:26:49 +02:00
Dietmar Maurer
414be8b675
tape: fix LTO locate_file for HP drives
...
Add test code to the first locate_file command, compute locate_offset.
Subsequent locate_file commands use that offset.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com >
2021-06-30 09:08:58 +02:00
Dietmar Maurer
fda19dcc6f
fix CachedUserInfo by using a shared memory version counter
2021-06-30 08:54:30 +02:00
Dietmar Maurer
cd975e5787
ui: implement OpenId login
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
Dietmar Maurer
b84d2592fb
add API to manage openid realms
2021-06-30 08:54:30 +02:00
Dietmar Maurer
0219ba2cc5
check_acl_path: add /access/domains and /access/openid
2021-06-30 08:54:30 +02:00
Dietmar Maurer
bbff6c4968
config: new domains.cfg to configure openid realm
...
Or other realmy types...
2021-06-30 08:54:30 +02:00
Dietmar Maurer
bb88c6a29d
depend on proxmox-openid-rs
2021-06-30 08:54:30 +02:00
Dietmar Maurer
2165f0d450
api: define and use REALM_ID_SCHEMA
2021-06-10 11:10:00 +02:00
Dietmar Maurer
b90036dadd
cleanup: factor out config::datastore::lock_config()
2021-06-04 09:04:14 +02:00
Dietmar Maurer
e8b32f2d87
bump version to 1.1.9-1
2021-06-01 08:27:18 +02:00
Dietmar Maurer
0bca966ec5
fix typo: s/dies/does/
2021-05-31 11:01:15 +02:00
Dietmar Maurer
440472cb32
correctly set apt proxy configuration
2021-05-12 12:19:24 +02:00
Dietmar Maurer and Thomas Lamprecht
4ce7da516d
reload cert inside command socket handler
2021-05-12 12:03:27 +02:00
Dietmar Maurer
137309cc4e
bump version to 1.1.7-1
2021-05-11 13:23:29 +02:00
Dietmar Maurer
1bff50afea
tape locate_file: fix off by one error
2021-05-11 12:37:04 +02:00
Dietmar Maurer
2732c47466
cleanup src/api2/node/config.rs
...
- add return type
- fix permissions
- fix descriptions
2021-05-10 08:25:43 +02:00
Dietmar Maurer
0466089316
move api related type/regx definition from backup_info.rs to src/api2/types/mod.rs
2021-05-07 12:45:44 +02:00
Dietmar Maurer
d8769d659e
use build.rs to pass REPOID to rustc-env
2021-05-07 10:11:39 +02:00
Dietmar Maurer
3e234af16e
tape: improve inline docs for READ POSITION LONG
2021-05-06 11:45:40 +02:00
Dietmar Maurer
bbbf662d20
tape: use LOCATE(16) SCSI command
...
Turns out this works on LTO4 and newer.
2021-05-06 10:51:59 +02:00
Dietmar Maurer
78bf292343
call create_run_dir() at daemon startup
2021-05-06 10:23:54 +02:00
Dietmar Maurer
e5ef69ecf7
cleanup: split SimpleHttp client into extra file
2021-05-06 10:22:24 +02:00
Dietmar Maurer
e0ba5553be
http proxy: add necessary brackets for IPv6 proxy
2021-05-05 11:57:04 +02:00
Dietmar Maurer
a2daecc25d
client/http_client: add necessary brackets
...
if we are given a 'naked' ipv6 without square brackets around it,
we need to add them ourselves, since the address is ambigious otherwise
when we add the port.
e.g. giving 'fe80::1' as address we arrive at the url (with the default port)
'https://fe80::1:8007/ '
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com >
2021-05-05 10:30:39 +02:00
Dietmar Maurer
4cba875379
bump version to 1.1.6-2
2021-05-04 12:25:16 +02:00
Dietmar Maurer
7ab4382476
update debian/control
2021-05-04 12:24:16 +02:00
Dietmar Maurer
686173dc2a
bump version to 1.1.6-1
2021-05-04 12:09:56 +02:00
Dietmar Maurer
39c5db7f0f
move basic ACME types into src/api2/types/acme.rs
...
And rename AccountName into AcmeAccountName.
2021-05-04 11:32:18 +02:00
Dietmar Maurer
603aa09d54
tape restore: do not verify restored files
...
Because this is too slow and causes the tape motor to stop. Instead,
remove the verify_state from the manifest.
2021-05-04 11:05:32 +02:00
Dietmar Maurer
88aa3076f0
tape restore: add restore speed to logs
2021-05-04 11:05:32 +02:00
Dietmar Maurer
5400fe171c
tape restore: write datastore in separate thread
2021-05-04 11:05:32 +02:00
Dietmar Maurer
87bf9f569f
tape restore: split restore_chunk_archive
...
Split out a separate function scan_chunk_archive() for catalog restores.
Note: Required, because we need to optimize restore_chunk_archive() to
write datastore in separate threads (else thape drive will stop during restore)
2021-05-04 11:05:32 +02:00
Dietmar Maurer
426847e1ce
node config cleanups
2021-05-04 09:29:31 +02:00
Dietmar Maurer
73c607497e
cleanup acme client
2021-05-04 09:28:53 +02:00
Dietmar Maurer
c0147e49c4
tools/http: make user agent configurable
2021-04-28 12:15:26 +02:00
Dietmar Maurer
d52b120905
tools/http: set USER_AGENT inside request
2021-04-28 12:15:26 +02:00
Dietmar Maurer
467bd01cdf
api: add schema for http proxy configuration - HTTP_PROXY_SCHEMA
2021-04-28 11:23:06 +02:00
Dietmar Maurer
7a7fcb4715
http: add helper to parse proxy configuration
2021-04-28 11:23:06 +02:00
Dietmar Maurer
cf8e44bc30
HttpsConnector: add proxy authorization support
2021-04-28 11:23:06 +02:00
Dietmar Maurer
aac424674c
bump version to 1.1.5-1
2021-04-27 12:21:08 +02:00
Dietmar Maurer
12509a6d9e
tape: improve inline docs
2021-04-27 11:37:03 +02:00
Dietmar Maurer
5e169f387c
tape: add read_medium_configuration_page() to detect WORM media
...
And use it inside format_media().
2021-04-27 11:37:03 +02:00
Dietmar Maurer
73cef112eb
tape: remove MediumType struct, which is only valid on IBM drives
...
HP drives do not return this information.
Note: This breaks format on WORM media, because we have not way
to detect WOREM media (how?).
2021-04-27 09:58:27 +02:00
Dietmar Maurer
1ed9069ad3
http proxy: improve response parser
...
Avoid strange error message in case of connect error (only parse status + headers).
We are not interested in the response body, so simply ignore it.
2021-04-26 11:21:11 +02:00
Dietmar Maurer
8e898895cc
tape: do not query density_code in SgTape::new()
...
Because this can fail with NoSense/MediumChanged and other informational
Sense codes.
2021-04-23 09:56:44 +02:00
Dietmar Maurer
4be6beab6f
tape: format_media - implement special case for WORM media
2021-04-23 08:33:13 +02:00
Dietmar Maurer
a3b4b5b50e
tape: define and use MediumType enum
2021-04-23 07:54:42 +02:00
Dietmar Maurer
33b8d7e5e8
tape: use loaded media_type in format_media (instead of drive_density)
...
Required to format LTO4 media loaded in LTO5 drive).
Also contains some SCSI code cleanups.
2021-04-23 07:27:30 +02:00
Dietmar Maurer
b9e0fcbdcd
tape: implement report_desnity
2021-04-22 13:54:31 +02:00
Dietmar Maurer
a7188b3a75
tape: fix FORMAT for LTO-4 drives
...
FORMAT requires LTO-5 or newer, so we do a rewind/erase if FORMAT fails.
2021-04-22 11:44:49 +02:00
Dietmar Maurer
b6c06dce9d
http proxy: implement read_connect_response()
...
Limit memory usage in case we get strange data from proxy.
2021-04-22 10:06:14 +02:00