acs-ldap 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf980c4bd82e07e6b08caf35e6c8b2ee8159efaa
4
- data.tar.gz: 1b2f21b92a0ab7162b33c509ecbebd66a5f19574
3
+ metadata.gz: 50675f7d1bbd75b59901e4170def20da22e096d2
4
+ data.tar.gz: f48b43f7b735fcb00f16d8291f705a1eef145aa7
5
5
  SHA512:
6
- metadata.gz: b39b0838f033fdab46984be80dcddf43acecf09ce28562cf5a8566077664956b36f5f3ac2960761ec87605b949fd3cb7acc87be13c0e81a47b8e105d89b835af
7
- data.tar.gz: aa1f74086684c90c02bb747218ed65d41481231c5fdc45980836b8057019f68a5cdfa53dd32947c87fc106dd1272756d80459cfc7955932fda14932daaa16d7e
6
+ metadata.gz: 341a560f4fdb610453c4bfcbb6b115d9bda785f3c2148e13c88cc23c6db2d122b9be3336f1f751ccc56e427798fe19bff93da3fe0ec648fd906966b791425e53
7
+ data.tar.gz: 90418e33192d9d2fa9044f7594d59e81c9968a2bee13a26655a19b4347004f7de3330fe93efb741569e5e9c690a7c370927bdff26e0568016f2433f51c8ab934
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  *.o
13
13
  *.a
14
14
  mkmf.log
15
+ log/acs_ldap.log
@@ -0,0 +1,101 @@
1
+ class Acs::Ldap::Mapper
2
+
3
+ # mapping
4
+ # [key: method, key: method] => [uid: :id, sn: 'object.other_object.sn']]
5
+ #
6
+ # object_class
7
+ # ["top", "extensibleObject"]
8
+ #
9
+ # options
10
+ # method_separator => used to separate methods call if they are composed
11
+ # force_method_calls => perform method calls even if object#respond_to? :method returns false (util when method_missing is used)
12
+ def initialize(mapping, object_class, ou, options = {})
13
+ @mapping = mapping
14
+ @object_class = object_class
15
+ @ou = ou
16
+ @method_separator = options[:method_separator] || '.'
17
+ @force_method_calls = options[:force_method_calls] || false
18
+ Acs::Ldap::logger.error "Acs::Ldap::Mapper with options methods_separator '#{@method_separator}' force_method_calls '#{@force_method_calls}'"
19
+ end
20
+
21
+ # Populate a hash based on the provided mapping and object
22
+ def attributes(object)
23
+ attributes = {}
24
+ @mapping.each do |key, method|
25
+ attributes[key.to_sym] = chain_methods(object, method, {method_separator: @method_separator, force_method_calls: @force_method_calls}) # unless key.to_sym == :uid
26
+ end
27
+ attributes
28
+ end
29
+
30
+ # return the object classes
31
+ def object_class
32
+ @object_class
33
+ end
34
+
35
+ # returns the value correponding to the key of the object based on the provided mapping
36
+ def get(key, object)
37
+ if @mapping.has_key?(key)
38
+ chain_methods(object, @mapping[key], {method_separator: @method_separator, force_method_calls: @force_method_calls})
39
+ else
40
+ Acs::Ldap::logger.error "Acs::Ldap::Mapper Error while trying to fetch key '#{key}' on object '#{object}' with mapping '#{@mapping}'"
41
+ nil
42
+ end
43
+ end
44
+
45
+ # shortcut method
46
+ def uid(object)
47
+ get(:uid, object)
48
+ end
49
+
50
+ # get the ou (eg. 'people')
51
+ def ou
52
+ @ou
53
+ end
54
+
55
+ protected
56
+
57
+ # go deeper in objects
58
+ def chain_methods(object, chain_method, options = {})
59
+ separator = options[:separator] || '.'
60
+ force_method_calls = options[:force_method_calls] || false
61
+ Acs::Ldap.logger.debug "Acs::Ldap::Mapper chain_method on object '#{object}' with chain '#{chain_method}' separator '#{separator}' force_method_calls '#{force_method_calls}'"
62
+ methods = chain_method.to_s.split(separator)
63
+ if methods.length > 1
64
+ method = methods.shift.to_sym
65
+ if object.respond_to?(method) || force_method_calls
66
+ child_object = object.send(method)
67
+ return chain_methods(child_object, methods.join(separator), options)
68
+ else
69
+ Acs::Ldap.logger.debug "Acs::Ldap::Mapper chain_method returns 'nil'"
70
+ return nil
71
+ end
72
+ else
73
+ if object.respond_to?(methods[0].to_sym) || force_method_calls
74
+ value = object.send(methods[0].to_sym)
75
+ Acs::Ldap.logger.debug "Acs::Ldap::Mapper chain_method returns '#{value}'"
76
+ return value
77
+ else
78
+ Acs::Ldap.logger.debug "Acs::Ldap::Mapper chain_method ended without result, returning 'nil'"
79
+ return nil
80
+ end
81
+ end
82
+ end
83
+
84
+
85
+ def _chain_methods(object, chain_method, options = {})
86
+ separator = options[:separator] || '.'
87
+ force_method_calls = options[:force_method_calls] || false
88
+ Acs::Ldap.logger.debug "Acs::Ldap::Mapper chain_method on object '#{object}' with chain '#{chain_method}' separator '#{separator}'"
89
+ methods = chain_method.to_s.split(separator)
90
+ if methods.length > 1
91
+ method = methods.shift.to_sym
92
+ child_object = object.send(method)
93
+ return chain_methods(child_object, methods.join(separator), options)
94
+ else
95
+ value = object.send(methods[0].to_sym)
96
+ Acs::Ldap.logger.debug "Acs::Ldap::Mapper chain_method returns '#{value}'"
97
+ return value
98
+ end
99
+ end
100
+
101
+ end
@@ -1,51 +1,43 @@
1
- class Acs::Ldap::Model
1
+ class Acs::Ldap::Pusher
2
2
 
3
+ # connector : Acs::Ldap::Connector instance
4
+ # options[:mapper] : directly set a mapper at initialization
3
5
  def initialize(connector, options = {})
4
6
  @connector = connector
5
- @id = options[:id] || :id
7
+ @mapper = options[:mapper] || nil
6
8
  end
7
9
 
8
- def ou
9
- @ou
10
- end
11
-
12
- def base
13
- "ou=#{ou},#{@connector.base}"
10
+ def mapper=(mapper)
11
+ @mapper = mapper
14
12
  end
15
13
 
16
- def dn(model)
17
- "uid=#{model.send @id},#{base}"
18
- end
19
-
20
- def find_by(key, value)
21
- @connector.search_by(
22
- base,
23
- key,
24
- value
25
- )
14
+ def save(model)
15
+ if exist?(model)
16
+ update(model)
17
+ else
18
+ create(model)
19
+ end
26
20
  end
27
21
 
28
22
  def create(model)
29
- attributes = attributes(model).except!(:uid)
30
- attributes.merge!(objectClass: object_class)
23
+ attributes = @mapper.attributes(model).except!(:uid)
24
+ attributes.merge!(objectClass: @mapper.object_class)
25
+
26
+ Acs::Ldap.logger.debug "Pusher#create dn '#{dn(model)}' attributes '#{attributes.inspect}'"
31
27
 
32
28
  @connector.add(
33
29
  dn(model),
34
- #base,
35
30
  attributes
36
31
  )
37
32
  end
38
33
 
39
34
  def update(model, attributes = nil)
35
+ attributes = @mapper.attributes(model).except(:uid)
40
36
  operations = []
41
- update_attributes = []
42
- update_attributes << attributes
43
- update_attributes.flatten
44
- attributes(model).each do |sym, value|
45
- if attributes == nil || update_attributes.include?(sym)
46
- operations << [:replace, sym.to_s, value] unless sym.to_s == "uid"
47
- end
37
+ attributes.each do |key, value|
38
+ operations << [:replace, key.to_s, value] if attributes.nil? or attributes.include?(key)
48
39
  end
40
+
49
41
  @connector.update(
50
42
  dn(model),
51
43
  operations
@@ -60,6 +52,18 @@ class Acs::Ldap::Model
60
52
  @connector.delete_all(ou)
61
53
  end
62
54
 
55
+ def exist?(model)
56
+ @connector.search({base: dn(model)}).data.length > 0
57
+ end
58
+
59
+ def find_by(key, value)
60
+ @connector.search_by(
61
+ base,
62
+ key,
63
+ value
64
+ )
65
+ end
66
+
63
67
  def count
64
68
  count = 0
65
69
  @connector.search({base: base}).data.each do |entry|
@@ -68,14 +72,18 @@ class Acs::Ldap::Model
68
72
  count
69
73
  end
70
74
 
71
- def exist?(model)
72
- @connector.search({base: dn(model)}).data.length > 0
75
+ protected
76
+
77
+ def ou
78
+ @mapper.ou
73
79
  end
74
80
 
75
- protected
81
+ def base
82
+ "ou=#{ou},#{@connector.base}"
83
+ end
76
84
 
77
- def logger
78
- Acs::Ldap.logger
85
+ def dn(model)
86
+ "uid=#{@mapper.uid(model)},#{base}"
79
87
  end
80
88
 
81
89
  end
@@ -1,5 +1,5 @@
1
1
  module Acs
2
2
  module Ldap
3
- VERSION = "0.1.4"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
data/lib/acs/ldap.rb CHANGED
@@ -5,7 +5,8 @@ require "acs/ldap/version"
5
5
  require "acs/ldap/logger"
6
6
  require "acs/ldap/result"
7
7
  require "acs/ldap/connector"
8
- require "acs/ldap/model"
8
+ require "acs/ldap/pusher"
9
+ require "acs/ldap/mapper"
9
10
 
10
11
  module Acs
11
12
  module Ldap
data/log/acs_ldap.log CHANGED
@@ -0,0 +1,359 @@
1
+ DEBUG : 15-03-20 14:44:00:951 +0400 : LDAP connect
2
+ DEBUG : 15-03-20 14:44:00:951 +0400 : Binding to ldap...
3
+ DEBUG : 15-03-20 14:44:00:951 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
4
+ DEBUG : 15-03-20 14:44:00:963 +0400 : Connection succeed
5
+ INFO : 15-03-20 14:44:00:964 +0400 : Search base '' filter '' attributes ''
6
+ INFO : 15-03-20 14:44:00:979 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1e9bbf1d8 @myhash={:dn=>["dc=adharacs,dc=lan"], :objectclass=>["top", "dcObject", "organization"], :o=>["'LDAP Test'"], :dc=>["adharacs"]}>, #<Net::LDAP::Entry:0x007ff1e9bbda18 @myhash={:dn=>["cn=admin,dc=adharacs,dc=lan"], :objectclass=>["simpleSecurityObject", "organizationalRole"], :cn=>["admin"], :description=>["LDAP administrator"], :userpassword=>["{SSHA}gfWXs6CZOCDlQXMwol0YPSye3w12V/XU"]}>, #<Net::LDAP::Entry:0x007ff1e9bbc8c0 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["people"]}>, #<Net::LDAP::Entry:0x007ff1e9bb7b18 @myhash={:dn=>["ou=mailbox,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["mailbox"]}>, #<Net::LDAP::Entry:0x007ff1e9bb5a48 @myhash={:dn=>["ou=alias,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["alias"]}>, #<Net::LDAP::Entry:0x007ff1eb91bb28 @myhash={:dn=>["ou=mailinglist,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["mailinglist"]}>, #<Net::LDAP::Entry:0x007ff1eb919c38 @myhash={:dn=>["ou=domain,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["domain"]}>, #<Net::LDAP::Entry:0x007ff1eb918900 @myhash={:dn=>["ou=vacation,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["vacation"]}>, #<Net::LDAP::Entry:0x007ff1eb913860 @myhash={:dn=>["ou=backup,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["backup"]}>, #<Net::LDAP::Entry:0x007ff1eb912258 @myhash={:dn=>["ou=vpn,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["vpn"]}>, #<Net::LDAP::Entry:0x007ff1eb910d40 @myhash={:dn=>["ou=service,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["service"]}>, #<Net::LDAP::Entry:0x007ff1eb90b4d0 @myhash={:dn=>["uid=postfix,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["postfix"], :userpassword=>["{SSHA}Eh7VTDYqC8qoZrvSkg68rMSnFoc3J5X3"]}>, #<Net::LDAP::Entry:0x007ff1eb9099c8 @myhash={:dn=>["uid=gnarwl,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["postfix", "gnarwl"], :userpassword=>["{SSHA}WNBFAIOiPCRBrg4aB5jGQBAjDKVeHB6c"]}>, #<Net::LDAP::Entry:0x007ff1e9bafe68 @myhash={:dn=>["uid=dovecot,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["dovecot"], :userpassword=>["{SSHA}hhmido6GNmtGo4iXqj7hdvIPAIxytxYY"]}>, #<Net::LDAP::Entry:0x007ff1e9bae400 @myhash={:dn=>["uid=saslauthd,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["saslauthd"], :userpassword=>["{SSHA}WsKuZD5GxtX8oSGx5ZLd2KUMMoSgNi74"]}>, #<Net::LDAP::Entry:0x007ff1e9bacdd0 @myhash={:dn=>["uid=radicale,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["radicale"], :userpassword=>["{SSHA}PyObb9eltm9LCr1OSVh9qzNhXO54q3K7"]}>, #<Net::LDAP::Entry:0x007ff1e9ba76f0 @myhash={:dn=>["uid=proftpd,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["proftpd"], :userpassword=>["{SSHA}rjeE6bAqX4UhLXLxMKSYT5qoXYjTuT8l"]}>, #<Net::LDAP::Entry:0x007ff1e9ba5e40 @myhash={:dn=>["uid=openvpn,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["openvpn"], :userpassword=>["{SSHA}5vaBhOIqxkNOgfhd4zUQJ3Qij+nCf3Jj"]}>]
7
+ INFO : 15-03-20 14:44:00:980 +0400 : Add dn 'uid=1,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"john.doe", :cn=>"John Doe", :givenName=>"John Doe", :mail=>"john.doe@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
8
+ INFO : 15-03-20 14:44:00:997 +0400 : Add result SUCCESS return code:0, matched_dn: , message:Success, data:nil
9
+ INFO : 15-03-20 14:44:01:009 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '(mail=john.doe@adharacs.lan)' attributes 'mail'
10
+ INFO : 15-03-20 14:44:01:019 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1eb2a2468 @myhash={:dn=>["uid=1,ou=people,dc=adharacs,dc=lan"], :mail=>["john.doe@adharacs.lan"]}>]
11
+ INFO : 15-03-20 14:44:01:020 +0400 : Delete dn 'uid=1,ou=people,dc=adharacs,dc=lan'
12
+ INFO : 15-03-20 14:44:01:030 +0400 : Delete result SUCCESS return code:0, matched_dn: , message:Success, data:nil
13
+ ERROR : 15-03-20 14:44:01:031 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
14
+ DEBUG : 15-03-20 14:44:01:031 +0400 : Acs::Ldap::Mapper chain_method on object '[[[1, 2], 3], 4]' with chain 'shift.shift.shift' separator '.' force_method_calls 'false'
15
+ DEBUG : 15-03-20 14:44:01:032 +0400 : Acs::Ldap::Mapper chain_method on object '[[1, 2], 3]' with chain 'shift.shift' separator '.' force_method_calls 'false'
16
+ DEBUG : 15-03-20 14:44:01:032 +0400 : Acs::Ldap::Mapper chain_method on object '[1, 2]' with chain 'shift' separator '.' force_method_calls 'false'
17
+ DEBUG : 15-03-20 14:44:01:032 +0400 : Acs::Ldap::Mapper chain_method returns '1'
18
+ ERROR : 15-03-20 14:44:01:032 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
19
+ DEBUG : 15-03-20 14:44:01:032 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1ea0b33d8>' with chain 'get' separator '.' force_method_calls 'false'
20
+ DEBUG : 15-03-20 14:44:01:032 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
21
+ ERROR : 15-03-20 14:44:01:032 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
22
+ DEBUG : 15-03-20 14:44:01:032 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1ea0b30e0>' with chain 'get.get' separator '.' force_method_calls 'false'
23
+ DEBUG : 15-03-20 14:44:01:032 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1ea0b31a8>' with chain 'get' separator '.' force_method_calls 'false'
24
+ DEBUG : 15-03-20 14:44:01:032 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
25
+ ERROR : 15-03-20 14:44:01:033 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
26
+ DEBUG : 15-03-20 14:44:01:033 +0400 : Acs::Ldap::Mapper chain_method on object '[[[1, 2], 3], 4]' with chain 'shift:shift:shift' separator ':' force_method_calls 'false'
27
+ DEBUG : 15-03-20 14:44:01:033 +0400 : Acs::Ldap::Mapper chain_method on object '[[1, 2], 3]' with chain 'shift:shift' separator ':' force_method_calls 'false'
28
+ DEBUG : 15-03-20 14:44:01:033 +0400 : Acs::Ldap::Mapper chain_method on object '[1, 2]' with chain 'shift' separator ':' force_method_calls 'false'
29
+ DEBUG : 15-03-20 14:44:01:034 +0400 : Acs::Ldap::Mapper chain_method returns '1'
30
+ ERROR : 15-03-20 14:44:01:034 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
31
+ DEBUG : 15-03-20 14:44:01:034 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1eb281bf0>' with chain 'get:get' separator ':' force_method_calls 'false'
32
+ DEBUG : 15-03-20 14:44:01:034 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1eb281e98>' with chain 'get' separator ':' force_method_calls 'false'
33
+ DEBUG : 15-03-20 14:44:01:034 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
34
+ ERROR : 15-03-20 14:44:01:035 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
35
+ DEBUG : 15-03-20 14:44:01:035 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1e9b36a90>' with chain 'get.get' separator '.' force_method_calls 'false'
36
+ DEBUG : 15-03-20 14:44:01:035 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1e9b36b30>' with chain 'get' separator '.' force_method_calls 'false'
37
+ DEBUG : 15-03-20 14:44:01:035 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
38
+ ERROR : 15-03-20 14:44:01:035 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
39
+ DEBUG : 15-03-20 14:44:01:035 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1e9b36ef0>' with chain 'get' separator '.' force_method_calls 'false'
40
+ DEBUG : 15-03-20 14:44:01:035 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
41
+ ERROR : 15-03-20 14:44:01:036 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
42
+ DEBUG : 15-03-20 14:44:01:036 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1e9b25bf0>' with chain 'get.get' separator '.' force_method_calls 'false'
43
+ DEBUG : 15-03-20 14:44:01:036 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1e9b26460>' with chain 'get' separator '.' force_method_calls 'false'
44
+ DEBUG : 15-03-20 14:44:01:036 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
45
+ ERROR : 15-03-20 14:44:01:036 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
46
+ DEBUG : 15-03-20 14:44:01:037 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1e9b26938>' with chain 'get' separator '.' force_method_calls 'false'
47
+ DEBUG : 15-03-20 14:44:01:037 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
48
+ ERROR : 15-03-20 14:44:01:037 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
49
+ DEBUG : 15-03-20 14:44:01:037 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1e9b04c20>' with chain 'get' separator '.' force_method_calls 'false'
50
+ DEBUG : 15-03-20 14:44:01:038 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
51
+ DEBUG : 15-03-20 14:44:01:038 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007ff1e9b04c20>' with chain 'get2' separator '.' force_method_calls 'false'
52
+ DEBUG : 15-03-20 14:44:01:038 +0400 : Acs::Ldap::Mapper chain_method returns 'value2'
53
+ INFO : 15-03-20 14:44:01:038 +0400 : Delete all ou=people
54
+ INFO : 15-03-20 14:44:01:039 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes 'uid'
55
+ DEBUG : 15-03-20 14:44:01:039 +0400 : LDAP connect
56
+ DEBUG : 15-03-20 14:44:01:039 +0400 : Binding to ldap...
57
+ DEBUG : 15-03-20 14:44:01:039 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
58
+ DEBUG : 15-03-20 14:44:01:045 +0400 : Connection succeed
59
+ INFO : 15-03-20 14:44:01:062 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1eb230fc0 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"]}>]
60
+ INFO : 15-03-20 14:44:01:062 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes ''
61
+ INFO : 15-03-20 14:44:01:072 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1eb212db8 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["people"]}>]
62
+ INFO : 15-03-20 14:44:01:073 +0400 : Add dn 'uid=2,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :mail=>"dvador@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
63
+ INFO : 15-03-20 14:44:01:080 +0400 : Add result SUCCESS return code:0, matched_dn: , message:Success, data:nil
64
+ INFO : 15-03-20 14:44:01:080 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes ''
65
+ INFO : 15-03-20 14:44:01:086 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1eb1a1f78 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["people"]}>, #<Net::LDAP::Entry:0x007ff1eb19b678 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :sn=>["dark.vador"], :cn=>["dark.vador"], :givenname=>["Dark Vador"], :mail=>["dvador@adharacs.lan"], :userpassword=>["{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1"], :objectclass=>["organizationalPerson", "person", "top", "extensibleObject"], :uid=>["2"]}>]
66
+ INFO : 15-03-20 14:44:01:087 +0400 : Modify dn 'uid=2,ou=people,dc=adharacs,dc=lan' operations '[[:replace, "givenName", "Vador Dark"]]'
67
+ INFO : 15-03-20 14:44:01:103 +0400 : Modify result SUCCESS return code:0, matched_dn: , message:Success, data:nil
68
+ INFO : 15-03-20 14:44:01:103 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '(uid=2)' attributes ''
69
+ INFO : 15-03-20 14:44:01:113 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1e9a470f8 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :sn=>["dark.vador"], :cn=>["dark.vador"], :mail=>["dvador@adharacs.lan"], :userpassword=>["{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1"], :objectclass=>["organizationalPerson", "person", "top", "extensibleObject"], :uid=>["2"], :givenname=>["Vador Dark"]}>]
70
+ INFO : 15-03-20 14:44:01:114 +0400 : Delete dn 'uid=2,ou=people,dc=adharacs,dc=lan'
71
+ INFO : 15-03-20 14:44:01:127 +0400 : Delete result SUCCESS return code:0, matched_dn: , message:Success, data:nil
72
+ INFO : 15-03-20 14:44:01:127 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes ''
73
+ INFO : 15-03-20 14:44:01:139 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1e9a2ff48 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["people"]}>]
74
+ INFO : 15-03-20 14:44:01:140 +0400 : Delete all ou=people
75
+ INFO : 15-03-20 14:44:01:140 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes 'uid'
76
+ INFO : 15-03-20 14:44:01:149 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1eb0bad30 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"]}>]
77
+ INFO : 15-03-20 14:44:01:149 +0400 : Search base 'uid=2,ou=people,dc=adharacs,dc=lan' filter '' attributes ''
78
+ INFO : 15-03-20 14:44:01:160 +0400 : Search result ERROR return code:32, matched_dn: ou=people,dc=adharacs,dc=lan, message:No Such Object, data:[]
79
+ INFO : 15-03-20 14:44:01:160 +0400 : Add dn 'uid=2,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :mail=>"dvador@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
80
+ INFO : 15-03-20 14:44:01:181 +0400 : Add result SUCCESS return code:0, matched_dn: , message:Success, data:nil
81
+ INFO : 15-03-20 14:44:01:182 +0400 : Search base 'uid=2,ou=people,dc=adharacs,dc=lan' filter '' attributes ''
82
+ INFO : 15-03-20 14:44:01:191 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1eb551678 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :sn=>["dark.vador"], :cn=>["dark.vador"], :givenname=>["Vador Dark"], :mail=>["dvador@adharacs.lan"], :userpassword=>["{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1"], :objectclass=>["organizationalPerson", "person", "top", "extensibleObject"], :uid=>["2"]}>]
83
+ INFO : 15-03-20 14:44:01:191 +0400 : Delete all ou=people
84
+ INFO : 15-03-20 14:44:01:191 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes 'uid'
85
+ INFO : 15-03-20 14:44:01:200 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1eb963db0 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"]}>, #<Net::LDAP::Entry:0x007ff1eb963630 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :uid=>["2"]}>]
86
+ INFO : 15-03-20 14:44:01:200 +0400 : Delete dn 'uid=2,ou=people,dc=adharacs,dc=lan'
87
+ INFO : 15-03-20 14:44:01:207 +0400 : Delete result SUCCESS return code:0, matched_dn: , message:Success, data:nil
88
+ ERROR : 15-03-20 14:44:01:208 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'true'
89
+ INFO : 15-03-20 14:44:01:208 +0400 : Delete all ou=people
90
+ INFO : 15-03-20 14:44:01:209 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes 'uid'
91
+ DEBUG : 15-03-20 14:44:01:209 +0400 : LDAP connect
92
+ DEBUG : 15-03-20 14:44:01:209 +0400 : Binding to ldap...
93
+ DEBUG : 15-03-20 14:44:01:209 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
94
+ DEBUG : 15-03-20 14:44:01:215 +0400 : Connection succeed
95
+ INFO : 15-03-20 14:44:01:243 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1e9e3f868 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"]}>]
96
+ INFO : 15-03-20 14:44:01:243 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes ''
97
+ INFO : 15-03-20 14:44:01:249 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1ea14b610 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["people"]}>]
98
+ ERROR : 15-03-20 14:44:01:249 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'true'
99
+ DEBUG : 15-03-20 14:44:01:250 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
100
+ DEBUG : 15-03-20 14:44:01:250 +0400 : Acs::Ldap::Mapper chain_method returns '2'
101
+ DEBUG : 15-03-20 14:44:01:250 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'sn' separator '.' force_method_calls 'true'
102
+ DEBUG : 15-03-20 14:44:01:250 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
103
+ DEBUG : 15-03-20 14:44:01:250 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'cn' separator '.' force_method_calls 'true'
104
+ DEBUG : 15-03-20 14:44:01:250 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
105
+ DEBUG : 15-03-20 14:44:01:250 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'givenName' separator '.' force_method_calls 'true'
106
+ DEBUG : 15-03-20 14:44:01:250 +0400 : Acs::Ldap::Mapper chain_method returns 'Dark Vador'
107
+ DEBUG : 15-03-20 14:44:01:251 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'mail' separator '.' force_method_calls 'true'
108
+ DEBUG : 15-03-20 14:44:01:251 +0400 : Acs::Ldap::Mapper chain_method returns 'dvador@adharacs.lan'
109
+ DEBUG : 15-03-20 14:44:01:251 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'userPassword' separator '.' force_method_calls 'true'
110
+ DEBUG : 15-03-20 14:44:01:251 +0400 : Acs::Ldap::Mapper chain_method returns '{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1'
111
+ DEBUG : 15-03-20 14:44:01:251 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
112
+ DEBUG : 15-03-20 14:44:01:251 +0400 : Acs::Ldap::Mapper chain_method returns '2'
113
+ DEBUG : 15-03-20 14:44:01:251 +0400 : Pusher#create dn 'uid=2,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :mail=>"dvador@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
114
+ DEBUG : 15-03-20 14:44:01:252 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
115
+ DEBUG : 15-03-20 14:44:01:252 +0400 : Acs::Ldap::Mapper chain_method returns '2'
116
+ INFO : 15-03-20 14:44:01:252 +0400 : Add dn 'uid=2,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :mail=>"dvador@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
117
+ DEBUG : 15-03-20 14:44:01:252 +0400 : LDAP connect
118
+ DEBUG : 15-03-20 14:44:01:252 +0400 : Binding to ldap...
119
+ DEBUG : 15-03-20 14:44:01:252 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
120
+ DEBUG : 15-03-20 14:44:01:258 +0400 : Connection succeed
121
+ INFO : 15-03-20 14:44:01:266 +0400 : Add result SUCCESS return code:0, matched_dn: , message:Success, data:nil
122
+ INFO : 15-03-20 14:44:01:266 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes ''
123
+ INFO : 15-03-20 14:44:01:284 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1e9de4ad0 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["people"]}>, #<Net::LDAP::Entry:0x007ff1eb56abf0 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :sn=>["dark.vador"], :cn=>["dark.vador"], :givenname=>["Dark Vador"], :mail=>["dvador@adharacs.lan"], :userpassword=>["{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1"], :objectclass=>["organizationalPerson", "person", "top", "extensibleObject"], :uid=>["2"]}>]
124
+ ERROR : 15-03-20 14:44:01:285 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'true'
125
+ DEBUG : 15-03-20 14:44:01:285 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
126
+ DEBUG : 15-03-20 14:44:01:285 +0400 : Acs::Ldap::Mapper chain_method returns '2'
127
+ DEBUG : 15-03-20 14:44:01:285 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'sn' separator '.' force_method_calls 'true'
128
+ DEBUG : 15-03-20 14:44:01:286 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
129
+ DEBUG : 15-03-20 14:44:01:286 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'cn' separator '.' force_method_calls 'true'
130
+ DEBUG : 15-03-20 14:44:01:286 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
131
+ DEBUG : 15-03-20 14:44:01:286 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'givenName' separator '.' force_method_calls 'true'
132
+ DEBUG : 15-03-20 14:44:01:286 +0400 : Acs::Ldap::Mapper chain_method returns 'Vador Dark'
133
+ DEBUG : 15-03-20 14:44:01:286 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'mail' separator '.' force_method_calls 'true'
134
+ DEBUG : 15-03-20 14:44:01:286 +0400 : Acs::Ldap::Mapper chain_method returns 'dvador@adharacs.lan'
135
+ DEBUG : 15-03-20 14:44:01:287 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'userPassword' separator '.' force_method_calls 'true'
136
+ DEBUG : 15-03-20 14:44:01:287 +0400 : Acs::Ldap::Mapper chain_method returns '{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1'
137
+ DEBUG : 15-03-20 14:44:01:287 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
138
+ DEBUG : 15-03-20 14:44:01:287 +0400 : Acs::Ldap::Mapper chain_method returns '2'
139
+ INFO : 15-03-20 14:44:01:288 +0400 : Modify dn 'uid=2,ou=people,dc=adharacs,dc=lan' operations '[[:replace, "sn", "dark.vador"], [:replace, "cn", "dark.vador"], [:replace, "givenName", "Vador Dark"], [:replace, "mail", "dvador@adharacs.lan"], [:replace, "userPassword", "{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1"]]'
140
+ DEBUG : 15-03-20 14:44:01:288 +0400 : LDAP connect
141
+ DEBUG : 15-03-20 14:44:01:288 +0400 : Binding to ldap...
142
+ DEBUG : 15-03-20 14:44:01:288 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
143
+ DEBUG : 15-03-20 14:44:01:293 +0400 : Connection succeed
144
+ INFO : 15-03-20 14:44:01:300 +0400 : Modify result SUCCESS return code:0, matched_dn: , message:Success, data:nil
145
+ INFO : 15-03-20 14:44:01:301 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '(uid=2)' attributes ''
146
+ INFO : 15-03-20 14:44:01:326 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1eb98b720 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalPerson", "person", "top", "extensibleObject"], :uid=>["2"], :sn=>["dark.vador"], :cn=>["dark.vador"], :givenname=>["Vador Dark"], :mail=>["dvador@adharacs.lan"], :userpassword=>["{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1"]}>]
147
+ ERROR : 15-03-20 14:44:01:326 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'true'
148
+ DEBUG : 15-03-20 14:44:01:326 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
149
+ DEBUG : 15-03-20 14:44:01:327 +0400 : Acs::Ldap::Mapper chain_method returns '2'
150
+ INFO : 15-03-20 14:44:01:327 +0400 : Delete dn 'uid=2,ou=people,dc=adharacs,dc=lan'
151
+ DEBUG : 15-03-20 14:44:01:327 +0400 : LDAP connect
152
+ DEBUG : 15-03-20 14:44:01:327 +0400 : Binding to ldap...
153
+ DEBUG : 15-03-20 14:44:01:327 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
154
+ DEBUG : 15-03-20 14:44:01:331 +0400 : Connection succeed
155
+ INFO : 15-03-20 14:44:01:341 +0400 : Delete result SUCCESS return code:0, matched_dn: , message:Success, data:nil
156
+ INFO : 15-03-20 14:44:01:341 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes ''
157
+ INFO : 15-03-20 14:44:01:353 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1eb991670 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["people"]}>]
158
+ ERROR : 15-03-20 14:44:01:353 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'true'
159
+ INFO : 15-03-20 14:44:01:354 +0400 : Delete all ou=people
160
+ INFO : 15-03-20 14:44:01:354 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes 'uid'
161
+ DEBUG : 15-03-20 14:44:01:354 +0400 : LDAP connect
162
+ DEBUG : 15-03-20 14:44:01:354 +0400 : Binding to ldap...
163
+ DEBUG : 15-03-20 14:44:01:354 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
164
+ DEBUG : 15-03-20 14:44:01:361 +0400 : Connection succeed
165
+ INFO : 15-03-20 14:44:01:377 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1e9e57670 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"]}>]
166
+ DEBUG : 15-03-20 14:44:01:377 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
167
+ DEBUG : 15-03-20 14:44:01:377 +0400 : Acs::Ldap::Mapper chain_method returns '2'
168
+ INFO : 15-03-20 14:44:01:378 +0400 : Search base 'uid=2,ou=people,dc=adharacs,dc=lan' filter '' attributes ''
169
+ INFO : 15-03-20 14:44:01:386 +0400 : Search result ERROR return code:32, matched_dn: ou=people,dc=adharacs,dc=lan, message:No Such Object, data:[]
170
+ DEBUG : 15-03-20 14:44:01:387 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
171
+ DEBUG : 15-03-20 14:44:01:387 +0400 : Acs::Ldap::Mapper chain_method returns '2'
172
+ DEBUG : 15-03-20 14:44:01:387 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'sn' separator '.' force_method_calls 'true'
173
+ DEBUG : 15-03-20 14:44:01:387 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
174
+ DEBUG : 15-03-20 14:44:01:387 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'cn' separator '.' force_method_calls 'true'
175
+ DEBUG : 15-03-20 14:44:01:388 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
176
+ DEBUG : 15-03-20 14:44:01:388 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'givenName' separator '.' force_method_calls 'true'
177
+ DEBUG : 15-03-20 14:44:01:388 +0400 : Acs::Ldap::Mapper chain_method returns 'Dark Vador'
178
+ DEBUG : 15-03-20 14:44:01:388 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'mail' separator '.' force_method_calls 'true'
179
+ DEBUG : 15-03-20 14:44:01:389 +0400 : Acs::Ldap::Mapper chain_method returns 'dvador@adharacs.lan'
180
+ DEBUG : 15-03-20 14:44:01:389 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'userPassword' separator '.' force_method_calls 'true'
181
+ DEBUG : 15-03-20 14:44:01:389 +0400 : Acs::Ldap::Mapper chain_method returns '{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1'
182
+ DEBUG : 15-03-20 14:44:01:389 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
183
+ DEBUG : 15-03-20 14:44:01:389 +0400 : Acs::Ldap::Mapper chain_method returns '2'
184
+ DEBUG : 15-03-20 14:44:01:389 +0400 : Pusher#create dn 'uid=2,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :mail=>"dvador@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
185
+ DEBUG : 15-03-20 14:44:01:389 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
186
+ DEBUG : 15-03-20 14:44:01:390 +0400 : Acs::Ldap::Mapper chain_method returns '2'
187
+ INFO : 15-03-20 14:44:01:390 +0400 : Add dn 'uid=2,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :mail=>"dvador@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
188
+ INFO : 15-03-20 14:44:01:410 +0400 : Add result SUCCESS return code:0, matched_dn: , message:Success, data:nil
189
+ DEBUG : 15-03-20 14:44:01:411 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
190
+ DEBUG : 15-03-20 14:44:01:411 +0400 : Acs::Ldap::Mapper chain_method returns '2'
191
+ INFO : 15-03-20 14:44:01:411 +0400 : Search base 'uid=2,ou=people,dc=adharacs,dc=lan' filter '' attributes ''
192
+ INFO : 15-03-20 14:44:01:420 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1e9e6c5c0 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :sn=>["dark.vador"], :cn=>["dark.vador"], :givenname=>["Dark Vador"], :mail=>["dvador@adharacs.lan"], :userpassword=>["{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1"], :objectclass=>["organizationalPerson", "person", "top", "extensibleObject"], :uid=>["2"]}>]
193
+ INFO : 15-03-20 14:44:01:420 +0400 : Delete all ou=people
194
+ INFO : 15-03-20 14:44:01:420 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes 'uid'
195
+ INFO : 15-03-20 14:44:01:425 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007ff1e9e744c8 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"]}>, #<Net::LDAP::Entry:0x007ff1e9dafb78 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :uid=>["2"]}>]
196
+ INFO : 15-03-20 14:44:01:425 +0400 : Delete dn 'uid=2,ou=people,dc=adharacs,dc=lan'
197
+ INFO : 15-03-20 14:44:01:436 +0400 : Delete result SUCCESS return code:0, matched_dn: , message:Success, data:nil
198
+ DEBUG : 15-03-20 15:00:55:193 +0400 : LDAP connect
199
+ DEBUG : 15-03-20 15:00:55:193 +0400 : Binding to ldap...
200
+ DEBUG : 15-03-20 15:00:55:193 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
201
+ DEBUG : 15-03-20 15:00:55:220 +0400 : Connection succeed
202
+ INFO : 15-03-20 15:00:55:222 +0400 : Search base '' filter '' attributes ''
203
+ INFO : 15-03-20 15:00:55:280 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007fd3b1ac6200 @myhash={:dn=>["dc=adharacs,dc=lan"], :objectclass=>["top", "dcObject", "organization"], :o=>["'LDAP Test'"], :dc=>["adharacs"]}>, #<Net::LDAP::Entry:0x007fd3b1ac4180 @myhash={:dn=>["cn=admin,dc=adharacs,dc=lan"], :objectclass=>["simpleSecurityObject", "organizationalRole"], :cn=>["admin"], :description=>["LDAP administrator"], :userpassword=>["{SSHA}gfWXs6CZOCDlQXMwol0YPSye3w12V/XU"]}>, #<Net::LDAP::Entry:0x007fd3b192e618 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["people"]}>, #<Net::LDAP::Entry:0x007fd3b192cc78 @myhash={:dn=>["ou=mailbox,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["mailbox"]}>, #<Net::LDAP::Entry:0x007fd3b1927458 @myhash={:dn=>["ou=alias,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["alias"]}>, #<Net::LDAP::Entry:0x007fd3b1925f90 @myhash={:dn=>["ou=mailinglist,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["mailinglist"]}>, #<Net::LDAP::Entry:0x007fd3b19247d0 @myhash={:dn=>["ou=domain,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["domain"]}>, #<Net::LDAP::Entry:0x007fd3b2bff1c0 @myhash={:dn=>["ou=vacation,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["vacation"]}>, #<Net::LDAP::Entry:0x007fd3b2bfd910 @myhash={:dn=>["ou=backup,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["backup"]}>, #<Net::LDAP::Entry:0x007fd3b2bfc6f0 @myhash={:dn=>["ou=vpn,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["vpn"]}>, #<Net::LDAP::Entry:0x007fd3b2bf73d0 @myhash={:dn=>["ou=service,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["service"]}>, #<Net::LDAP::Entry:0x007fd3b2bf5968 @myhash={:dn=>["uid=postfix,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["postfix"], :userpassword=>["{SSHA}Eh7VTDYqC8qoZrvSkg68rMSnFoc3J5X3"]}>, #<Net::LDAP::Entry:0x007fd3b2bf78d0 @myhash={:dn=>["uid=gnarwl,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["postfix", "gnarwl"], :userpassword=>["{SSHA}WNBFAIOiPCRBrg4aB5jGQBAjDKVeHB6c"]}>, #<Net::LDAP::Entry:0x007fd3b2bed8a8 @myhash={:dn=>["uid=dovecot,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["dovecot"], :userpassword=>["{SSHA}hhmido6GNmtGo4iXqj7hdvIPAIxytxYY"]}>, #<Net::LDAP::Entry:0x007fd3b2be74a8 @myhash={:dn=>["uid=saslauthd,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["saslauthd"], :userpassword=>["{SSHA}WsKuZD5GxtX8oSGx5ZLd2KUMMoSgNi74"]}>, #<Net::LDAP::Entry:0x007fd3b2be5310 @myhash={:dn=>["uid=radicale,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["radicale"], :userpassword=>["{SSHA}PyObb9eltm9LCr1OSVh9qzNhXO54q3K7"]}>, #<Net::LDAP::Entry:0x007fd3b2bdf690 @myhash={:dn=>["uid=proftpd,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["proftpd"], :userpassword=>["{SSHA}rjeE6bAqX4UhLXLxMKSYT5qoXYjTuT8l"]}>, #<Net::LDAP::Entry:0x007fd3b2bddfc0 @myhash={:dn=>["uid=openvpn,ou=service,dc=adharacs,dc=lan"], :objectclass=>["account", "simpleSecurityObject", "top"], :uid=>["openvpn"], :userpassword=>["{SSHA}5vaBhOIqxkNOgfhd4zUQJ3Qij+nCf3Jj"]}>]
204
+ INFO : 15-03-20 15:00:55:293 +0400 : Add dn 'uid=1,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"john.doe", :cn=>"John Doe", :givenName=>"John Doe", :mail=>"john.doe@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
205
+ INFO : 15-03-20 15:00:55:317 +0400 : Add result SUCCESS return code:0, matched_dn: , message:Success, data:nil
206
+ INFO : 15-03-20 15:00:55:321 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '(mail=john.doe@adharacs.lan)' attributes 'mail'
207
+ INFO : 15-03-20 15:00:55:333 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007fd3b2a7f278 @myhash={:dn=>["uid=1,ou=people,dc=adharacs,dc=lan"], :mail=>["john.doe@adharacs.lan"]}>]
208
+ INFO : 15-03-20 15:00:55:333 +0400 : Delete dn 'uid=1,ou=people,dc=adharacs,dc=lan'
209
+ INFO : 15-03-20 15:00:55:349 +0400 : Delete result SUCCESS return code:0, matched_dn: , message:Success, data:nil
210
+ ERROR : 15-03-20 15:00:55:350 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
211
+ DEBUG : 15-03-20 15:00:55:350 +0400 : Acs::Ldap::Mapper chain_method on object '[[[1, 2], 3], 4]' with chain 'shift.shift.shift' separator '.' force_method_calls 'false'
212
+ DEBUG : 15-03-20 15:00:55:350 +0400 : Acs::Ldap::Mapper chain_method on object '[[1, 2], 3]' with chain 'shift.shift' separator '.' force_method_calls 'false'
213
+ DEBUG : 15-03-20 15:00:55:350 +0400 : Acs::Ldap::Mapper chain_method on object '[1, 2]' with chain 'shift' separator '.' force_method_calls 'false'
214
+ DEBUG : 15-03-20 15:00:55:350 +0400 : Acs::Ldap::Mapper chain_method returns '1'
215
+ ERROR : 15-03-20 15:00:55:350 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
216
+ DEBUG : 15-03-20 15:00:55:350 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b2ac4bc0>' with chain 'get' separator '.' force_method_calls 'false'
217
+ DEBUG : 15-03-20 15:00:55:351 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
218
+ ERROR : 15-03-20 15:00:55:351 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
219
+ DEBUG : 15-03-20 15:00:55:351 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b2ac4a58>' with chain 'get.get' separator '.' force_method_calls 'false'
220
+ DEBUG : 15-03-20 15:00:55:351 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b2ac4b48>' with chain 'get' separator '.' force_method_calls 'false'
221
+ DEBUG : 15-03-20 15:00:55:351 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
222
+ ERROR : 15-03-20 15:00:55:352 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
223
+ DEBUG : 15-03-20 15:00:55:352 +0400 : Acs::Ldap::Mapper chain_method on object '[[[1, 2], 3], 4]' with chain 'shift:shift:shift' separator ':' force_method_calls 'false'
224
+ DEBUG : 15-03-20 15:00:55:352 +0400 : Acs::Ldap::Mapper chain_method on object '[[1, 2], 3]' with chain 'shift:shift' separator ':' force_method_calls 'false'
225
+ DEBUG : 15-03-20 15:00:55:352 +0400 : Acs::Ldap::Mapper chain_method on object '[1, 2]' with chain 'shift' separator ':' force_method_calls 'false'
226
+ DEBUG : 15-03-20 15:00:55:352 +0400 : Acs::Ldap::Mapper chain_method returns '1'
227
+ ERROR : 15-03-20 15:00:55:352 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
228
+ DEBUG : 15-03-20 15:00:55:352 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b1aa6b30>' with chain 'get:get' separator ':' force_method_calls 'false'
229
+ DEBUG : 15-03-20 15:00:55:353 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b1aa6e28>' with chain 'get' separator ':' force_method_calls 'false'
230
+ DEBUG : 15-03-20 15:00:55:353 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
231
+ ERROR : 15-03-20 15:00:55:353 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
232
+ DEBUG : 15-03-20 15:00:55:354 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b2b76b18>' with chain 'get.get' separator '.' force_method_calls 'false'
233
+ DEBUG : 15-03-20 15:00:55:354 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b2b76b68>' with chain 'get' separator '.' force_method_calls 'false'
234
+ DEBUG : 15-03-20 15:00:55:354 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
235
+ ERROR : 15-03-20 15:00:55:354 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
236
+ DEBUG : 15-03-20 15:00:55:354 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b2b76d48>' with chain 'get' separator '.' force_method_calls 'false'
237
+ DEBUG : 15-03-20 15:00:55:354 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
238
+ ERROR : 15-03-20 15:00:55:355 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
239
+ DEBUG : 15-03-20 15:00:55:355 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b1a87f28>' with chain 'get.get' separator '.' force_method_calls 'false'
240
+ DEBUG : 15-03-20 15:00:55:355 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b1a8fe80>' with chain 'get' separator '.' force_method_calls 'false'
241
+ DEBUG : 15-03-20 15:00:55:356 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
242
+ ERROR : 15-03-20 15:00:55:356 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
243
+ DEBUG : 15-03-20 15:00:55:356 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b1a8f200>' with chain 'get' separator '.' force_method_calls 'false'
244
+ DEBUG : 15-03-20 15:00:55:356 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
245
+ ERROR : 15-03-20 15:00:55:357 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'false'
246
+ DEBUG : 15-03-20 15:00:55:357 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b1a6f9f0>' with chain 'get' separator '.' force_method_calls 'false'
247
+ DEBUG : 15-03-20 15:00:55:357 +0400 : Acs::Ldap::Mapper chain_method returns 'test'
248
+ DEBUG : 15-03-20 15:00:55:357 +0400 : Acs::Ldap::Mapper chain_method on object '#<TestObject:0x007fd3b1a6f9f0>' with chain 'get2' separator '.' force_method_calls 'false'
249
+ DEBUG : 15-03-20 15:00:55:357 +0400 : Acs::Ldap::Mapper chain_method returns 'value2'
250
+ ERROR : 15-03-20 15:00:55:358 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'true'
251
+ INFO : 15-03-20 15:00:55:358 +0400 : Delete all ou=people
252
+ INFO : 15-03-20 15:00:55:358 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes 'uid'
253
+ DEBUG : 15-03-20 15:00:55:358 +0400 : LDAP connect
254
+ DEBUG : 15-03-20 15:00:55:358 +0400 : Binding to ldap...
255
+ DEBUG : 15-03-20 15:00:55:358 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
256
+ DEBUG : 15-03-20 15:00:55:368 +0400 : Connection succeed
257
+ INFO : 15-03-20 15:00:55:393 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007fd3b19ff4e8 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"]}>]
258
+ INFO : 15-03-20 15:00:55:393 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes ''
259
+ INFO : 15-03-20 15:00:55:403 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007fd3b19ddb68 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["people"]}>]
260
+ ERROR : 15-03-20 15:00:55:404 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'true'
261
+ DEBUG : 15-03-20 15:00:55:404 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
262
+ DEBUG : 15-03-20 15:00:55:404 +0400 : Acs::Ldap::Mapper chain_method returns '2'
263
+ DEBUG : 15-03-20 15:00:55:404 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'sn' separator '.' force_method_calls 'true'
264
+ DEBUG : 15-03-20 15:00:55:404 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
265
+ DEBUG : 15-03-20 15:00:55:404 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'cn' separator '.' force_method_calls 'true'
266
+ DEBUG : 15-03-20 15:00:55:404 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
267
+ DEBUG : 15-03-20 15:00:55:405 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'givenName' separator '.' force_method_calls 'true'
268
+ DEBUG : 15-03-20 15:00:55:405 +0400 : Acs::Ldap::Mapper chain_method returns 'Dark Vador'
269
+ DEBUG : 15-03-20 15:00:55:405 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'mail' separator '.' force_method_calls 'true'
270
+ DEBUG : 15-03-20 15:00:55:405 +0400 : Acs::Ldap::Mapper chain_method returns 'dvador@adharacs.lan'
271
+ DEBUG : 15-03-20 15:00:55:405 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'userPassword' separator '.' force_method_calls 'true'
272
+ DEBUG : 15-03-20 15:00:55:405 +0400 : Acs::Ldap::Mapper chain_method returns '{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1'
273
+ DEBUG : 15-03-20 15:00:55:405 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
274
+ DEBUG : 15-03-20 15:00:55:405 +0400 : Acs::Ldap::Mapper chain_method returns '2'
275
+ DEBUG : 15-03-20 15:00:55:406 +0400 : Pusher#create dn 'uid=2,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :mail=>"dvador@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
276
+ DEBUG : 15-03-20 15:00:55:406 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
277
+ DEBUG : 15-03-20 15:00:55:406 +0400 : Acs::Ldap::Mapper chain_method returns '2'
278
+ INFO : 15-03-20 15:00:55:406 +0400 : Add dn 'uid=2,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :mail=>"dvador@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
279
+ DEBUG : 15-03-20 15:00:55:406 +0400 : LDAP connect
280
+ DEBUG : 15-03-20 15:00:55:406 +0400 : Binding to ldap...
281
+ DEBUG : 15-03-20 15:00:55:406 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
282
+ DEBUG : 15-03-20 15:00:55:413 +0400 : Connection succeed
283
+ INFO : 15-03-20 15:00:55:435 +0400 : Add result SUCCESS return code:0, matched_dn: , message:Success, data:nil
284
+ INFO : 15-03-20 15:00:55:436 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes ''
285
+ INFO : 15-03-20 15:00:55:463 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007fd3b2a67218 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["people"]}>, #<Net::LDAP::Entry:0x007fd3b196e7e0 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :sn=>["dark.vador"], :cn=>["dark.vador"], :givenname=>["Dark Vador"], :mail=>["dvador@adharacs.lan"], :userpassword=>["{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1"], :objectclass=>["organizationalPerson", "person", "top", "extensibleObject"], :uid=>["2"]}>]
286
+ ERROR : 15-03-20 15:00:55:463 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'true'
287
+ DEBUG : 15-03-20 15:00:55:463 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
288
+ DEBUG : 15-03-20 15:00:55:463 +0400 : Acs::Ldap::Mapper chain_method returns '2'
289
+ DEBUG : 15-03-20 15:00:55:463 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'sn' separator '.' force_method_calls 'true'
290
+ DEBUG : 15-03-20 15:00:55:464 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
291
+ DEBUG : 15-03-20 15:00:55:464 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'cn' separator '.' force_method_calls 'true'
292
+ DEBUG : 15-03-20 15:00:55:464 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
293
+ DEBUG : 15-03-20 15:00:55:464 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'givenName' separator '.' force_method_calls 'true'
294
+ DEBUG : 15-03-20 15:00:55:464 +0400 : Acs::Ldap::Mapper chain_method returns 'Vador Dark'
295
+ DEBUG : 15-03-20 15:00:55:464 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'mail' separator '.' force_method_calls 'true'
296
+ DEBUG : 15-03-20 15:00:55:464 +0400 : Acs::Ldap::Mapper chain_method returns 'dvador@adharacs.lan'
297
+ DEBUG : 15-03-20 15:00:55:464 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'userPassword' separator '.' force_method_calls 'true'
298
+ DEBUG : 15-03-20 15:00:55:464 +0400 : Acs::Ldap::Mapper chain_method returns '{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1'
299
+ DEBUG : 15-03-20 15:00:55:465 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Vador Dark", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
300
+ DEBUG : 15-03-20 15:00:55:465 +0400 : Acs::Ldap::Mapper chain_method returns '2'
301
+ INFO : 15-03-20 15:00:55:465 +0400 : Modify dn 'uid=2,ou=people,dc=adharacs,dc=lan' operations '[[:replace, "sn", "dark.vador"], [:replace, "cn", "dark.vador"], [:replace, "givenName", "Vador Dark"], [:replace, "mail", "dvador@adharacs.lan"], [:replace, "userPassword", "{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1"]]'
302
+ DEBUG : 15-03-20 15:00:55:465 +0400 : LDAP connect
303
+ DEBUG : 15-03-20 15:00:55:466 +0400 : Binding to ldap...
304
+ DEBUG : 15-03-20 15:00:55:466 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
305
+ DEBUG : 15-03-20 15:00:55:471 +0400 : Connection succeed
306
+ INFO : 15-03-20 15:00:55:479 +0400 : Modify result SUCCESS return code:0, matched_dn: , message:Success, data:nil
307
+ INFO : 15-03-20 15:00:55:479 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '(uid=2)' attributes ''
308
+ INFO : 15-03-20 15:00:55:501 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007fd3b18b48b8 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalPerson", "person", "top", "extensibleObject"], :uid=>["2"], :sn=>["dark.vador"], :cn=>["dark.vador"], :givenname=>["Vador Dark"], :mail=>["dvador@adharacs.lan"], :userpassword=>["{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1"]}>]
309
+ ERROR : 15-03-20 15:00:55:501 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'true'
310
+ DEBUG : 15-03-20 15:00:55:501 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
311
+ DEBUG : 15-03-20 15:00:55:502 +0400 : Acs::Ldap::Mapper chain_method returns '2'
312
+ INFO : 15-03-20 15:00:55:502 +0400 : Delete dn 'uid=2,ou=people,dc=adharacs,dc=lan'
313
+ DEBUG : 15-03-20 15:00:55:502 +0400 : LDAP connect
314
+ DEBUG : 15-03-20 15:00:55:502 +0400 : Binding to ldap...
315
+ DEBUG : 15-03-20 15:00:55:502 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
316
+ DEBUG : 15-03-20 15:00:55:512 +0400 : Connection succeed
317
+ INFO : 15-03-20 15:00:55:540 +0400 : Delete result SUCCESS return code:0, matched_dn: , message:Success, data:nil
318
+ INFO : 15-03-20 15:00:55:540 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes ''
319
+ INFO : 15-03-20 15:00:55:570 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007fd3b2ec5ee0 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"], :objectclass=>["organizationalUnit", "top"], :ou=>["people"]}>]
320
+ ERROR : 15-03-20 15:00:55:571 +0400 : Acs::Ldap::Mapper with options methods_separator '.' force_method_calls 'true'
321
+ INFO : 15-03-20 15:00:55:571 +0400 : Delete all ou=people
322
+ INFO : 15-03-20 15:00:55:571 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes 'uid'
323
+ DEBUG : 15-03-20 15:00:55:572 +0400 : LDAP connect
324
+ DEBUG : 15-03-20 15:00:55:572 +0400 : Binding to ldap...
325
+ DEBUG : 15-03-20 15:00:55:572 +0400 : Connection params: {:host=>"192.168.59.103", :port=>49389, :base=>"dc=adharacs,dc=lan", :auth=>{:method=>:simple, :username=>"cn=admin,dc=adharacs,dc=lan", :password=>"admin"}}
326
+ DEBUG : 15-03-20 15:00:55:585 +0400 : Connection succeed
327
+ INFO : 15-03-20 15:00:55:615 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007fd3b30e5a18 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"]}>]
328
+ DEBUG : 15-03-20 15:00:55:615 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
329
+ DEBUG : 15-03-20 15:00:55:615 +0400 : Acs::Ldap::Mapper chain_method returns '2'
330
+ INFO : 15-03-20 15:00:55:616 +0400 : Search base 'uid=2,ou=people,dc=adharacs,dc=lan' filter '' attributes ''
331
+ INFO : 15-03-20 15:00:55:631 +0400 : Search result ERROR return code:32, matched_dn: ou=people,dc=adharacs,dc=lan, message:No Such Object, data:[]
332
+ DEBUG : 15-03-20 15:00:55:632 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
333
+ DEBUG : 15-03-20 15:00:55:632 +0400 : Acs::Ldap::Mapper chain_method returns '2'
334
+ DEBUG : 15-03-20 15:00:55:632 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'sn' separator '.' force_method_calls 'true'
335
+ DEBUG : 15-03-20 15:00:55:632 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
336
+ DEBUG : 15-03-20 15:00:55:632 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'cn' separator '.' force_method_calls 'true'
337
+ DEBUG : 15-03-20 15:00:55:632 +0400 : Acs::Ldap::Mapper chain_method returns 'dark.vador'
338
+ DEBUG : 15-03-20 15:00:55:632 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'givenName' separator '.' force_method_calls 'true'
339
+ DEBUG : 15-03-20 15:00:55:632 +0400 : Acs::Ldap::Mapper chain_method returns 'Dark Vador'
340
+ DEBUG : 15-03-20 15:00:55:633 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'mail' separator '.' force_method_calls 'true'
341
+ DEBUG : 15-03-20 15:00:55:633 +0400 : Acs::Ldap::Mapper chain_method returns 'dvador@adharacs.lan'
342
+ DEBUG : 15-03-20 15:00:55:633 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'userPassword' separator '.' force_method_calls 'true'
343
+ DEBUG : 15-03-20 15:00:55:633 +0400 : Acs::Ldap::Mapper chain_method returns '{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1'
344
+ DEBUG : 15-03-20 15:00:55:633 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
345
+ DEBUG : 15-03-20 15:00:55:633 +0400 : Acs::Ldap::Mapper chain_method returns '2'
346
+ DEBUG : 15-03-20 15:00:55:633 +0400 : Pusher#create dn 'uid=2,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :mail=>"dvador@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
347
+ DEBUG : 15-03-20 15:00:55:633 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
348
+ DEBUG : 15-03-20 15:00:55:633 +0400 : Acs::Ldap::Mapper chain_method returns '2'
349
+ INFO : 15-03-20 15:00:55:633 +0400 : Add dn 'uid=2,ou=people,dc=adharacs,dc=lan' attributes '{:sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :mail=>"dvador@adharacs.lan", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :objectClass=>["organizationalPerson", "person", "top", "extensibleObject"]}'
350
+ INFO : 15-03-20 15:00:55:643 +0400 : Add result SUCCESS return code:0, matched_dn: , message:Success, data:nil
351
+ DEBUG : 15-03-20 15:00:55:643 +0400 : Acs::Ldap::Mapper chain_method on object '{:id=>2, :sn=>"dark.vador", :cn=>"dark.vador", :givenName=>"Dark Vador", :userPassword=>"{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", :mail=>"dvador@adharacs.lan"}' with chain 'id' separator '.' force_method_calls 'true'
352
+ DEBUG : 15-03-20 15:00:55:643 +0400 : Acs::Ldap::Mapper chain_method returns '2'
353
+ INFO : 15-03-20 15:00:55:643 +0400 : Search base 'uid=2,ou=people,dc=adharacs,dc=lan' filter '' attributes ''
354
+ INFO : 15-03-20 15:00:55:649 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007fd3b1cf41a8 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :sn=>["dark.vador"], :cn=>["dark.vador"], :givenname=>["Dark Vador"], :mail=>["dvador@adharacs.lan"], :userpassword=>["{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1"], :objectclass=>["organizationalPerson", "person", "top", "extensibleObject"], :uid=>["2"]}>]
355
+ INFO : 15-03-20 15:00:55:650 +0400 : Delete all ou=people
356
+ INFO : 15-03-20 15:00:55:650 +0400 : Search base 'ou=people,dc=adharacs,dc=lan' filter '' attributes 'uid'
357
+ INFO : 15-03-20 15:00:55:659 +0400 : Search result SUCCESS return code:0, matched_dn: , message:Success, data:[#<Net::LDAP::Entry:0x007fd3b2ea7620 @myhash={:dn=>["ou=people,dc=adharacs,dc=lan"]}>, #<Net::LDAP::Entry:0x007fd3b2ea6860 @myhash={:dn=>["uid=2,ou=people,dc=adharacs,dc=lan"], :uid=>["2"]}>]
358
+ INFO : 15-03-20 15:00:55:659 +0400 : Delete dn 'uid=2,ou=people,dc=adharacs,dc=lan'
359
+ INFO : 15-03-20 15:00:55:669 +0400 : Delete result SUCCESS return code:0, matched_dn: , message:Success, data:nil
@@ -0,0 +1,57 @@
1
+ require 'spec_helper'
2
+
3
+ describe Acs::Ldap::Mapper, order: :defined do
4
+
5
+ class TestObject
6
+ def initialize(value, value2 = 'value2')
7
+ @val = value
8
+ @val2 = value2
9
+ end
10
+ def get
11
+ @val
12
+ end
13
+
14
+ def get2
15
+ @val2
16
+ end
17
+ end
18
+
19
+ before(:context) do
20
+
21
+ end
22
+
23
+ before(:each) do
24
+ Acs::Ldap::Mapper.send(:public, *Acs::Ldap::Mapper.protected_instance_methods)
25
+ @array = [[[1, 2], 3], 4]
26
+ @simple_object = TestObject.new('test')
27
+ @nested_object = TestObject.new(TestObject.new('test'))
28
+ end
29
+
30
+ it "should be possible to use chain_methods" do
31
+ expect(Acs::Ldap::Mapper.new(nil, nil, nil).chain_methods(@array, 'shift.shift.shift')).to eq 1
32
+ expect(Acs::Ldap::Mapper.new(nil, nil, nil).chain_methods(@simple_object, :get)).to eq 'test'
33
+ expect(Acs::Ldap::Mapper.new(nil, nil, nil).chain_methods(@nested_object, 'get.get')).to eq 'test'
34
+ end
35
+
36
+ it "should be possible to use chain_methods with a specific method separator" do
37
+ expect(Acs::Ldap::Mapper.new(nil, nil, nil).chain_methods(@array, 'shift:shift:shift', {separator: ':'})).to eq 1
38
+ expect(Acs::Ldap::Mapper.new(nil, nil, nil).chain_methods(@nested_object, 'get:get', {separator: ':'})).to eq 'test'
39
+ end
40
+
41
+ it "should be possible to fetch an nested_object value with get" do
42
+ expect(Acs::Ldap::Mapper.new({value: 'get.get'}, nil, nil).get(:value, @nested_object)).to eq 'test'
43
+ expect(Acs::Ldap::Mapper.new({value: :get}, nil, nil).get(:value, @simple_object)).to eq 'test'
44
+ end
45
+
46
+ it "should be possible to fetch UID with shortcut method" do
47
+ expect(Acs::Ldap::Mapper.new({uid: 'get.get'}, nil, nil).uid(@nested_object)).to eq 'test'
48
+ expect(Acs::Ldap::Mapper.new({uid: :get}, nil, nil).uid(@simple_object)).to eq 'test'
49
+ end
50
+
51
+ it "should be possible to fetch all attributes" do
52
+ mapper = Acs::Ldap::Mapper.new({uid: :get, sn: :get2}, nil, nil)
53
+ expected_result = {uid: 'test', sn: 'value2'}
54
+ expect(mapper.attributes(@simple_object)).to eq expected_result
55
+ end
56
+
57
+ end
@@ -0,0 +1,81 @@
1
+ require 'spec_helper'
2
+
3
+ describe Acs::Ldap::Pusher, order: :defined do
4
+
5
+ before(:each) do
6
+ @connector = Acs::Ldap::Connector.new({host: '192.168.59.103', port: 49389, base: "dc=adharacs,dc=lan", dn: "cn=admin,dc=adharacs,dc=lan", password: "admin"})
7
+ @mapper = Acs::Ldap::Mapper.new(
8
+ {
9
+ uid: :id,
10
+ sn: :sn,
11
+ cn: :cn,
12
+ givenName: :givenName,
13
+ mail: :mail,
14
+ userPassword: :userPassword
15
+ },
16
+ [
17
+ "organizationalPerson",
18
+ "person",
19
+ "top",
20
+ "extensibleObject"
21
+ ],
22
+ 'people',
23
+ {
24
+ force_method_calls: true
25
+ }
26
+ )
27
+ @pusher = Acs::Ldap::Pusher.new(@connector, {mapper: @mapper})
28
+ @pusher.mapper = @mapper
29
+ @user = User.new({id: 2, sn: "dark.vador", cn: "dark.vador", givenName: "Dark Vador", userPassword: "{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", mail: "dvador@adharacs.lan"})
30
+ end
31
+
32
+ it "should be possible to flush an OU" do
33
+ @pusher.flush
34
+ expect(@pusher.count).to eq 0
35
+ end
36
+
37
+ it "should be possible to create a User" do
38
+ expect(@pusher.create(@user).success?).to eq true
39
+ expect(@pusher.count).to eq 1
40
+ end
41
+
42
+ it "should be possible to update a User" do
43
+ @user.givenName = "Vador Dark"
44
+ expect(@pusher.update(@user, :givenName).success?).to eq true
45
+ expect(@pusher.find_by('uid', 2).data[0][:givenName]).to eq ["Vador Dark"]
46
+ end
47
+
48
+ it "should be possible to remove a User" do
49
+ expect(@pusher.destroy(@user).success?).to eq true
50
+ expect(@pusher.count).to eq 0
51
+ end
52
+
53
+ it "should be possible to check if a User exists" do
54
+ @pusher.flush
55
+ expect(@pusher.exist?(@user)).to eq false
56
+ @pusher.create(@user)
57
+ expect(@pusher.exist?(@user)).to eq true
58
+ @pusher.flush
59
+ end
60
+
61
+ class User
62
+
63
+ def initialize(options = {})
64
+ @options = options
65
+ end
66
+
67
+ def method_missing(method_sym, *args, &block)
68
+ if args.length > 0
69
+ @options[method_sym.to_s.gsub(/=/,'').to_sym] = args[0]
70
+ else
71
+ @options[method_sym] || nil
72
+ end
73
+ end
74
+
75
+ def to_s
76
+ @options.inspect
77
+ end
78
+
79
+ end
80
+
81
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acs-ldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terranova David
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-19 00:00:00.000000000 Z
11
+ date: 2015-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -110,13 +110,15 @@ files:
110
110
  - lib/acs/ldap.rb
111
111
  - lib/acs/ldap/connector.rb
112
112
  - lib/acs/ldap/logger.rb
113
- - lib/acs/ldap/model.rb
113
+ - lib/acs/ldap/mapper.rb
114
+ - lib/acs/ldap/pusher.rb
114
115
  - lib/acs/ldap/result.rb
115
116
  - lib/acs/ldap/version.rb
116
117
  - log/.keep
117
118
  - log/acs_ldap.log
118
119
  - spec/acs/ldap/connector_spec.rb
119
- - spec/acs/ldap/model_spec.rb
120
+ - spec/acs/ldap/mapper_spec.rb
121
+ - spec/acs/ldap/pusher_spec.rb
120
122
  - spec/acs/ldap_spec.rb
121
123
  - spec/spec_helper.rb
122
124
  homepage: ''
@@ -145,6 +147,7 @@ specification_version: 4
145
147
  summary: ActiveRecord to LDAP adapter
146
148
  test_files:
147
149
  - spec/acs/ldap/connector_spec.rb
148
- - spec/acs/ldap/model_spec.rb
150
+ - spec/acs/ldap/mapper_spec.rb
151
+ - spec/acs/ldap/pusher_spec.rb
149
152
  - spec/acs/ldap_spec.rb
150
153
  - spec/spec_helper.rb
@@ -1,86 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Acs::Ldap::Model, order: :defined do
4
- before(:context) do
5
- @connector = Acs::Ldap::Connector.new({host: '192.168.59.103', port: 49389, base: "dc=adharacs,dc=lan", dn: "cn=admin,dc=adharacs,dc=lan", password: "admin"})
6
- @user_model = UserModel.new(@connector)
7
- @user = User.new({uid: 2, sn: "dark.vador", cn: "dark.vador", givenName: "Dark Vador", userPassword: "{SSHA}+MBMtUqzkOeH8hI1KVnl+djdqzw0YmU5M2Y5MmQyOTgxMDU1", mail: "dvador@adharacs.lan"})
8
- end
9
-
10
- it "should be possible to flush an OU" do
11
- @user_model.flush
12
- expect(@user_model.count).to eq 0
13
- end
14
-
15
- it "should be possible to create a User" do
16
- expect(@user_model.create(@user).success?).to eq true
17
- expect(@user_model.count).to eq 1
18
- end
19
-
20
- it "should be possible to update a User" do
21
- @user.givenName = "Vador Dark"
22
- expect(@user_model.update(@user, :givenName).success?).to eq true
23
- expect(@user_model.find_by('uid', 2).data[0][:givenName]).to eq ["Vador Dark"]
24
- end
25
-
26
- it "should be possible to remove a User" do
27
- expect(@user_model.destroy(@user).success?).to eq true
28
- expect(@user_model.count).to eq 0
29
- end
30
-
31
- it "should be possible to check if a User exists" do
32
- @user_model.flush
33
- expect(@user_model.exist?(@user)).to eq false
34
- @user_model.create(@user)
35
- expect(@user_model.exist?(@user)).to eq true
36
- @user_model.flush
37
- end
38
-
39
- class UserModel < Acs::Ldap::Model
40
- def initialize(connector, ou = nil)
41
- @ou = ou || 'people'
42
- super(connector, {id: :uid})
43
- end
44
-
45
- def attributes(user)
46
- {
47
- uid: user.id,
48
- sn: user.sn,
49
- cn: user.cn,
50
- givenName: user.givenName,
51
- mail: user.mail,
52
- userPassword: user.userPassword
53
- }
54
- end
55
-
56
- def object_class
57
- [
58
- "organizationalPerson",
59
- "person",
60
- "top",
61
- "extensibleObject"
62
- ]
63
- end
64
- end
65
-
66
- class User
67
-
68
- def initialize(options = {})
69
- @options = options
70
- end
71
-
72
- def method_missing(method_sym, *args, &block)
73
- if args.length > 0
74
- @options[method_sym.to_s.gsub(/=/,'').to_sym] = args[0]
75
- else
76
- @options[method_sym] || nil
77
- end
78
- end
79
-
80
- def to_s
81
- @options.inspect
82
- end
83
-
84
- end
85
-
86
- end