]> git.proxmox.com Git - pve-access-control.git/commit
api: tfa: don't block tokens from viewing and list TFA entries
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 15 Jun 2023 07:23:33 +0000 (09:23 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 15 Jun 2023 07:23:35 +0000 (09:23 +0200)
commit79c9d3b84b4d8ea88d432810ecea26f477077428
treebe9a5b6fbf368786401ae9d87d7eae737c17dc74
parent329780350c5e8e43ace82e7ad219c6fec767249f
api: tfa: don't block tokens from viewing and list TFA entries

The `allowtoken` property is a total, unconditional block on using
API tokens on an endpoint. We reserve those only for a limited set of
security critical endpoints like changing passwords or second
factors, or creating a (cookie) ticket, which are exempt from this
limitations, so require to have limited access to them too.

Anyhow, listing and getting TFA entries for users, where the API
token has the correct permissions granted, is not critical, as the
API token cannot gain more permissions than they have from that
info, so drop the total block on those GET methods.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/API2/TFA.pm