File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ class Ldap
6868 #
6969 def initialize ( options = { } )
7070 @uid = options [ :uid ] || "sAMAccountName"
71+ @instrumentation_service = options [ :instrumentation_service ]
72+ @admin_user = options [ :admin_user ]
73+ @admin_password = options [ :admin_password ]
7174
7275 @connection = Net ::LDAP . new ( {
7376 host : options [ :host ] ,
@@ -215,7 +218,7 @@ def global_catalog_connection
215218 if active_directory_capability?
216219 @global_catalog_connection ||= Net ::LDAP . new ( {
217220 host : @connection . host ,
218- auth : @connection . instance_variable_get ( :@auth ) ,
221+ auth : { username : admin_user , password : admin_password } ,
219222 instrumentation_service : @connection . instance_variable_get ( :@instrumentation_service ) ,
220223 port : 3268 ,
221224 } )
@@ -344,5 +347,9 @@ def configure_member_search_strategy(strategy = nil)
344347 def active_directory_capability?
345348 capabilities [ :supportedcapabilities ] . include? ( ACTIVE_DIRECTORY_V51_OID )
346349 end
350+
351+ private
352+
353+ attr_reader :admin_user , :admin_password
347354 end
348355end
You can’t perform that action at this time.
0 commit comments