Wolfgang Bumiller
e96464c795
d/control bump
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 12:09:19 +01:00
Wolfgang Bumiller
ad0ed40a59
api: return "invalid" as CSRF token for partial tickets
...
So that old clients don't `unwrap` a `None` value.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:13 +01:00
Wolfgang Bumiller
63fd8e58b2
gui: masks for: adding recovery and removals
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:13 +01:00
Wolfgang Bumiller
758a827c2d
gui: add load mask during webauthn api calls
...
so that if we run into the 3s delay due to the wrong
password the window is properly masked
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:13 +01:00
Wolfgang Bumiller
7ad33e8052
tfa: use UNAUTHORIZED http status in password check
...
to trigger our 3s delay in the rest handler
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:13 +01:00
Wolfgang Bumiller
abfe0c0e70
tfa: fixup for challenge file split
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:13 +01:00
Wolfgang Bumiller
f22dfb5ece
tfa: remove tfa user when a user is deleted
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:10 +01:00
Wolfgang Bumiller
4bda51688b
tfa: improve user existence check
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:03 +01:00
Wolfgang Bumiller
eab25e2f33
tfa: allow deletion of entries of non-existent users
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:03 +01:00
Wolfgang Bumiller
94bd11bae2
typo fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:03 +01:00
Wolfgang Bumiller
759af9f00c
tfa api: return types and 'pub' structs/methods
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:03 +01:00
Wolfgang Bumiller
f58e5132aa
tfa: entry access/iteration cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:03 +01:00
Wolfgang Bumiller
d831846706
tfa: r#type parameter name
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:03 +01:00
Wolfgang Bumiller
1fc9ac0433
tfa: _entry api method name suffix consistency
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:23:03 +01:00
Wolfgang Bumiller
5c48d0af1f
tfa gui: fix adding recovery keys as user
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:22:32 +01:00
Wolfgang Bumiller
30fb19be35
tfa view: html-escape description text
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:22:32 +01:00
Wolfgang Bumiller
fbeac4ea28
gui: tfa support
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:22:32 +01:00
Wolfgang Bumiller
7f066a9b21
proxy: expose qrcodejs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:22:32 +01:00
Wolfgang Bumiller
c5a767cd1d
depend on libjs-qrcodejs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:22:32 +01:00
Wolfgang Bumiller
027ef213aa
api: tfa management and login
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:22:32 +01:00
Wolfgang Bumiller
dc1fdd6267
config: add tfa configuration
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:22:32 +01:00
Wolfgang Bumiller
96918252e5
buildcfg: add rundir helper macro
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:22:32 +01:00
Wolfgang Bumiller
014dc5f9d7
tools: add create_run_dir helper
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:22:32 +01:00
Wolfgang Bumiller
59e94227af
add tools::serde_filter submodule
...
can be used to perform filtering at parse time
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-01-11 10:22:32 +01:00
Wolfgang Bumiller and Dietmar Maurer
eb5e3420ae
tests: verify-api: check AllOf schemas
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-12-22 07:31:38 +01:00
Wolfgang Bumiller and Dietmar Maurer
b2362a1207
adaptions for proxmox 0.9 and proxmox-api-macro 0.3
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-12-22 07:31:05 +01:00
Wolfgang Bumiller
9b93c62044
remove unused descriptions from api macros
...
these are now a hard error in the api macro
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-12-09 10:55:18 +01:00
Wolfgang Bumiller
2241c6795f
d/control bump
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 14:28:02 +01:00
Wolfgang Bumiller
43e60ceb41
file logger: remove test.log after test as well
...
and a doc formatting fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 14:13:21 +01:00
Wolfgang Bumiller
b760d8a23f
derive PartialEq for Userid
...
the manual implementation is equivalent
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 14:10:17 +01:00
Wolfgang Bumiller
2c1592263d
tiny clippy hint
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 14:03:43 +01:00
Wolfgang Bumiller
616533823c
don't enforce Vec and String in tools::join
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 13:56:59 +01:00
Wolfgang Bumiller
913dddea85
minor cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 13:56:21 +01:00
Wolfgang Bumiller
3530430365
tools avoid unnecessary copying of parameters/properties
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 13:53:49 +01:00
Wolfgang Bumiller
a4ba60be8f
minor cleanups
...
whitespace, formatting and superfluous lifetime annotations
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 13:47:31 +01:00
Wolfgang Bumiller
99e98f605c
network helpers: fix fd leak in get_network_interfaces
...
This one always leaked.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 11:25:53 +01:00
Wolfgang Bumiller
935ee97b17
use fd_change_cloexec helper
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 11:25:53 +01:00
Wolfgang Bumiller
6b9bfd7fe9
minor cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 11:25:53 +01:00
Wolfgang Bumiller
dd519bbad1
pxar: stricter file descriptor guards
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 11:25:53 +01:00
Wolfgang Bumiller
35fe981c7d
client: use tools::pipe instead of nix
...
nix::unistd::pipe returns unguarded RawFds which should be
avoided
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 11:25:53 +01:00
Wolfgang Bumiller
b6570abe79
changes for proxmox 0.8
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 11:25:53 +01:00
Wolfgang Bumiller
54813c650e
bump proxmox dep to 0.8.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-30 11:25:53 +01:00
Wolfgang Bumiller
fb01fd3af6
visibility cleanups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-12 11:53:50 +01:00
Wolfgang Bumiller
b649887e9a
remove unused function
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-12 11:15:15 +01:00
Wolfgang Bumiller
97030c9407
cleanup clippy leftovers
...
this used to contain a pointer cast, now it doesn't
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-12 09:43:38 +01:00
Wolfgang Bumiller
5d1d0f5d6c
use pin-project to remove more unsafe blocks
...
we already have it in our dependency tree, so use it
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-12 09:43:38 +01:00
Wolfgang Bumiller
a86e703661
tools::runtime: pin_mut instead of unsafe block
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-10 14:18:45 +01:00
Wolfgang Bumiller
1ecf4e6d20
async_io: require Unpin for EitherStream and HyperAccept
...
We use it with Unpin types and this way we get rid of a lot
of `unsafe` blocks.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-10 14:18:45 +01:00
Wolfgang Bumiller
5d08c750ef
HttpsConnector: include destination on connect errors
...
for more useful log output
old:
Nov 10 11:50:51 foo pvestatd[3378]: proxmox-backup-client failed: Error: error trying to connect: tcp connect error: No route to host (os error 113)
new:
Nov 10 11:55:21 foo pvestatd[3378]: proxmox-backup-client failed: Error: error trying to connect: error connecting to https://thebackuphost:8007/ - tcp connect error: No route to host (os error 113)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-10 11:58:19 +01:00
Wolfgang Bumiller
f3fde36beb
client: error context when building HttpClient
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-10 11:58:19 +01:00
Wolfgang Bumiller
47208b4147
pxar: log when skipping mount points
...
Clippy complains about the number of paramters we have for
create_archive and it really does need to be made somewhat
less awkward and more usable. For now we just log to stderr
as we previously did. Added todo-comments for this.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-09 12:43:16 +01:00
Wolfgang Bumiller
b59c308219
Vec::new is Vec's default default
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-06 14:55:34 +01:00
Wolfgang Bumiller
e144810d73
pxar: more concise EOF handling
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-11-05 10:32:48 +01:00
Wolfgang Bumiller
abe1edfc95
update d/control
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-30 16:11:50 +01:00
Wolfgang Bumiller
e4a864bd21
impl From<Authid> for Userid
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-30 15:19:07 +01:00
Wolfgang Bumiller
7a7368ee08
bump proxmox dependency to 0.7.0 for totp udpates
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-30 15:19:07 +01:00
Wolfgang Bumiller
906ef6c5bd
api2/access/user: fix return type schema
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-29 15:20:10 +01:00
Wolfgang Bumiller
ea1853a17b
api2/access/user: drop Option, treat empty Vec as None
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-29 15:17:54 +01:00
Wolfgang Bumiller
221177ba41
fixup hardcoded paths
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-29 15:15:17 +01:00
Wolfgang Bumiller
e10c5c74f6
bump proxmox dependency to 0.6.0 for api tokens and tfa
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-29 15:11:39 +01:00
Wolfgang Bumiller
53a561a222
pass params by ref to recurse_files
...
gets rid of the return value and moving around of the zip
and decoder data
avoids cloning the path prefix on every recursion
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-21 10:50:25 +02:00
Wolfgang Bumiller
e832860a3c
whitespace fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-21 10:45:44 +02:00
Wolfgang Bumiller
41255b4d95
bump proxmox dependency to 0.5.0 for nix 0.19
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-19 12:35:03 +02:00
Wolfgang Bumiller
8d841f81ee
pxar: anchor pxarexcludes starting with a slash
...
Given the .pxarexclude file
foo
/bar
The following happens:
exclude: /foo
exclude: /bar
exclude: /subdir/foo
include: /subdir/bar
since the `/bar` line is an absolute path
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-15 12:28:31 +02:00
Wolfgang Bumiller
32a4695c46
pxar: fix relative '!' rules in .pxarexclude
...
and reduce indentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-15 12:18:34 +02:00
Wolfgang Bumiller
2081327428
more clippy lints
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-15 12:18:34 +02:00
Wolfgang Bumiller
61c6eafc08
AsyncIndexReader: avoid memcpy, add clippy lint fixup comment
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-14 14:10:28 +02:00
Wolfgang Bumiller
8db1468952
more clippy fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-14 13:58:35 +02:00
Wolfgang Bumiller
254ec19412
pxar: remove unused parameter
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-14 11:32:22 +02:00
Wolfgang Bumiller
97bbd1bf9e
pxar: pass full path to callback, let verbose flag list files
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-14 11:31:42 +02:00
Wolfgang Bumiller
54aec2fa8b
clippy fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-14 11:20:07 +02:00
Wolfgang Bumiller
f6b1d1cc66
don't require WorkerTask in backup/
...
To untangle the server code from the actual backup
implementation.
It would be ideal if the whole backup/ dir could become its
own crate with minimal dependencies, certainly without
depending on the actual api server. That would then also be
used more easily to create forensic tools for all the data
file types we have in the backup repositories.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-12 14:11:57 +02:00
Wolfgang Bumiller
d1993187b6
introduce TaskState trait
...
Used to not require access to the WorkerTask struct outside
the `server` and `api2` module, so it'll be easier to
separate those backup/server/client parts into separate
crates.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-10-12 14:11:57 +02:00
Wolfgang Bumiller
ee1a9c3230
parallel_handler: clippy: 'while_let_loop'
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-09-29 08:13:51 +02:00
Wolfgang Bumiller
db24c01106
parallel_handler: explicit Arc::clone
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-09-28 13:40:03 +02:00
Wolfgang Bumiller
ae3cfa8f0d
parallel_handler: formatting cleanup, doc comment typo fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-09-28 13:40:03 +02:00
Wolfgang Bumiller
6fd129844d
remove DummyCatalogWriter
...
we're using an `Option` instead now
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-09-24 09:13:54 +02:00
Wolfgang Bumiller
9bdeecaee4
bump pxar dep to 0.6.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-27 12:16:21 +02:00
Wolfgang Bumiller
1b32750644
update d/control for pxar 0.5.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-25 12:37:11 +02:00
Wolfgang Bumiller
5aa103c3c3
bump pxar dep to 0.5.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-25 12:37:11 +02:00
Wolfgang Bumiller
82b7adf90b
bump pxar dep to 0.4.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-24 11:56:01 +02:00
Wolfgang Bumiller and Dietmar Maurer
11e1e27a42
turn UPID into an API type
...
It's a string-type.
Implement Serialize via Display, Deserialize via FromStr and
add an API_SCHEMA so that it can be used as a type within
the #[api] macro.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-18 11:54:30 +02:00
Wolfgang Bumiller
4ea831bfa1
style fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-18 08:50:14 +02:00
Wolfgang Bumiller
c1d7d708d4
remove map_struct helper
...
if we ever need this it should be marked as unsafe!
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-17 11:53:02 +02:00
Wolfgang Bumiller
3fa2b983c1
add methods to allocate a DynamicIndexHeader
...
to avoid `map_struct` which is actually unsafe because it
does not verify alignment constraints at all
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-17 11:50:32 +02:00
Wolfgang Bumiller
df30017ff8
remove unused import
...
rustc doesn't warn about this kind of import, however,
clippy does
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-13 09:05:15 +02:00
Wolfgang Bumiller
3f3ae19d63
formatting fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-12 14:30:03 +02:00
Wolfgang Bumiller
72dc68323c
replace and remove old ticket functions
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-12 14:28:21 +02:00
Wolfgang Bumiller
593f917742
introduce Ticket struct
...
and add tests and compatibility tests
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-12 14:28:21 +02:00
Wolfgang Bumiller
5d30f03826
impl PartialEq between Realm and RealmRef
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-10 12:23:36 +02:00
Wolfgang Bumiller
14263ef989
assert that Username does not impl PartialEq
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-10 12:21:12 +02:00
Wolfgang Bumiller
e7cb4dc50d
introduce Username, Realm and Userid api types
...
and begin splitting up types.rs as it has grown quite large
already
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-10 12:05:01 +02:00
Wolfgang Bumiller
27d864210a
d/control: proxmox 0.3.3
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-10 12:05:01 +02:00
Wolfgang Bumiller
f667f49dab
bump proxmox dependency to 0.3.3 for serde helpers
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-10 11:32:01 +02:00
Wolfgang Bumiller
866c556faf
move types.rs to types/mod.rs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-10 10:32:31 +02:00
Wolfgang Bumiller
90d515c97d
config.rs: sort modules
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-10 08:33:38 +02:00
Wolfgang Bumiller
df7f04364b
d/control: bump proxmox to 0.3.2
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-04 11:34:58 +02:00
Wolfgang Bumiller
98c259b4c1
remove timer and lock functions, fix building with proxmox 0.3.2
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-04 11:33:02 +02:00
Wolfgang Bumiller
799b3d88bc
bump proxmox dependency to 0.3.2 for timer / file locking
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-04 11:27:44 +02:00
Wolfgang Bumiller
0f9218079a
pxar/extract: fixup path stack for errors
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-08-03 12:20:30 +02:00