mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Add support for ldaps on port 636
This commit adds support for ldaps on port 636. Without this change vmpooler assumes the auth method is start_tls, which does not work with ldaps.
This commit is contained in:
parent
d653ce482e
commit
d879f0ef20
1 changed files with 3 additions and 1 deletions
|
|
@ -57,11 +57,13 @@ module Vmpooler
|
|||
end
|
||||
|
||||
def authenticate_ldap(port, host, user_object, base, username_str, password_str)
|
||||
auth_method = :start_tls if port == 389
|
||||
auth_method = :simple_tls if port == 636
|
||||
ldap = Net::LDAP.new(
|
||||
:host => host,
|
||||
:port => port,
|
||||
:encryption => {
|
||||
:method => :start_tls,
|
||||
:method => auth_method,
|
||||
:tls_options => { :ssl_version => 'TLSv1' }
|
||||
},
|
||||
:base => base,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue