Commit Graph

317 Commits

Author SHA1 Message Date
Fabian Grünbichler
369851ac6d pveum: add list commands
we already have the API paths, and they make sense to get an overview
over user.cfg contents.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-23 17:42:51 +01:00
Fabian Grünbichler
a5ec58ea9a user.cfg: sort group and pool members, role privs
makes no functional difference, but keeps the output/written config more
stable.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-23 17:41:04 +01:00
Fabian Grünbichler
733371da86 user.cfg: ensure propagate flag is 1/0 when parsing
otherwise this might end up as (arbitrary) string somewhere..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-23 17:33:37 +01:00
Fabian Grünbichler
4ef92d0dab bump version to 6.0-4
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-18 11:55:36 +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
cbe9d6ef92 use already parsed u2f property string
since libpve-cluster-perl 6.0-8 this happens automatically when parsing
the datacenter.cfg, just like the other property strings stored there.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 11:17:50 +01:00
Fabian Grünbichler
158514a836 use PVE::DataCenterConfig
since we read datacenter.cfg, and parse the u2f property string using a
format defined in PVE::DataCenterConfig.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 11:17:50 +01:00
Fabian Grünbichler
e240695bd9 API: fix calls to raise_param_exc
the parameter needs to be a hash reference, not a hash.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-14 11:59:13 +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
0fb0c62d74 ticket: use clinfo to get cluster name
instead of parsing corosync.conf, and avoid coupling the access-control
API with PVE::Corosync. if corosync.conf and pmxcfs don't agree on how
the cluster is called, there is a bigger issue anyway..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 12:19:23 +01:00
Fabian Grünbichler
6bc6a78ac0 pveum: don't unconditionally create auth key
anything that uses it should already generate it anyway.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 12:19:23 +01:00
Fabian Grünbichler
042eaa3dbd pveum: cleanup outdated use statements
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
ec0a8d7d99 build: leave man page compression to dh_docs
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 12:19:23 +01:00
Fabian Grünbichler
5db309a2b1 build: use dh_missing
to fail the build if files are installed, but not shipped in any
package.

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
3b7eaef10f ldaps: support TLS 1.3 as SSL version
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-06 20:24:00 +01:00
Alexandre Derumier
07dd90d731 ldap auth: add sslversion option
default to tls1.2

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-11-06 20:05:06 +01:00
Thomas Lamprecht
6e5bbca424 bump version to 6.0-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 08:55:09 +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
Wolfgang Bumiller
0bf114df6d api: tfa: use the new 'pve-tfa-secret' format
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-10-29 07:42:41 +01:00
Fabian Grünbichler
9b3ae1efe3 user.cfg: sort ACL members
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-10-17 16:19:59 +02:00
Fabian Grünbichler
93c7e9c3d0 user.cfg: sort entries alphabetically in each section
it's not required for dependencies (since those are only ever between
sections, and not within), but makes for easier diffing.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-10-17 16:19:59 +02:00
Fabian Grünbichler
8967f86f6f add missing 'use PVE::Auth::Plugin'
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-10-17 16:19:59 +02:00
Fabian Grünbichler
508e11f184 parse_user_cfg: correctly parse group names in ACLs
usernames are allowed to start with '@', so adding a user '@test@pve'
and adding it to an ACL should work, instead of ignoring that part of
the ACL entry.

So use verify_groupname to additionally enforce that the group name we
extracted does not include an additional @, as then it cannot be a
group.

note: there is no potential for user and group to be confused, since a
username must end with '@REALM', and a group reference in an ACL can
only contain one '@' (as first character).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-10-03 10:47:44 +02:00
Thomas Lamprecht
e073493cb3 bump version to 6.0-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-26 20:25:06 +02:00
Thomas Lamprecht
e149b1c6c9 improve CSRF compat with older PVE
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-26 19:34:13 +02:00
Thomas Lamprecht
a237dc2e76 bump version to 6.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-24 18:17:21 +02:00
Oguz Bektas
51e6f56d25 use hmac_sha256 instead of sha1 for csrf token
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-06-19 12:01:51 +02:00
Fabian Grünbichler
b8055a4fc0 ticket: add comments about auth key mtime
we cannot fully close this window, and don't need to anyway since we
apply +-300s when calculating ticket age ranges, but documenting where
mtime is used and what we expect seems like a good idea for future
readers.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-06-19 11:59:45 +02:00
Fabian Grünbichler
e770e6672f ticket: reorder calls when rotating
to shrink the window between the two file_set_contents calls. we don't
need the mtimes to line up exactly since we have 300s of uncertainty
anyway, but generating an RSA key could take a while ;)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-06-19 11:59:45 +02:00
Fabian Grünbichler
5bb966fe5d ticket: properly verify exactly 5min old tickets
to fix an issue where valid tickets could be rejected 5 minutes after a
key rotation, where the minimum age is exactly 0 seconds.

thanks Dominik for triaging!

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-06-19 11:59:45 +02:00
Thomas Lamprecht
bab2334336 buildsys: switch upload dist over to buster
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-21 22:10:38 +02:00
Thomas Lamprecht
f1531f223a bump version to 6.0-0+1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-21 22:10:38 +02:00
Thomas Lamprecht
243262f185 fix #2079: activate authkey rotation every 24 hours
This activates the authkey rotation added in commits
1800a71a79c7cf49108e22781d2f34be87b1efd through
f7282aee6b

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-21 22:07:41 +02:00
Thomas Lamprecht
049d789bb1 buildsys: use dpkg-dev makefile helpers for pkg info
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-21 18:50:10 +02:00
Thomas Lamprecht
ef761f510f bump version to 5.1-10
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-15 16:22:30 +02:00
Dominik Csapak
e51988b4cb add /access/user/{id}/tfa api call to get tfa types
this api call will be used to display the right kind of tfa for the gui

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-07 10:04:45 +00:00
Thomas Lamprecht
860ddcba6a bump version to 5.1-9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-30 14:02:41 +00:00
Wolfgang Bumiller
6063b65b9b tfa: realm required TFA should lock out users without TFA
This changed with the previous TFA changes.

In the long term, the plan is to let the user get into the
half-logged-in state and open the TFA configuration window
on the UI to allow them to finish their TFA setup, but for
now we restore the previous behavior.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-24 17:59:48 +00:00
Wolfgang Bumiller
0a956b943a typo fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-15 09:08:24 +02:00
Wolfgang Bumiller
7e58c66de2 store the tfa type in user.cfg
This allows some improvements to the user experience on the
web ui.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-12 16:27:53 +02:00
Thomas Lamprecht
9fbad01207 bump version to 5.1-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-09 12:48:53 +02: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
eb25cbafc3 u2f: new perl bindings encode public key for us
as it was binary data, which can contain everything, including '\0',
and this was cut off, making it impossible to login after
registration, as a borked publicKey got saved in tfa.cfg

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-09 12:44:25 +02:00
Thomas Lamprecht
4473c96caf bump version to 5.1-7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-08 16:56:41 +02:00
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
Thomas Lamprecht
a270d4e167 bump version to 5.1-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-03 13:41:20 +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
Thomas Lamprecht
49b15310ac followup: s/CUSTOM_TFA_TYPES/USER_CONTROLLED_TFA_TYPES/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-03 13:34:23 +02:00