Commit Graph

2609 Commits

Author SHA1 Message Date
Wolfgang Bumiller
c547ea07ae access-control: bump to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 14:45:52 +02:00
Wolfgang Bumiller
4197c0e26e access-control: minor code cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 14:42:43 +02:00
Wolfgang Bumiller
5daf898b14 access-control: cleanup comment in Cargo.toml
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 14:42:43 +02:00
Shannon Sterz
46d8423d72 access-control: split crate in default and impl features
this way the types defined in this crate can be re-used in places
without necessarily having to use the ACL, token shadow and
(cached) user config implementations.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-06-19 14:42:43 +02:00
Shannon Sterz
1dc88b5e3c access-control: move to flatten User into UserWithToken
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-06-19 14:42:41 +02:00
Shannon Sterz
48bd72763f access-control: increment user cache generation when saving acl config
since `CachedUserInfo` takes care of both, the user config and the acl
config, we need to also bump the cache generation when storing the
acl config.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-06-19 14:42:39 +02:00
Shannon Sterz
84537a02b1 access-control: factor out user config handling
this commit factors out the user config. it also add two new functions
to the `AccessControlConfig` trait to handle caching in a more
generalized way.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-06-19 13:38:56 +02:00
Shannon Sterz
ed6a17cec9 access-control: make token shadow implementation re-usable
this commit factors out the token shadow implementation from
`proxmox-backup` so it can be used in other products.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-06-19 13:38:54 +02:00
Shannon Sterz
47eeecf711 access-control: define User, UserWithTokens and ApiTokens types
these types are used by the user config in `proxmox-backup` server.
this commit factors them out so we can re-use them in other products
as well as this crate.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-06-19 13:38:52 +02:00
Shannon Sterz
86ffeef24a access-control: add the proxmox-access crate to reuse acl trees
this commit factors out the acl tree from proxmox-backup so we can
re-use it accross other products. to use it, the product needs to
implement the `AcmConfig` trait and provide this crate with a
location to safe its configuration files.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-06-19 13:38:50 +02:00
Wolfgang Bumiller
c336cb9ab7 io: bump to 1.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 12:21:43 +02:00
Wolfgang Bumiller
74ecd47421 lang: bump to 1.2.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 12:20:57 +02:00
Wolfgang Bumiller
36032b892b time-api: bump to 0.1.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 12:14:04 +02:00
Wolfgang Bumiller
dfa1c0ce39 network-api: bump to 0.1.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 12:13:08 +02:00
Wolfgang Bumiller
ef7d4c6155 dns-api: bump to 0.1.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 12:11:43 +02:00
Wolfgang Bumiller
90f954005a auth-api: bump to 0.4.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 12:10:41 +02:00
Wolfgang Bumiller
a0c1369000 acme-api: bump to 0.1.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 12:08:04 +02:00
Wolfgang Bumiller
e2cd917394 product-config: bump to 0.2.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 12:07:37 +02:00
Wolfgang Bumiller
cf5efb5c0a cleanup use statements
much more merge friendly this way...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 11:52:39 +02:00
Wolfgang Bumiller
e20cdbf8e2 router: bump to 2.1.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 11:33:02 +02:00
Wolfgang Bumiller
29b55dbcb3 router: make regex dep optional
It's only used in cli code.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 10:26:20 +02:00
Gabriel Goller
e4afb0fe20 router: cli: add confirmation helper
Add confirmation helper that outputs a prompt and lets the user
confirm or deny it.
Implemented to close #4763.

Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2024-06-19 10:26:20 +02:00
Gabriel Goller
8240e5022f router: cli: print fatal errors including causes
as a first step of improving our error handling story, printing context
and causes if the error contains them.

The downside to adding context is that the default Display implementation
will *just* print the context, which hides the root cause. This is why
we print the errors using the pretty-print formatter in this change.

Originally-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
[WB: prefix commit message with crate]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-19 10:15:51 +02:00
Wolfgang Bumiller
5295da1b8a sys: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-17 14:10:56 +02:00
Wolfgang Bumiller
245d1ec2c1 sys: bmp to 0.5.6-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-17 14:09:19 +02:00
Dietmar Maurer
b25edb67de sys: use anyhow Error type for create_dir, and improve error messages
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-06-13 11:51:44 +02:00
Dietmar Maurer
86898b9a59 Revert "sys: cleanup, remove unnecessary crate prefix"
This reverts commit 26922d1796, because
it is necessary.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-06-13 11:51:44 +02:00
Wolfgang Bumiller
e5c8d70324 auth-api: add PasswordAuthenticator
This is the PbsAuthenticator with the hardcoded shadow.json/lock
configurable.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-13 11:14:36 +02:00
Wolfgang Bumiller
c12bbf6241 product-config: add open_secret_lockfile
We need this for things like shadow.json.lock.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-13 11:14:36 +02:00
Dietmar Maurer
26922d1796 sys: cleanup, remove unnecessary crate prefix
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-06-13 10:20:18 +02:00
Dietmar Maurer
0b17987c67 acme-api: show all certificate subject_alt_names (DNS, IP, EMAIL, URI)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-06-11 14:24:23 +02:00
Wolfgang Bumiller
2c2475da5e simple-config: bump to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-07 11:06:08 +02:00
Dietmar Maurer
7e4121d26e acme-api: add function to extract certificate data from .pem data
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-06-06 14:07:43 +02:00
Dietmar Maurer
fcaa4f6758 acme-api: implement funtion to create self signed certificates
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-06-06 14:07:43 +02:00
Fabian Grünbichler
f7a22604ae apt: update d/control
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-06 11:40:49 +02:00
Fabian Grünbichler
818ddf1283 bump proxmox-apt to 0.10.10-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-06 11:40:49 +02:00
Fabian Grünbichler
4126a83e05 apt: fix test output dir
under autopkgtest, the rundir is not writable, but cargo gives us a tmpdir that
we can use in all cases.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-06 11:40:49 +02:00
Fabian Grünbichler
6f532dfb7d various clippy fixes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-06 11:40:49 +02:00
Dietmar Maurer
7a8e948ee7 acme-api: pass parameters by reference
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-06-06 11:09:56 +02:00
Fiona Ebner
2c2497e5be fix #5513: apt: do not assume that sources.list file exists
Some users might want to switch to using only the newer .sources files
already, which Debian is going to switch to in the long run.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-06-06 11:06:41 +02:00
Dietmar Maurer
04505ada7a acme-api: implement revoke certificate helper
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-06-06 10:23:35 +02:00
Dietmar Maurer
53ff71772f simple-config: new crate to read/write proxmox simple text config files
Copied from proxmox-backup/src/tools/config.rs

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-06-06 10:16:28 +02:00
Fabian Grünbichler
a17430b38f run cargo fmt
(again)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-05 13:31:06 +02:00
Wolfgang Bumiller
7ab17e262c acme-api: bump to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-05 12:12:52 +02:00
Wolfgang Bumiller
3787764db7 time-api: bump version to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-05 11:28:59 +02:00
Wolfgang Bumiller
c3d9d21308 syslog-api: bump to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-05 11:28:10 +02:00
Wolfgang Bumiller
af75a203da network-api: bump to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-05 11:27:30 +02:00
Wolfgang Bumiller
3eea0fd8ce dns-api: bump to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-05 11:27:16 +02:00
Wolfgang Bumiller
1a0b39710c product-config: bump to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-05 11:27:16 +02:00
Wolfgang Bumiller
053bb3d3d3 config-digest: bump to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-05 11:24:38 +02:00