Commit Graph

14 Commits

Author SHA1 Message Date
Thomas Lamprecht
d29d2d4a11 realm: add default-sync-options to config
This allows us to have a convenient way to set the desired default
sync options, and thus not forcing users to pass always all options
when they want to trigger a sync.

We still die when an option is neither specified in the domains
(realm) config nor as API/CLI parameter.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-21 16:21:57 +01:00
Dominik Csapak
2c6e956e0a Auth/LDAP: add get_{users, groups} subs for syncing
this adds the subs which actually query the LDAP for users/groups
and returns the value in format which makes it easy to insert
in our parsed user.cfg

when we find a user/groupname which cannot be in our config,
we warn the verification error

for groups, we append "-$realm" to the groupname, to lower the chance of
accidental overwriting of existing groups (this will be documented
in the api call since it technically does not prevent overwriting, just
makes it more unlikely)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-03-21 15:44:46 +01:00
Dominik Csapak
eba326d2df Auth/LDAP: add necessary options for syncing
for syncing users/groups from ldap, we need some more options
so that the users can adapt it to their LDAP setup, which are very
different accross systems.

sensible defaults are documented

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-21 15:44:22 +01:00
Dominik Csapak
30aad01788 Auth/LDAP: refactor out 'connect_and_bind'
we will use this not only for authentication but also for
getting users/groups from LDAP

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-03-07 19:50:22 +01:00
Dominik Csapak
d9e93d2eca use PVE::LDAP module instead of useing Net::LDAP directly
for things like connecting/binding/etc.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-03-07 19:50:22 +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
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
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
Wolfgang Bumiller
b5040b42f1 Close #833: ldap: non-anonymous bind support
The password will be read from /etc/pve/priv/ldap/$realm.pw
2016-08-05 10:59:14 +02:00
Wolfgang Bumiller
8b600c4d27 Auth::LDAP, Auth::AD: ipv6 support
Also had to change server1/server2 schema from a pattern to
the 'address' format.
2015-12-03 12:08:56 +01:00
Dietmar Maurer
96f8ebd625 add basic support for two factor auth 2014-06-23 11:42:44 +02:00
Dietmar Maurer
7c410d6301 use warnings instead of global -w flag 2013-10-01 13:04:53 +02:00
Dietmar Maurer
5bb4e06a64 new plugin architecture for Auth modules 2012-05-22 10:43:30 +02:00