Commit Graph

236 Commits

Author SHA1 Message Date
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
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
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
Wolfgang Bumiller
52192dd4ca bump version to 5.0-8
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-01-18 13:39:48 +01: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
Dominik Csapak
f4e7fc7bab fix #1612: give authenticate_user_ldap the realm on second server
this was missing and lead to 'use of unitialized value $realm...'
and a not working second server if a bindpw was defined

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-11 11:39:08 +01:00
Philip Abernethy
16e50b59f9 properly register pve-poolid format
was erroneously registered as verify_groupname, overriding the previous
registration
2017-10-19 11:58:36 +02:00
Fabian Grünbichler
3dadf8cf6d bump version to 5.0-7 2017-10-05 11:28:36 +02:00
Fabian Grünbichler
fce00589c9 build: reformat debian/control
using wrap-and-sort -abt
2017-10-04 11:05:33 +02:00
Matthias Urban
aad513f6d1 VM.Snapshot.Rollback privilege added
VM.Snapshot.Rollback privilege added

Signed-off-by: Matthias Urban <matthias.urban@pure-systems.com>
2017-09-22 09:08:28 +02:00
Wolfgang Bumiller
186a4e15b6 style fix 2017-09-22 08:53:30 +02:00
Wolfgang Bumiller
e41cc73c52 api: check for special roles before locking the usercfg 2017-09-22 08:52:55 +02:00
Philip Abernethy
0a6e09fd47 Whitespace fixes
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-22 08:38:50 +02:00
Philip Abernethy
5654af83fa Remove unused Dumper uses
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-22 08:38:48 +02:00
Philip Abernethy
894e6f0c4b fix #1501: pveum: die when deleting special role
Die with a helpful error message instead of silently ignoring the user
when trying to delete a special role.
Also add a property to the API answer for possible later use by the
WebUI.

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-22 08:38:21 +02: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
Wolfgang Bumiller
ec4141f4ed bump version to 5.0-6 2017-08-08 11:57:34 +02:00
Dominik Csapak
8bdbfd4ddf fix trailing whitespace
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-08-08 11:46:10 +02:00
Dominik Csapak
23e0cf85fd fix #1470: ad: server and client certificate support
as with ldap we now accept
the verify, capath, cert and certkey parameters for active directory

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-08-08 11:46:10 +02:00
Wolfgang Bumiller
e03c2aef17 ldap: server and client certificate support
This adds 4 more options to the ldap authentication method:

verify: boolean
  If enabled, the server certificate must be valid

capath: path to a file or directory
  The CA to use to verify the server certificate. Used only
  if 'verify' is true.

cert: path to a certificate
  Used as client certificate when connecting to a server,
  provided 'secure' is true. Requires 'certkey' to be set.

certkey: path to the certificate's key
  Required only used when 'cert' is used.
2017-08-08 11:46:10 +02:00
Dietmar Maurer
63134bd436 bump version to 5.0-5
In order to test new package built with dpkg-buildpackage.
2017-06-22 09:13:00 +02:00
Fabian Grünbichler
a96a6fd40c build: remove fakeroot from dpkg-buildpackage 2017-06-12 10:08:46 +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
Thomas Lamprecht
98eb404f77 change from dpkg-deb to dpkg-buildpackage
add debian directory and move the respective files there and add
missing (rules, compat).

Add a Source section to the control.in file.

Move the verify_api check to the new "test" target, which gets
executed before the dh_auto_install target.

Cleanup the "clean" target.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-06-12 09:58:59 +02:00
Dietmar Maurer
868fb1eae5 bump version to 5.0-4 2017-05-02 11:58:54 +02:00
Dietmar Maurer
e623414a30 PVE/CLI/pveum.pm: call setup_default_cli_env() 2017-05-02 10:39:22 +02:00
Dietmar Maurer
3641833bc0 PVE/Auth/PVE.pm: encode uft8 password before calling crypt 2017-05-02 10:37:20 +02:00
Dietmar Maurer
d146e52028 check_api2_permissions: avoid warning about uninitialized value 2017-03-31 17:05:52 +02:00
Dietmar Maurer
63358f40b3 use new PVE::Tools::encrypt_pw, bump version to 5.0-3 2017-03-30 17:54:38 +02:00
Dietmar Maurer
972859d115 use new PVE::OTP class from pve-common 2017-03-30 17:44:54 +02:00
Dietmar Maurer
05fd50af58 bump version to 5.0-2 2017-03-30 08:54:30 +02:00
Dietmar Maurer
54028297ea encrypt_pw: avoid '+' for crypt salt
And make salt less predictable.
2017-03-30 08:53:12 +02:00
Fabian Grünbichler
0835385bea bump release to 5.0 2017-03-13 11:25:30 +01:00
Fabian Grünbichler
3b6996cd8e buildsys: update make upload target for stretch 2017-03-13 11:25:30 +01:00
Wolfgang Bumiller
156fd8f736 buildsys: use fakeroot for dpkg-deb 2017-02-06 11:47:37 +01:00
Wolfgang Bumiller
8ae77032bd buildsys: use gzip -n to disable timestamps 2017-02-06 11:47:18 +01:00
Wolfgang Bumiller
4e515e6d6d buildsys: make job safety 2017-02-06 11:46:12 +01:00
Dietmar Maurer
730f8863eb bump version to 4.0-23 2017-01-19 13:42:26 +01:00
Dietmar Maurer
81bc8fa7e0 remove old test.pl code (does not work anyways). 2017-01-19 13:41:12 +01:00
Dietmar Maurer
a1f8aaae84 use new PVE::Ticket class 2017-01-19 13:40:25 +01:00
Dietmar Maurer
1f1c4593a1 bump version to 4.0-22 2017-01-19 09:12:34 +01:00
Dietmar Maurer
e83e0ed584 RPCEnvironment: removed check_volume_access() to avoid cyclic dependency
moved to PVE::Storage
2017-01-18 17:35:50 +01:00
Dietmar Maurer
c104e4abe6 PVE::PCEnvironment: use new PVE::RESTEnvironment as base class 2017-01-18 13:25:51 +01:00
Dietmar Maurer
f910506387 bump versuion to 4.0-21 2017-01-12 13:56:28 +01:00
Dietmar Maurer
86c4f1e6d1 setup_default_cli_env: expect $class as first parameter 2017-01-12 13:53:18 +01:00
Dietmar Maurer
9595066e5f bump version to 4.0-20 2017-01-12 10:01:17 +01:00