]> git.proxmox.com Git - proxmox-backup.git/commit
server/rest: add ApiAuth trait to make user auth generic
authorStefan Reiter <s.reiter@proxmox.com>
Wed, 31 Mar 2021 10:21:51 +0000 (12:21 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 8 Apr 2021 11:57:57 +0000 (13:57 +0200)
commit26858dba84dbfc5e5ca97198d6a818c08ea9ab0e
tree76e369a603fce245c9c1e9e5c7155df038687d59
parent9fe3358ce631ba51099d3a778923afde817af9b0
server/rest: add ApiAuth trait to make user auth generic

This allows switching the base user identification/authentication method
in the rest server. Will initially be used for single file restore VMs,
where authentication is based on a ticket file, not the PBS user
backend (PAM/local).

To avoid putting generic types into the RestServer type for this, we
merge the two calls "extract_auth_data" and "check_auth" into a single
one, which can use whatever type it wants internally.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
src/bin/proxmox-backup-api.rs
src/bin/proxmox-backup-proxy.rs
src/server/auth.rs
src/server/config.rs
src/server/rest.rs