Commit Graph

33 Commits

Author SHA1 Message Date
Wolfgang Bumiller
f25628d3ef verify_ticket: allow general non-challenge tfa to be run as two step call
This allows for doing OTP TFA in two steps, first login with normal
credentials and get the half-logged-in ticket, then send the OTP
verification for full login, same as with u2f was already possible.

This allows for a nicer UI, as OTP fields can be shown on demand, and
do not need to be visible by default.

The old way of sending the OTP code immediately with the initial
credentials request still works for backward compatibility and as
some API user may prefer it.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-08 14:48:13 +02:00
Wolfgang Bumiller
47d731c731 allow users to change their totp settings
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-03 08:04:00 +02:00
Wolfgang Bumiller
18f8ba1803 u2f authentication
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-03 08:04:00 +02:00
Wolfgang Bumiller
2b4c98ab01 u2f api endpoints
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-03 08:04:00 +02:00
Thomas Lamprecht
b27ae8aa44 api/ticket: move getting cluster name into an eval
to avoid a failed login if a broken corosync config is setup

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-26 15:49:53 +01:00
Thomas Lamprecht
e842fec5e0 fix #233: return cluster name on successful login
If a cluster is configured then return the cluster name on successful
login - if the user has Sys.Audit privileges on the '/' path (same
as for returning cluster info, like the join info path uses)

This is more for the reason that some admins do not want to expose
this to lesser privileged (API) users. While yes, you can
theoretically launch a (DDOS resembling) attack which stresses the
corosync network if you know the cluster_name (it's still encrypted
but you can back-calculate the multicast group membership info) you
need to be able to send multicast traffic on the corosync LAN -
which can be seen as a pretty big privilege anyway.

But, for now reduce permissions - we can more easily loosen them than
tighten without causing issues anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-13 11:58:05 +01:00
Stoiko Ivanov
3a5ae7a0e6 refactor API using get/register_standard_option
Pull out duplicated property definitions in the API into
register_standard_option/get_standard_option calls.
(All parameters, which are thus added to the API calls were optional).

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-06-27 16:40:55 +02:00
Dominik Csapak
765305e210 fix typo in change_passsword
s/passsword/password/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-12 15:07:27 +02:00
Thomas Lamprecht
f584808972 compute_api_permissions: a storage has also permissions
Fixes a problem where a non root@pam system administrator does not
sees the 'Permissions' tab for a storage in our WebUI.

Fixes commit a2c18811d3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-18 13:32:11 +01:00
Wolfgang Bumiller
36dd9dbdb3 fix another typo 2017-09-21 10:19:27 +02:00
Thomas Lamprecht
14658ad8ba api: fix typo in 'GET ticket' description
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-21 09:13:34 +02:00
Thomas Lamprecht
a2c18811d3 API/ticket: rework coarse grained permission computation
We accessed methods from PVE::Storage here but did not define a
"use PVE::Storage". This thus only worked if modules if the
PVE::Storage module got pulled in by something else, by luck.
Simply including said use statement is not an option because
pve-storage is already dependent from pve-access-control, and we want
to avoid cyclic dependencies, especially on the perl module level.

The reason the offending module was used in the first place here
stems from the way how this coarse grained permissions are
calculated.
We check all permission object paths for privileges for an user.
So we got all vmids and all storage ids and computed paths from them.
This works, but is overkill and led to this "illegal" module use.

Instead I opt to not generating all possible paths, but just check
the ones configured plus a small required static set of top level
paths - this allows to generalize handling of the special root@pam
and "normal" users.

It has to be noted that this method is in general just intended for a
coarse capability check to allow hiding a few UI elements which are
not generated by backend calls (which are already permission aware).
The real checks get done by each backend call, automatically for
simple ones and semi-automatically for complex ones.
2017-09-20 09:33:39 +02:00
Dietmar Maurer
3e5bfdf60f pveum: implement bash completion hooks 2015-10-01 17:22:09 +02:00
Dietmar Maurer
96f8ebd625 add basic support for two factor auth 2014-06-23 11:42:44 +02:00
Dietmar Maurer
39e4e36348 add dummy API for login page 2014-04-30 14:45:57 +02:00
Dietmar Maurer
fe2defd9d5 return correct 401 status code for unauthorized calls
New HTTP::Server will delay the call by 3 seconds.
2013-11-18 11:25:32 +01:00
Dietmar Maurer
6126ab75a0 prevent user enumeration attacks 2013-11-18 09:05:04 +01:00
Dietmar Maurer
437be042c2 correctly compute GUI capabilities (consider pools) 2012-05-30 08:47:43 +02:00
Dietmar Maurer
dd2cfee072 return set of privileges on login - can be used to adopt GUI 2012-04-17 10:26:48 +02:00
Dietmar Maurer
59321f2682 do not allow to change system user passwords 2012-02-09 11:26:37 +01:00
Dietmar Maurer
f3957883eb moved Pool.pm to pve-manager package 2012-01-27 08:44:22 +01:00
Dietmar Maurer
82b63965eb cleanup permission checks
Added new Real.AllocateUser priviledge
2012-01-27 08:34:12 +01:00
Dietmar Maurer
39c85db819 add pool API 2012-01-26 12:42:01 +01:00
Dietmar Maurer
9691923469 fix access control 2012-01-24 11:50:41 +01:00
Dietmar Maurer
12683df7c4 use new syntax for permission checks
And use better names for user priviledges.
2012-01-23 12:14:45 +01:00
Dietmar Maurer
b9180ed235 simplify filter_groups 2012-01-23 09:58:03 +01:00
Dietmar Maurer
37d45debb1 new API to change password
Started to implement fine grained permission checks.
2012-01-20 12:45:24 +01:00
Dietmar Maurer
adf8d771d0 fix bug #85: implement vnc tickets
Those tickets are restricted to a single resource path, and are only valid for
a short period of time (60s).
2012-01-19 09:27:05 +01:00
Dietmar Maurer
7070c1aee5 rename user_enabled to check_user_enabled
And add $noerr parameter.
2012-01-19 06:55:53 +01:00
Dietmar Maurer
a427cecb2b import cfs_read_file 2012-01-18 09:21:21 +01:00
Dietmar Maurer
66b7e98db9 add test if user exists 2012-01-18 07:06:16 +01:00
Dietmar Maurer
d8a56966bc fix bug #85: allow root@pam to generate tickets for other users 2012-01-17 06:42:42 +01:00
Dietmar Maurer
2c3a6c0aaa iimported from svn 'pve-access-control/trunk' 2011-08-23 07:27:48 +02:00