Fabian Grünbichler
d1fba4de1d
include privilege names in check_privs error
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-25 17:18:56 +02:00
Fabian Grünbichler
ebfcf75e14
acl: fix handling of sub-components containing '/'
...
previously with an ACL for the path "/foo/bar" without propagation and a
check for `&["foo", "bar/baz"] this code would return the ACL (roles)
for "/foo/bar" for the path "/foo/bar/baz".
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-25 17:18:56 +02:00
Thomas Lamprecht
18934ae56b
api: namespace management endpoints
...
allow to list any namespace with privileges on it and allow to create
and delete namespaces if the user has modify permissions on the parent
namespace.
Creation is only allowed if the parent NS already exists.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-12 09:33:50 +02:00
Thomas Lamprecht
c5648f1920
config: acl tree: allow path components to be paths too
...
will be used for namespaces
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-12 09:33:50 +02:00
Thomas Lamprecht
35f151e010
config: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-14 13:32:04 +02:00
Wolfgang Bumiller
ebb85c1ca3
bump proxmox-schema dependency to 1.3.1 for streaming attribute
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-13 08:20:27 +02:00
Wolfgang Bumiller
fb6e48f402
bump proxmox-router dependency to 1.2
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-13 08:17:08 +02:00
Wolfgang Bumiller
c8322f8a33
config: don't manually track padding size
...
make ConfigVersionCacheData a #[repr(C)] union to fix its
size and let it transparently `Deref{,Mut}` to its actual
contents
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-10 10:32:46 +01:00
Wolfgang Bumiller
bd4562e4b1
bump proxmox-schema dep to 1.3
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-04 09:50:21 +01:00
Thomas Lamprecht
e1f9553f2d
pbs-config: improve semi-useful comment
...
commenting that version_cache.increase_datastore_generation increases
the, well, version is rather superfluous. Also avoid the use of "we",
which is always ambiguous in code comments.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-01 09:54:39 +01:00
Dominik Csapak
118deb4db8
pbs-datastore: use ConfigVersionCache for datastore
...
instead of relying on the content of some configs
previously, we always read and parsed the config file, and only
generated a new config object when the path or the 'verify-new' option
changed.
now, we increase the datastore generation on config save, and if that
changed (or the last load is 1 minute in the past), we always
generate a new object
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-03-01 08:16:27 +01:00
Wolfgang Bumiller
229c1788c1
bump proxmox-lang dep to 1.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 14:24:24 +01:00
Fabian Grünbichler
dcf5a0f62d
misc clippy fixes
...
the trivial ones ;)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:57:16 +01:00
Fabian Grünbichler
aa174e8e8a
tree-wide: drop redundant clones
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-30 15:02:07 +01:00
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
c3b8e74fdf
bump regex dep to 1.5
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-16 11:25:02 +01:00
Wolfgang Bumiller
821aa8eae6
bump proxmox-schema to 1.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-16 11:25:02 +01:00
Dietmar Maurer
fddb9bcc3e
remove pbs-tools/src/sys.rs
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-25 09:01:29 +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
Wolfgang Bumiller
154d01b042
d/control and Cargo.toml bumps
...
* pin-utils isn't used anymore
* proxmox-sys version should also be tracked in Cargo.toml
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-22 10:56:36 +01:00
Dietmar Maurer
ca6e66aa5a
Fingerprint: add new signature method
...
commit c42a54795d
introcuded a bug by
using fp.to_string(). Replace this with fp.signature() which correctly
returns the full fingerprint instead of the short version.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-22 08:29:43 +01:00
Dietmar Maurer
6eb756bcab
sync-job: add rate limit
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-22 07:49:41 +01:00
Dietmar Maurer
5647219049
pbs-api-types: split out type RateLimitConfig
2021-11-22 07:49:41 +01:00
Dietmar Maurer
d5790a9f27
use new proxmox-sys crate
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-19 11:06:35 +01:00
Dietmar Maurer
860eaec58f
use proxmox::tools::fd::fd_change_cloexec from proxmox 0.15.3
...
Depend on proxmox 0.15.3
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-18 13:43:41 +01:00
Dietmar Maurer
10beed1199
openid: allow to configure scopes, prompt, ACRs and arbitrary username-claim values
...
- no longer set prompt to 'login' (makes auto-login possible)
- new prompt configuration
- allow arbitrary username-claim values
Depend on proxmox-openid 0.9.0.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-18 11:20:55 +01:00
Dietmar Maurer
c42a54795d
move fingerprint helpers from pbs-tools to pbs-api-types
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-17 07:07:40 +01:00
Dietmar Maurer
c4707d0c1d
depend on proxmox-shared-memory 0.1.1
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-15 11:35:52 +01:00
Dietmar Maurer
cb80ffc1de
pbs-config: use new SharedMemory helpers from proxmox-shared-memory crate
...
depend on proxmox-shared-memory crate.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-13 17:49:38 +01:00
Dietmar Maurer
485b2438ac
traffic_control: use Memcom to track. config versions
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:40 +01:00
Dietmar Maurer
bfd12e871f
Add traffic control configuration config with API
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:40 +01:00
Dominik Csapak
572e6594d2
fix typo s/CGM/GCM/i
...
only user visible change is in the error message
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-27 16:28:02 +02: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
Dietmar Maurer
b3f279e2d9
use complete_file_name from proxmox-router 1.1
2021-10-13 14:10:02 +02:00
Wolfgang Bumiller
27709b49d5
pbs-config: drop default-features on proxmox-router dep
...
we don't need the 'cli' feature in there
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-12 13:11:08 +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
Wolfgang Bumiller
e3f3359c86
bump proxmox dependency to 0.14.0 and proxmox-http to 0.5.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 11:18:22 +02:00
Dietmar Maurer
99940358e3
ExtJsFormatter: use ParameterError to correctly compute 'errors'
...
By default, 'errors' is now empty.
Depend on proxmox 0.13.5.
2021-09-28 10:19:55 +02:00
Dietmar Maurer
81867f0539
use UPID and systemd helpers from proxmox 0.13.4
2021-09-23 12:01:43 +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
Dietmar Maurer
51a2d9e375
fix refs in generated docs
2021-09-13 13:40:20 +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
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