]> git.proxmox.com Git - proxmox.git/log
proxmox.git
17 months agobump proxmox-shared-memory to 0.3.0-1
Wolfgang Bumiller [Tue, 23 May 2023 09:50:11 +0000 (11:50 +0200)]
bump proxmox-shared-memory to 0.3.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agobump proxmox-compression to 0.2.0-1
Wolfgang Bumiller [Tue, 23 May 2023 09:47:09 +0000 (11:47 +0200)]
bump proxmox-compression to 0.2.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agobump proxmox-sys to 0.5.0-1
Wolfgang Bumiller [Tue, 23 May 2023 09:31:19 +0000 (11:31 +0200)]
bump proxmox-sys to 0.5.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agomake upload: bump dist to bookworm
Wolfgang Bumiller [Tue, 23 May 2023 09:27:56 +0000 (11:27 +0200)]
make upload: bump dist to bookworm

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agoupdate zstd 0.6 -> 0.12 for bookworm
Wolfgang Bumiller [Tue, 23 May 2023 08:40:06 +0000 (10:40 +0200)]
update zstd 0.6 -> 0.12 for bookworm

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agoupdate d/copyright files to debian copyright-format 1.0
Wolfgang Bumiller [Tue, 23 May 2023 10:48:02 +0000 (12:48 +0200)]
update d/copyright files to debian copyright-format 1.0

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agobuildsys: improve clean target
Wolfgang Bumiller [Tue, 23 May 2023 08:46:08 +0000 (10:46 +0200)]
buildsys: improve clean target

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agobuildsys: add dsc and %-dsc targets
Wolfgang Bumiller [Tue, 23 May 2023 08:44:18 +0000 (10:44 +0200)]
buildsys: add dsc and %-dsc targets

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agobump proxmox-tfa to 4.0.0-1, auth-api to 0.1.1-1
Wolfgang Bumiller [Thu, 20 Apr 2023 07:39:29 +0000 (09:39 +0200)]
bump proxmox-tfa to 4.0.0-1, auth-api to 0.1.1-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agoauth-api: update to new tfa crate
Wolfgang Bumiller [Wed, 10 May 2023 08:43:13 +0000 (10:43 +0200)]
auth-api: update to new tfa crate

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agotfa: add functions to unlock totp and tfa
Wolfgang Bumiller [Fri, 5 May 2023 07:22:01 +0000 (09:22 +0200)]
tfa: add functions to unlock totp and tfa

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agotfa: log all tfa verify errors and treat as failure, count
Wolfgang Bumiller [Tue, 25 Apr 2023 07:37:11 +0000 (09:37 +0200)]
tfa: log all tfa verify errors and treat as failure, count

Use a custom result type to return success/failure and the
need to save the user data to the caller, while having
logged the error messages rather than returning them.

We count general TFA failures and also TOTP specifically,
and lock the user out of their 2nd factors on too many
failures.

To this end, all errors are now treated as failures.
While technically we can have crypto errors the user might
not be able to cause, we can't always know, and not all
errors are guaranteed to be a host side configuration issue,
so instead, all errors (since they are rare) now now counted
as a regular TFA error.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agotfa: add data for rate limiting and blocking
Wolfgang Bumiller [Thu, 20 Apr 2023 14:08:00 +0000 (16:08 +0200)]
tfa: add data for rate limiting and blocking

TfaUserData uses `#[serde(deny_unknown_fields)]`, so we add
this now, but using it will require explicitly enabling it.

If the TOTP count is high, the user should be locked out of
TOTP entirely until they use a recovery key to reset the
count.

If a user's TFA try count is too high, they should get rate
limited.

In both cases they should receive some kind of notification.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agotfa: make 'anyhow' optional, enable with the 'api' feature
Wolfgang Bumiller [Fri, 21 Apr 2023 09:10:53 +0000 (11:10 +0200)]
tfa: make 'anyhow' optional, enable with the 'api' feature

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agotfa: fix warning with types feature w/o api feature
Wolfgang Bumiller [Fri, 21 Apr 2023 09:10:27 +0000 (11:10 +0200)]
tfa: fix warning with types feature w/o api feature

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agotfa: drop anyhow from totp module
Wolfgang Bumiller [Fri, 21 Apr 2023 08:44:46 +0000 (10:44 +0200)]
tfa: drop anyhow from totp module

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agotfa: drop anyhow from u2f module
Wolfgang Bumiller [Fri, 21 Apr 2023 06:52:02 +0000 (08:52 +0200)]
tfa: drop anyhow from u2f module

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agotfa: add a 'types' feature to get TfaInfo and TfaType
Wolfgang Bumiller [Thu, 23 Mar 2023 09:57:40 +0000 (10:57 +0100)]
tfa: add a 'types' feature to get TfaInfo and TfaType

without adding the entire API as well, so API clients can
actually use the types used by the api methods without
requiring the backend implementation being built in as
well...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agotfa: make failing to generate a webauthn challenge non-fatal
Wolfgang Bumiller [Wed, 19 Apr 2023 08:53:38 +0000 (10:53 +0200)]
tfa: make failing to generate a webauthn challenge non-fatal

If WA or U2F fail to produce a challenge, the user may still
log in with other factors and the challenge will be
considered to not be empty.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agotfa: don't return a challenge if all 2nd factors are disabled
Wolfgang Bumiller [Tue, 18 Apr 2023 09:24:00 +0000 (11:24 +0200)]
tfa: don't return a challenge if all 2nd factors are disabled

Instead, this should allow the user to login without them.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agotfa: don't automatically drop empty recovery
Wolfgang Bumiller [Tue, 18 Apr 2023 08:39:16 +0000 (10:39 +0200)]
tfa: don't automatically drop empty recovery

This should only ever be explicitly removed.

Similarly, include an empty array of recovery keys in the
tfa challenge, so that clients know about empty recoveries
rather than getting an empty challenge when there are no
other factors available.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agoproxmox-longin: allow access to RecoveryState keys (make it pub)
Dietmar Maurer [Mon, 8 May 2023 08:26:09 +0000 (10:26 +0200)]
proxmox-longin: allow access to RecoveryState keys (make it pub)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
18 months agoproxmox-login: pass body as &str to response()
Dietmar Maurer [Mon, 8 May 2023 06:22:17 +0000 (08:22 +0200)]
proxmox-login: pass body as &str to response()

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
18 months agoadd new proxmox-login to workspace members
Dietmar Maurer [Fri, 5 May 2023 07:29:50 +0000 (09:29 +0200)]
add new proxmox-login to workspace members

18 months agonew proxmox-login package
Dietmar Maurer [Thu, 4 May 2023 07:09:08 +0000 (09:09 +0200)]
new proxmox-login package

Author: Wofgang Bumiller <w.bumiller@proxmox.com>

19 months agoapi-macro: support non-idents in serde(rename)
Wolfgang Bumiller [Fri, 31 Mar 2023 11:43:26 +0000 (13:43 +0200)]
api-macro: support non-idents in serde(rename)

For PVE we'll have enum variants like /dev/urandom...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agohttp: sync: drop unused &self parameter
Fabian Grünbichler [Fri, 3 Mar 2023 11:39:24 +0000 (12:39 +0100)]
http: sync: drop unused &self parameter

these are just internal helpers, changing their signature is fine.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
20 months agohttp: sync: derive default user-agent from crate version
Fabian Grünbichler [Fri, 3 Mar 2023 11:39:23 +0000 (12:39 +0100)]
http: sync: derive default user-agent from crate version

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
20 months agohttp: sync: remove redundant calls for setting User-Agent
Fabian Grünbichler [Fri, 3 Mar 2023 11:39:22 +0000 (12:39 +0100)]
http: sync: remove redundant calls for setting User-Agent

the requests are all created via the agent that already contains the user
agent, so this internal helper isn't needed anymore.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
20 months agohttp: sync: set user-agent via ureq agent
Fabian Grünbichler [Fri, 3 Mar 2023 11:39:21 +0000 (12:39 +0100)]
http: sync: set user-agent via ureq agent

this allows us to slim down our code, and once
https://github.com/algesten/ureq/pull/597 is merged upstream (and/or we update
to a version containing the fix) it also means the custom user agent is used
for requests to the proxy host, if one is configured.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
20 months agoproxmox-tfa: update generated d/control
Thomas Lamprecht [Thu, 2 Mar 2023 15:54:59 +0000 (16:54 +0100)]
proxmox-tfa: update generated d/control

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agobump proxmox-auth-api to 0.1.0-1
Wolfgang Bumiller [Thu, 2 Feb 2023 10:51:02 +0000 (11:51 +0100)]
bump proxmox-auth-api to 0.1.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agoauth-api: make example require pam-authenticator
Wolfgang Bumiller [Thu, 2 Feb 2023 10:50:04 +0000 (11:50 +0100)]
auth-api: make example require pam-authenticator

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agobump schema dependency to 1.3.7 for auth-api
Wolfgang Bumiller [Thu, 2 Feb 2023 10:46:40 +0000 (11:46 +0100)]
bump schema dependency to 1.3.7 for auth-api

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agobump proxmox-schema to 1.3.7-1
Wolfgang Bumiller [Thu, 2 Feb 2023 10:46:08 +0000 (11:46 +0100)]
bump proxmox-schema to 1.3.7-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agobump proxmox-tfa to 3.0.0-1
Wolfgang Bumiller [Thu, 2 Feb 2023 10:05:56 +0000 (11:05 +0100)]
bump proxmox-tfa to 3.0.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agoadd proxmox-auth-api crate
Wolfgang Bumiller [Tue, 31 Jan 2023 13:53:43 +0000 (14:53 +0100)]
add proxmox-auth-api crate

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agoschema: add basic api types feature
Wolfgang Bumiller [Tue, 31 Jan 2023 12:46:37 +0000 (13:46 +0100)]
schema: add basic api types feature

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agosort workspace members
Wolfgang Bumiller [Tue, 31 Jan 2023 11:09:12 +0000 (12:09 +0100)]
sort workspace members

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agobump proxmox-metrics to 0.2.2
Wolfgang Bumiller [Mon, 30 Jan 2023 10:35:52 +0000 (11:35 +0100)]
bump proxmox-metrics to 0.2.2

to update proxmox-http dep to 0.8

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agobump proxmox-subscription to 0.3.1
Wolfgang Bumiller [Mon, 30 Jan 2023 10:34:14 +0000 (11:34 +0100)]
bump proxmox-subscription to 0.3.1

to update proxmox-http dependency

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agobump proxmox-rest-server to 0.3.0-1
Wolfgang Bumiller [Mon, 30 Jan 2023 10:32:29 +0000 (11:32 +0100)]
bump proxmox-rest-server to 0.3.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agobump proxmox-http to 0.8.0
Wolfgang Bumiller [Mon, 30 Jan 2023 10:29:07 +0000 (11:29 +0100)]
bump proxmox-http to 0.8.0

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: update example to new ApiConfig
Wolfgang Bumiller [Thu, 2 Mar 2023 14:53:30 +0000 (15:53 +0100)]
rest-server: update example to new ApiConfig

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: add wasm content type
Wolfgang Bumiller [Tue, 31 Jan 2023 10:04:26 +0000 (11:04 +0100)]
rest-server: add wasm content type

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: tls-acceptor: allow setting cipher suite and list
Wolfgang Bumiller [Mon, 30 Jan 2023 09:19:46 +0000 (10:19 +0100)]
rest-server: tls-acceptor: allow setting cipher suite and list

just pass the strings to openssl

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: generic certificate path types
Wolfgang Bumiller [Thu, 26 Jan 2023 09:47:42 +0000 (10:47 +0100)]
rest-server: generic certificate path types

to not require a PathBuf on the caller side

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: more convenient alias-list for ApiConfig
Wolfgang Bumiller [Thu, 26 Jan 2023 08:41:06 +0000 (09:41 +0100)]
rest-server: more convenient alias-list for ApiConfig

To the existing `.alias(item)`, add a
`.aliases(into-item-iter)` similar to how `Extend` works.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: make all ApiConfig methods builder-style
Wolfgang Bumiller [Thu, 26 Jan 2023 08:32:47 +0000 (09:32 +0100)]
rest-server: make all ApiConfig methods builder-style

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: add AcceptorBuilder
Wolfgang Bumiller [Wed, 25 Jan 2023 14:37:20 +0000 (15:37 +0100)]
rest-server: add AcceptorBuilder

The connection submodule now allows building an "acceptor"
for hyper connections which can either take an explicit ssl
acceptor, or builds a default one with a self signed
certificate.

The rate-limited-stream feature enables a method to
lookup/update rate limiters for connections.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: impl PeerAddress for RateLimitedStream via feature
Wolfgang Bumiller [Wed, 25 Jan 2023 10:57:49 +0000 (11:57 +0100)]
rest-server: impl PeerAddress for RateLimitedStream via feature

rest-server can now optionally provide a PeerAddress
implementation for RateLimitedStream by activating its
'rate-limited-stream' feature

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agohttp: add RateLimitedStream::inner, drop peer_addr
Wolfgang Bumiller [Wed, 25 Jan 2023 10:56:05 +0000 (11:56 +0100)]
http: add RateLimitedStream::inner, drop peer_addr

instead of implementing 'peer_addr' specifically for
RateLimitedStream<tokio::net::TcpStream>, just provide
.inner() and .inner_mut() so the user can reach the inner
stream directly.

This way we can drop the tokio/net feature as well

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agohttp: lower hyper feature requirements for client feature
Wolfgang Bumiller [Wed, 25 Jan 2023 10:51:27 +0000 (11:51 +0100)]
http: lower hyper feature requirements for client feature

instead of 'full', we only need 'tcp+http1+http2'

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agohttp: move rate-limiting out of client feature
Wolfgang Bumiller [Wed, 25 Jan 2023 10:43:01 +0000 (11:43 +0100)]
http: move rate-limiting out of client feature

this can now be used separately

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agohttp: start 0.8.0 refactoring
Wolfgang Bumiller [Wed, 25 Jan 2023 10:40:57 +0000 (11:40 +0100)]
http: start 0.8.0 refactoring

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-handler: more convenient auth/index handler setters
Wolfgang Bumiller [Wed, 25 Jan 2023 10:34:21 +0000 (11:34 +0100)]
rest-handler: more convenient auth/index handler setters

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: PeerAddress for Pin<Box<T>>
Wolfgang Bumiller [Wed, 25 Jan 2023 09:49:48 +0000 (10:49 +0100)]
rest-server: PeerAddress for Pin<Box<T>>

since this is how tokio-openssl's SslStream is used in
practice

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: drop ServerAdapter, move AuthError
Wolfgang Bumiller [Wed, 25 Jan 2023 09:06:11 +0000 (10:06 +0100)]
rest-server: drop ServerAdapter, move AuthError

Instead of a ServerAdapter for the index page and
authentication checking (which don't relate to each other),
provide a `.with_auth_handler` and `.with_index_handler`
builder for ApiConfig separately.

Both are optional. Without an index handler, it'll produce a
404. Without an auth handler, an `AuthError::NoData` is
returned.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: make adapter optional
Wolfgang Bumiller [Tue, 24 Jan 2023 14:02:56 +0000 (15:02 +0100)]
rest-server: make adapter optional

when no user information or index needs to be defined

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: drop Router from ApiConfig
Wolfgang Bumiller [Tue, 24 Jan 2023 13:54:32 +0000 (14:54 +0100)]
rest-server: drop Router from ApiConfig

instead, allow attaching routers to path prefixes and also
add an optional non-formatting router

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: make handlebars optional as 'templates' feature
Wolfgang Bumiller [Tue, 24 Jan 2023 12:56:42 +0000 (13:56 +0100)]
rest-server: make handlebars optional as 'templates' feature

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: cleanup unreadable code
Wolfgang Bumiller [Tue, 24 Jan 2023 10:41:52 +0000 (11:41 +0100)]
rest-server: cleanup unreadable code

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: use BAD_REQUEST for non-GET on file-paths
Wolfgang Bumiller [Tue, 24 Jan 2023 10:31:07 +0000 (11:31 +0100)]
rest-server: use BAD_REQUEST for non-GET on file-paths

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: make handle_request a method of ApiConfig
Wolfgang Bumiller [Tue, 24 Jan 2023 10:26:41 +0000 (11:26 +0100)]
rest-server: make handle_request a method of ApiConfig

This is what actually defines the API server after all.
The ApiService trait in between is a hyper impl detail.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: drop allocation in Service impl
Wolfgang Bumiller [Tue, 24 Jan 2023 10:22:27 +0000 (11:22 +0100)]
rest-server: drop allocation in Service impl

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: PeerAddr trait, drop proxmox-http dep
Wolfgang Bumiller [Tue, 24 Jan 2023 10:15:22 +0000 (11:15 +0100)]
rest-server: PeerAddr trait, drop proxmox-http dep

We pulled in proxmox-http with the client feature solely to
implement the `Service` trait on
`SslStream<RateLimitedStream<TcpStream>>`.

All those `Service` impls are the same: provide a peer
address and return an `ApiService`.
Let's put the `peer_addr()` call into a trait and build from
there.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: make socketpair private
Wolfgang Bumiller [Tue, 24 Jan 2023 10:14:35 +0000 (11:14 +0100)]
rest-server: make socketpair private

`proxmox_rest_server::socketpair` doesn't make sense as an
external API

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorest-server: start 0.3 api refactoring
Wolfgang Bumiller [Tue, 24 Jan 2023 10:14:20 +0000 (11:14 +0100)]
rest-server: start 0.3 api refactoring

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agoldap: test fixup
Wolfgang Bumiller [Thu, 2 Mar 2023 14:44:11 +0000 (15:44 +0100)]
ldap: test fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agosys: drop sortable and identity macros
Wolfgang Bumiller [Wed, 1 Mar 2023 12:40:39 +0000 (13:40 +0100)]
sys: drop sortable and identity macros

We should not use the sys crate to pull in the sortable
macro, just depend on its crate instead...
And the identity macro used to be required by the sortable
macro, but is not anymore and has been deprecated for a
while, so we can now drop it.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agorouter: make format&print generic
Wolfgang Bumiller [Tue, 28 Feb 2023 13:52:59 +0000 (14:52 +0100)]
router: make format&print generic

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
21 months agorelease proxmox-ldap to 0.1.0-1
Wolfgang Bumiller [Fri, 10 Feb 2023 09:36:40 +0000 (10:36 +0100)]
release proxmox-ldap to 0.1.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
21 months agobump proxmox-rest-server to 0.2.2-1
Wolfgang Bumiller [Fri, 10 Feb 2023 09:35:24 +0000 (10:35 +0100)]
bump proxmox-rest-server to 0.2.2-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
21 months agorest-server: add handle_worker from backup debug cli
Lukas Wagner [Thu, 9 Feb 2023 13:31:11 +0000 (14:31 +0100)]
rest-server: add handle_worker from backup debug cli

The function has now multiple users, so it is moved
here.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
21 months agoldap: fixup d/control
Wolfgang Bumiller [Wed, 8 Feb 2023 13:30:52 +0000 (14:30 +0100)]
ldap: fixup d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
21 months agoldap: drop Ldap prefix from types that have it
Wolfgang Bumiller [Wed, 8 Feb 2023 13:29:12 +0000 (14:29 +0100)]
ldap: drop Ldap prefix from types that have it

for a bit more consistency and since we tend to repeat stuff
too much

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
21 months agofix 'default-features = false' for ldap3
Wolfgang Bumiller [Wed, 8 Feb 2023 13:26:34 +0000 (14:26 +0100)]
fix 'default-features = false' for ldap3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
21 months agoldap: clippy fixups
Wolfgang Bumiller [Wed, 8 Feb 2023 13:15:44 +0000 (14:15 +0100)]
ldap: clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
21 months agoldap: add debian packaging
Lukas Wagner [Tue, 24 Jan 2023 10:03:37 +0000 (11:03 +0100)]
ldap: add debian packaging

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
21 months agoldap: tests: add LDAP integration tests
Lukas Wagner [Tue, 24 Jan 2023 10:03:36 +0000 (11:03 +0100)]
ldap: tests: add LDAP integration tests

This commit adds integration tests to ensure that the crate works as intended.
The tests are executed against a real LDAP server, namely `glauth`. `glauth` was
chosen because it ships as a single, statically compiled binary and can
be configured with a single configuration file.

The tests are written as off-the-shelf unit tests. However, they are
 #[ignored] by default, as they have some special requirements:
   * They required the GLAUTH_BIN environment variable to be set,
     pointing to the location of the `glauth` binary. `glauth` will be
     started and stopped automatically by the test suite.
   * Tests have to be executed sequentially (`--test-threads 1`),
     otherwise multiple instances of the glauth server might bind to the
     same port.

The `run_integration_tests.sh` checks whether GLAUTH_BIN is set, or if
not, attempts to find `glauth` on PATH. The script also ensures that the
tests are run sequentially.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
21 months agoldap: allow searching for LDAP entities
Lukas Wagner [Tue, 24 Jan 2023 10:03:35 +0000 (11:03 +0100)]
ldap: allow searching for LDAP entities

This commit adds the search_entities function, which allows to search for
LDAP entities given certain provided criteria.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
21 months agoldap: add helpers for constructing LDAP filters
Lukas Wagner [Tue, 24 Jan 2023 10:03:34 +0000 (11:03 +0100)]
ldap: add helpers for constructing LDAP filters

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
21 months agoldap: add basic user auth functionality
Lukas Wagner [Tue, 24 Jan 2023 10:03:33 +0000 (11:03 +0100)]
ldap: add basic user auth functionality

In the LDAP world, authentication is done using the bind operation, where
users are authenticated with the tuple (dn, password). Since we only know
the user's username, it is first necessary to look up the user's
domain (dn).

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
21 months agoldap: create new `proxmox-ldap` crate
Lukas Wagner [Tue, 24 Jan 2023 10:03:32 +0000 (11:03 +0100)]
ldap: create new `proxmox-ldap` crate

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
21 months agosys: fixup error types handling
Thomas Lamprecht [Thu, 2 Feb 2023 15:32:37 +0000 (16:32 +0100)]
sys: fixup error types handling

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agosys: cope with unavailable KSM sharing info
Thomas Lamprecht [Thu, 2 Feb 2023 15:12:15 +0000 (16:12 +0100)]
sys: cope with unavailable KSM sharing info

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agobump proxmox-time to 1.1.5-1
Wolfgang Bumiller [Thu, 12 Jan 2023 13:21:44 +0000 (14:21 +0100)]
bump proxmox-time to 1.1.5-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agore-add proxmox-uuid d/control
Wolfgang Bumiller [Thu, 12 Jan 2023 13:22:48 +0000 (14:22 +0100)]
re-add proxmox-uuid d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agobump proxmox-uuid to 1.0.2-1
Wolfgang Bumiller [Thu, 12 Jan 2023 12:48:54 +0000 (13:48 +0100)]
bump proxmox-uuid to 1.0.2-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agoupdate d/control files
Fabian Grünbichler [Thu, 5 Jan 2023 11:17:00 +0000 (12:17 +0100)]
update d/control files

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agobump proxmox-rest-server to 0.2.1-1
Fabian Grünbichler [Thu, 5 Jan 2023 11:15:14 +0000 (12:15 +0100)]
bump proxmox-rest-server to 0.2.1-1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agobump proxmox-shared-memory to 0.2.3-1
Fabian Grünbichler [Thu, 5 Jan 2023 11:13:53 +0000 (12:13 +0100)]
bump proxmox-shared-memory to 0.2.3-1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agobump proxmox-router to 1.3.1-1
Fabian Grünbichler [Thu, 5 Jan 2023 11:10:00 +0000 (12:10 +0100)]
bump proxmox-router to 1.3.1-1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agobump proxmox-schema to 1.3.6-1
Fabian Grünbichler [Thu, 5 Jan 2023 11:08:58 +0000 (12:08 +0100)]
bump proxmox-schema to 1.3.6-1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agobump proxmox-sys to 0.4.2-1
Fabian Grünbichler [Thu, 5 Jan 2023 11:07:01 +0000 (12:07 +0100)]
bump proxmox-sys to 0.4.2-1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agoupdate nix to 0.26
Fabian Grünbichler [Thu, 5 Jan 2023 10:16:50 +0000 (11:16 +0100)]
update nix to 0.26

it's the version currently shipped by bookworm, so let's unify this widely-used
dependency to make bootstrapping easier.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agoupdate d/control
Fabian Grünbichler [Thu, 5 Jan 2023 10:18:52 +0000 (11:18 +0100)]
update d/control

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agore-add epoch_to_rfc3339_utc on wasm target
Dietmar Maurer [Thu, 15 Dec 2022 12:35:53 +0000 (13:35 +0100)]
re-add epoch_to_rfc3339_utc on wasm target

This was lost in commit 980d6b26df0e886795f5121036eed0a7511e11dd.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
23 months agoclippy fix
Fabian Grünbichler [Tue, 13 Dec 2022 13:55:24 +0000 (14:55 +0100)]
clippy fix

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agosection-config: silence clippy
Fabian Grünbichler [Tue, 13 Dec 2022 13:37:55 +0000 (14:37 +0100)]
section-config: silence clippy

these two functions don't actually use the `type_name` parameter, but the
interface including custom formatters require it.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>