mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-08-13 16:08:58 +00:00

Previously `authentication_verify` just `die`d on error and would only return a boolean whether `priv/tfa.cfg` needs updating as a positive result. Since we want to support locking TOTP as well as a general TFA lock-out via the config, we also want to be able to tell when this occurs. Most of it is handled by the TFA rust crate already, but notifying users needs to be done on this end instead. In pve-rs we now have a different API for this: `authentication_verify2`, which, instead of die()ing on errors, always returns a hash containing the result as well as the flags 'tfa-limit-reached' and 'totp-limit-reached' which, if set, tell us to notify the user. However, doing so will introduce new fields in the `priv/tfa.cfg` in a struct marked as `deny_unknown_fields`, so in a cluster, the limits & notification handling should only be done once we can be sure that all nodes are up to date. These fields are only introduced on login errors, so for now, handle a failed result early without saving `priv/tfa.cfg`. The only case where saving the file was previously required was when *successfully* logging in with a recovery key, by which we cannot be reaching a limit, so this should still be safe. Once we can validate that all cluster nodes are up to date, we can implement the notification system. A commented-out code structure for this is included in this patch. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
Source: libpve-access-control
|
|
Section: perl
|
|
Priority: optional
|
|
Maintainer: Proxmox Support Team <support@proxmox.com>
|
|
Build-Depends: debhelper (>= 12~),
|
|
libauthen-pam-perl,
|
|
libnet-ldap-perl,
|
|
libpve-cluster-perl,
|
|
libpve-common-perl (>= 6.0-11),
|
|
libpve-rs-perl,
|
|
libtest-mockmodule-perl,
|
|
liburi-perl,
|
|
libuuid-perl,
|
|
lintian,
|
|
perl,
|
|
pve-cluster (>= 6.1-4),
|
|
pve-doc-generator (>= 5.3-3)
|
|
Standards-Version: 4.5.1
|
|
Homepage: https://www.proxmox.com
|
|
|
|
Package: libpve-access-control
|
|
Architecture: all
|
|
Depends: libauthen-pam-perl,
|
|
libcrypt-openssl-random-perl,
|
|
libcrypt-openssl-rsa-perl,
|
|
libjson-perl,
|
|
libjson-xs-perl,
|
|
libmime-base32-perl,
|
|
libnet-ldap-perl,
|
|
libnet-ssleay-perl,
|
|
libpve-cluster-perl,
|
|
libpve-common-perl (>= 6.0-18),
|
|
libpve-rs-perl (>= 0.7.6),
|
|
libpve-u2f-server-perl (>= 1.0-2),
|
|
liburi-perl,
|
|
libuuid-perl,
|
|
pve-cluster (>= 6.1-4),
|
|
${misc:Depends},
|
|
${perl:Depends}
|
|
Breaks: pve-manager (<< 7.0-15)
|
|
Description: Proxmox VE access control library
|
|
This package contains the role based user management and access
|
|
control function used by Proxmox VE.
|