Commit Graph

38 Commits

Author SHA1 Message Date
Wolfgang Bumiller
d9f02efe49 use TFA authentication api v2
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>
2023-05-15 09:06:28 +02:00
Fabian Grünbichler
25fb12c4cb d/control: wrap-and-sort
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-10 14:49:35 +01:00
Fabian Grünbichler
c00ad67e40 build: add missing build-dependency
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-10 14:48:50 +01:00
Thomas Lamprecht
8a47ffa50b d/control: bump versioned dependency to libpve-rs-perl
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-19 14:35:44 +01:00
Thomas Lamprecht
dbbd91c27f d/control: bump versioned dependency to libpve-rs-perl
to ensure we get the incompatible type set for such TFA entries

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-17 13:48:24 +01:00
Thomas Lamprecht
4a26e5f1c1 d/control: break pve-manager (<< 7.0-15)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-11 18:19:52 +01:00
Wolfgang Bumiller
fb1a49f313 d/control: add liburi-perl dependency
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 13:52:40 +01:00
Dietmar Maurer
f0c9ef167b depend on libpve-rs-perl 2021-07-01 13:13:59 +02:00
Fabian Grünbichler
8ac53236df d/control: add missing libuuid-perl b-d
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-05-19 11:54:26 +02:00
Thomas Lamprecht
d4c9a54e35 d/control: update standards version
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-09 19:48:50 +02:00
Thomas Lamprecht
ce4b5d6066 d/control: drop perl dependency, added by ${perl:Depends}
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-09 19:48:50 +02:00
Thomas Lamprecht
08eb54c9dc d/control: bump debhelper compat to >= 12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-09 18:16:38 +02:00
Thomas Lamprecht
8d400e7ece d/control: bump versioned to libpve-common-perl
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-21 16:51:06 +01:00
Thomas Lamprecht
c63e26c84e d/control: bump versioned dependency to pve-common
to ensure we've the new LDAP module available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-07 19:53:07 +01:00
Thomas Lamprecht
cb97d469e9 d/control: bump versioned dependency on pve-common
for new allowtoken property in schema

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-29 21:21:59 +01:00
Thomas Lamprecht
82110d64f4 d/control: change homepage link to https
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-29 21:21:59 +01:00
Thomas Lamprecht
77eaf7c6c8 d/control: bump versioned dependencies on pve-cluster
to ensure we've got the verify_token method available and the
token.cfg observed.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-28 21:10:45 +01:00
Fabian Grünbichler
3a540a697f API token: add (shadow) TokenConfig
with the format:

<full token ID> <token value/UUID>

it is just used for token value generation/deletion via the User API,
token value verification will happen over pmxcfs/ipcc.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-28 20:59:45 +01:00
Fabian Grünbichler
9efcb56129 access-control: remove check_permissions/permission
they have been handled by PVE::RPCEnvironment for quite some time
already, and the versions there are the complete ones that should be
actually used.

manager switched over their last use not long ago, in 6.0-9, so
record a Breaks to that version.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-23 18:12:50 +01:00
Fabian Grünbichler
ff6b10be58 d/control: (build-)depend on libpve-cluster-perl
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 11:17:50 +01:00
Fabian Grünbichler
3196962023 d/control: correctly set Architecture field
this packge only contains perl modules and scripts, shell completions
and documentation - no architecture-specific stuff whatsoever.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 12:19:23 +01:00
Fabian Grünbichler
f773e2991c d/control: remove outdated dependencies
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 12:19:23 +01:00
Fabian Grünbichler
82519f0ccb build: bump compat to 10
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 12:19:23 +01:00
Thomas Lamprecht
c3925aed42 d/control: bump versioned dependency on pve-common
to ensure the new 'pve-tfa-secret' format is available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 08:25:33 +01:00
Thomas Lamprecht
cd652be382 d/control: bump version dependency to libpve-u2f-server-perl
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-09 12:46:22 +02:00
Thomas Lamprecht
0db7870be0 d/control: bump version dependency for pve-cluster
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-03 13:37:57 +02:00
Wolfgang Bumiller
cce4903b61 depend on libpve-u2f-server-perl
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-03 08:04:00 +02:00
Thomas Lamprecht
e235ae3903 buildsys: cleanup and add target to build DSC
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-02 11:36:13 +02:00
Thomas Lamprecht
4b602eed28 d/control: bump version dependency to pve-cluster
to ensure that cfs_lock_authkey is available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-14 11:18:43 +01:00
Thomas Lamprecht
f23ecb7568 d/control: bump version dependency to pve-doc-generator
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-02-22 13:31:32 +01:00
Rhonda D'Vine
997bff9b90 Add missing Build-Depends
Also adjust debhelper dependency according to debian/compat content.

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
2018-12-17 09:39:38 +01:00
Thomas Lamprecht
e53af3dbf6 d/control: update pve-common version dependency
as we use the new param_mapping functionallity from PVE::CLIHandler

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-27 13:30:00 +02:00
Dominik Csapak
b34d76e726 replace read_password with param_mapping
use the get_standar_mapping 'pve-password'
then we can get rid of the Term::ReadLine dependency

we use this change to only ask for the password once on
'pveum ticket'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-06-27 13:27:22 +02:00
Philip Abernethy
1e41cdc903 pveum: introduce sub-commands
use a sub-command structure instead of abbreviated words, where useful.
Keep old commands as aliases.

Signed-off-by: Philip Abernethy <p.abernethy@proxmox.com>
Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-05 15:02:09 +02:00
Fabian Grünbichler
fce00589c9 build: reformat debian/control
using wrap-and-sort -abt
2017-10-04 11:05:33 +02:00
Fabian Grünbichler
c0041fa369 build: add substitution variable 2017-06-12 10:07:25 +02:00
Fabian Grünbichler
55a76f8830 build: reformat b-d and depends 2017-06-12 10:05:09 +02:00
Fabian Grünbichler
20922e7fbd build: make control static 2017-06-12 10:02:22 +02:00