]>
git.proxmox.com Git - proxmox-backup.git/log
Thomas Lamprecht [Wed, 27 Jan 2021 18:44:07 +0000 (19:44 +0100)]
ui: tfa: webautn: move spinning icon down to waiting message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 27 Jan 2021 18:40:12 +0000 (19:40 +0100)]
ui: tfa: make webAuthn abortable and restartable
Fix two things:
* do not reject the login promise when we get the abort DOMException
error
* safely save the original challenge string as we work on a reference
here and avoid to convert to a UInt8 array twice to avoid an
exception.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 27 Jan 2021 18:38:36 +0000 (19:38 +0100)]
ui: tfa: only immediately trigger webAuthn when its the initial tab
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 27 Jan 2021 18:38:08 +0000 (19:38 +0100)]
ui: tfa: drop bogus console.error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 27 Jan 2021 17:44:59 +0000 (18:44 +0100)]
ui: tfa: save last used TFA method and prefer it next time
simple heuristic for those people who always prefer a specific TFA
method and have the others only as backup.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dietmar Maurer [Wed, 27 Jan 2021 17:13:00 +0000 (18:13 +0100)]
fix build: commit missing file
Thomas Lamprecht [Wed, 27 Jan 2021 12:19:09 +0000 (13:19 +0100)]
ui: rework TFA prompt on login
Improve UX by avoiding the need to click some buttons twice, or
calling TOTP and Recovery codes both "OTP" codes and showing multiple
buttons, with all having the same goal "submit a TFA token" at the
same time.
Instead use a tab panel with a single submit button.
WebAuthn can and should be still improved, but that can be OK as
followup.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dietmar Maurer [Wed, 27 Jan 2021 11:40:51 +0000 (12:40 +0100)]
pmtx: implement scan command
Dietmar Maurer [Wed, 27 Jan 2021 11:38:02 +0000 (12:38 +0100)]
remove generated file synopsis.rst (no need to track in git)
Dietmar Maurer [Wed, 27 Jan 2021 11:35:28 +0000 (12:35 +0100)]
tape: use 36 byte Inquiry (recommended size)
Dietmar Maurer [Wed, 27 Jan 2021 10:31:26 +0000 (11:31 +0100)]
install pmtx binary
Dietmar Maurer [Wed, 27 Jan 2021 08:58:16 +0000 (09:58 +0100)]
cleanup: move scan changers API implementation
Dietmar Maurer [Wed, 27 Jan 2021 08:34:24 +0000 (09:34 +0100)]
tape: rename retry_command to execute_scsi_command, make retry a flag
Dietmar Maurer [Wed, 27 Jan 2021 07:59:10 +0000 (08:59 +0100)]
tape: repeat changer scsi command until successful
Dietmar Maurer [Tue, 26 Jan 2021 18:55:12 +0000 (19:55 +0100)]
sgutils2: use sg_get_asc_ascq_str to produce error messages
Dietmar Maurer [Tue, 26 Jan 2021 17:54:08 +0000 (18:54 +0100)]
sgutils2: add ASC codes from tandeberg docs
Dietmar Maurer [Tue, 26 Jan 2021 14:19:43 +0000 (15:19 +0100)]
sgutils2: further improve error messages
Dietmar Maurer [Tue, 26 Jan 2021 12:38:16 +0000 (13:38 +0100)]
sgutils2: support RequestSense Descriptor format
Dominik Csapak [Tue, 26 Jan 2021 10:49:39 +0000 (11:49 +0100)]
tape/changer/mtx: add mtx parser test
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Dominik Csapak [Mon, 25 Jan 2021 15:30:57 +0000 (16:30 +0100)]
api2/tape/changer: reorganize api
add a changer listing here (copied from api2/config/changer)
and put the status and transfer api calls below that
puts the changer scan into the top level tape api
and removes the (now redundant) info from the config api path
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Dominik Csapak [Mon, 25 Jan 2021 15:30:55 +0000 (16:30 +0100)]
tape: fix typos
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Dominik Csapak [Mon, 25 Jan 2021 15:30:54 +0000 (16:30 +0100)]
docs/tape: fix some typos and improve wording
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Dietmar Maurer [Tue, 26 Jan 2021 11:24:58 +0000 (12:24 +0100)]
sgutils2: improve error messages
Dietmar Maurer [Mon, 25 Jan 2021 16:44:28 +0000 (17:44 +0100)]
tape: add new command line tool "pmtx"
Also improve sgutil2 error reporting
Oguz Bektas [Tue, 19 Jan 2021 13:33:23 +0000 (14:33 +0100)]
ui: add missing uri encoding in user edit and view
userid parameter needs to be properly encoded when shown on the browser
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Dominik Csapak [Mon, 25 Jan 2021 11:32:29 +0000 (12:32 +0100)]
server/worker_task: improve newline handling in upid_read_status
improves upid_read_status with:
* ignore multiple newlines at the end
* remove all code that could panic (array index access)
the one place where we access with '[pos+1..]' is ok since
we explicitely test the len of the vector, this is done to
let rust optimize away the range checks, so it cannot panic
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Wolfgang Bumiller [Tue, 26 Jan 2021 09:24:14 +0000 (10:24 +0100)]
pxar: don't clone patterns unnecessarily
The options struct has no Drop handler and is passed by-move
so we can partially move out of it.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:43:00 +0000 (14:43 +0100)]
clippy: more misc fixes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:59 +0000 (14:42 +0100)]
clippy: allow api functions with many arguments
some of those can be reduced/cleaned up when we have updater support in
the api macro.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:58 +0000 (14:42 +0100)]
verify: factor out common parameters
all the verify methods pass along the following:
- task worker
- datastore
- corrupt and verified chunks
might as well pull that out into a common type, with the added bonus of
now having a single point for construction instead of copying the
default capacaties in three different modules..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:57 +0000 (14:42 +0100)]
derive/impl and use Default for some structs
and revamp HttpClientOptions with two constructors for the common use
cases
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:56 +0000 (14:42 +0100)]
authid: make Tokenname(Ref) derive Eq
it's needed to derive Hash, and we always compare Authids or their
Userid components, never just the Tokenname part anyway..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:55 +0000 (14:42 +0100)]
pxar: extract PxarExtractOptions
same as PxarCreateOptions, but for extraction/restore rather than
create.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:54 +0000 (14:42 +0100)]
pxar: factor out PxarCreateOptions
containing the CLI parameters that are mostly passed-through from the
client to our pxar archive creation wrapper in pxar::create
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:53 +0000 (14:42 +0100)]
pxar: typedef on_error as ErrorHandler
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:52 +0000 (14:42 +0100)]
client: factor out UploadOptions
to reduce function signature complexity.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:51 +0000 (14:42 +0100)]
systemd/time: extract Time/DateSpec structs
could be pulled up into CalendarEvent if desired..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:50 +0000 (14:42 +0100)]
async index reader: typedef ReadFuture
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:49 +0000 (14:42 +0100)]
allow complex Futures in tower_service impl
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:48 +0000 (14:42 +0100)]
client: refactor catalog upload spawning
by pulling out Result type into separate struct
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:47 +0000 (14:42 +0100)]
broadcast_future: refactor broadcast/future binding
into its own, private struct.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Mon, 25 Jan 2021 13:42:46 +0000 (14:42 +0100)]
report: type-alias function call tuple
to make clippy happy.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Wolfgang Bumiller [Mon, 25 Jan 2021 14:05:51 +0000 (15:05 +0100)]
tools::sgutils2: name fixup
it's not a box anymore
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 25 Jan 2021 13:54:33 +0000 (14:54 +0100)]
tools::sgutils2: use NonNull
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 25 Jan 2021 13:54:25 +0000 (14:54 +0100)]
tools::sgutils2: extern 'C' and import ordering
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 25 Jan 2021 13:48:27 +0000 (14:48 +0100)]
tools::sgutils2: don't transmute to a Box
Otherwise we run the drop handler for the scsi pt object AND
the box itself, which shouldn't even work as it should be
doing a double-free (unless the library does some kind of
reference counting in which case this should simply crash
later on?)
anyway, let's make a wrapper simply called `SgPt` containing
the pointer from `construct_scsi_pt_obj()`
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 25 Jan 2021 13:33:38 +0000 (14:33 +0100)]
tools::sgutils2: const correctness
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Mon, 25 Jan 2021 12:25:22 +0000 (13:25 +0100)]
tape: cleanup - use ScsiMediaChange trait instead of mtx_status()
Dietmar Maurer [Mon, 25 Jan 2021 09:15:59 +0000 (10:15 +0100)]
tape: add/use rust scsi changer implementation using libsgutil2
Dietmar Maurer [Mon, 25 Jan 2021 09:14:56 +0000 (10:14 +0100)]
sgutils2: add scsi_inquiry command
Fabian Grünbichler [Wed, 20 Jan 2021 16:23:55 +0000 (17:23 +0100)]
http-client: further clippy cleanups
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Wed, 20 Jan 2021 16:23:54 +0000 (17:23 +0100)]
http-client: fix typoed ticket cache condition
which was even copy-pasted once without noticing.
found with clippy.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Wed, 20 Jan 2021 16:23:53 +0000 (17:23 +0100)]
rework GC traversal error handling
the error message don't make sense with an empty default
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Wed, 20 Jan 2021 16:23:52 +0000 (17:23 +0100)]
apt: let api handle optional bool with default
one less FIXME :)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Wed, 20 Jan 2021 16:23:51 +0000 (17:23 +0100)]
clippy: rewrite ifs with identical return values
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Wed, 20 Jan 2021 16:23:50 +0000 (17:23 +0100)]
clippy: rewrite comparison chains
chunk_stream one can be collapsed, since split == split_to with at set
to buffer.len() anyway.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Wed, 20 Jan 2021 16:23:49 +0000 (17:23 +0100)]
clippy: fix Mutex with unused value
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Wed, 20 Jan 2021 16:23:48 +0000 (17:23 +0100)]
clippy: add is_empty() when len() is implemented
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Sun, 24 Jan 2021 14:19:43 +0000 (15:19 +0100)]
sgutils: allow command which does not transfer any data
Dietmar Maurer [Sun, 24 Jan 2021 13:54:30 +0000 (14:54 +0100)]
sgutils2: allow to set custom timeouts
Dietmar Maurer [Sat, 23 Jan 2021 16:34:26 +0000 (17:34 +0100)]
cleanup: avoid compiler warnings
Dietmar Maurer [Sat, 23 Jan 2021 14:34:28 +0000 (15:34 +0100)]
tape: add docu about paperkey
Dietmar Maurer [Sat, 23 Jan 2021 14:19:28 +0000 (15:19 +0100)]
tape: document hardware encryption
Dietmar Maurer [Sat, 23 Jan 2021 09:20:43 +0000 (10:20 +0100)]
tape: avoid error when clearing encryption key
Simply ignore clear request when sg_spin_data_encryption_caps fails.
Assume those are tapes without hardware encryption support.
Dylan Whyte [Tue, 19 Jan 2021 14:17:21 +0000 (15:17 +0100)]
docs: clarify that client-server communication is secure
This clarifies the fact that all communication between client and server
uses TLS for secure communication.
Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
Dietmar Maurer [Fri, 22 Jan 2021 14:53:51 +0000 (15:53 +0100)]
improve code docs in api2
Note: API methos should be declared pub, so that they show up in the generated docu.
Fabian Grünbichler [Fri, 22 Jan 2021 13:42:17 +0000 (14:42 +0100)]
d/control: bump B-D on pve-eslint
the old one does not understand www/config/TfaView.js and fails the
build..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Dietmar Maurer [Fri, 22 Jan 2021 11:01:46 +0000 (12:01 +0100)]
tape: add media pool config code docs
Dietmar Maurer [Fri, 22 Jan 2021 10:51:36 +0000 (11:51 +0100)]
tape: add drive config code docs
Dietmar Maurer [Fri, 22 Jan 2021 10:00:56 +0000 (11:00 +0100)]
fix mtx parser bug: s/strip_suffix/strip_prefix/
Dietmar Maurer [Fri, 22 Jan 2021 08:56:14 +0000 (09:56 +0100)]
tape: implement paperkey command for tape encryption keys
Dietmar Maurer [Fri, 22 Jan 2021 08:38:38 +0000 (09:38 +0100)]
paperkey: move code to src/tools/paperkey.rs
Dietmar Maurer [Fri, 22 Jan 2021 07:45:35 +0000 (08:45 +0100)]
tape: add volume-statistics api/command
Dietmar Maurer [Fri, 22 Jan 2021 07:06:25 +0000 (08:06 +0100)]
tape: add estimated medium wearout to status
Dietmar Maurer [Fri, 22 Jan 2021 06:26:42 +0000 (07:26 +0100)]
tape: set encryption key on restore
Dietmar Maurer [Thu, 21 Jan 2021 17:23:07 +0000 (18:23 +0100)]
tape: add code docs to src/config/tape_encryption_keys.rs
Dietmar Maurer [Thu, 21 Jan 2021 16:57:17 +0000 (17:57 +0100)]
renamed src/tape/sgutils2.rs -> src/tools/sgutils2.rs
Dietmar Maurer [Thu, 21 Jan 2021 16:48:07 +0000 (17:48 +0100)]
tape: move MediaCatalog magic number into struct (doc cleanup)
Dietmar Maurer [Thu, 21 Jan 2021 16:25:32 +0000 (17:25 +0100)]
tape: further hierarchy improvements
Dietmar Maurer [Thu, 21 Jan 2021 16:12:01 +0000 (17:12 +0100)]
tape: change code hierarchy to improve docs
Dietmar Maurer [Thu, 21 Jan 2021 15:38:24 +0000 (16:38 +0100)]
tape: do not export/doc low level libsgutils2 bindings
Thomas Lamprecht [Thu, 21 Jan 2021 14:09:22 +0000 (15:09 +0100)]
ui: cleanup order of declraing properties
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 21 Jan 2021 14:06:15 +0000 (15:06 +0100)]
ui: fix on-parse use of global Proxmox.UserName
This is wrong most of the time, when not loading the web interface
with valid credentials, and thus some checks or defaults did not
evaluated correctly when the underlying value was only set later.
Needs to be set on component creation only, this can be done through
initComponent, even listeners, view controllers or cbind closures.
Use the latter, as all affected components already use cbind.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dietmar Maurer [Thu, 21 Jan 2021 12:19:07 +0000 (13:19 +0100)]
tape: improve code docs
Dietmar Maurer [Thu, 21 Jan 2021 10:56:54 +0000 (11:56 +0100)]
cleanup: always compute fingerprint in KeyConfig constructors
Dietmar Maurer [Thu, 21 Jan 2021 09:56:52 +0000 (10:56 +0100)]
Merge branch 'master' of ssh://proxdev.maurer-it.com/rust/proxmox-backup
Dietmar Maurer [Thu, 21 Jan 2021 09:30:29 +0000 (10:30 +0100)]
tape: try to set encryption key with read-label command
Dietmar Maurer [Thu, 21 Jan 2021 06:46:21 +0000 (07:46 +0100)]
tape: restore_key - always update key, even if there is already an entry
Dietmar Maurer [Thu, 21 Jan 2021 06:27:43 +0000 (07:27 +0100)]
tape: fix file permissions for tape encryptiuon keys
Dietmar Maurer [Thu, 21 Jan 2021 06:23:51 +0000 (07:23 +0100)]
cleanup: remove missleading wording from code docs
Dietmar Maurer [Thu, 21 Jan 2021 06:13:56 +0000 (07:13 +0100)]
cleanup: KeyConfig::decrypt - show password hint on error
Dietmar Maurer [Wed, 20 Jan 2021 16:53:06 +0000 (17:53 +0100)]
tape: use type Uuid instead of String
Dietmar Maurer [Wed, 20 Jan 2021 16:27:01 +0000 (17:27 +0100)]
tape: use specialized encryption key per media-set
Dietmar Maurer [Wed, 20 Jan 2021 16:16:46 +0000 (17:16 +0100)]
api: add types for UUIDs
Fabian Grünbichler [Wed, 20 Jan 2021 12:31:01 +0000 (13:31 +0100)]
clippy: replace transmute with &*
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Wed, 20 Jan 2021 12:21:44 +0000 (13:21 +0100)]
clippy: remove drop(&..)
it does nothing.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Wed, 20 Jan 2021 10:38:24 +0000 (11:38 +0100)]
clippy: use is_null to check for null pointers
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Wed, 20 Jan 2021 09:50:35 +0000 (10:50 +0100)]
clippy: remove some unnecessary reference taking
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Wed, 20 Jan 2021 09:42:57 +0000 (10:42 +0100)]
clippy: fix for_kv_map
and allow it in the one case where the entry loop is intended, but the
code is not yet implemented fully.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Tue, 19 Jan 2021 14:03:04 +0000 (15:03 +0100)]
clippy: fix/allow needless_range_loop
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>