When I search anonymous, e.g. with MS Outlook or so ldapsearch -h <host> -p 389 -x -b "dc=foo,dc=com" "[email protected]"
IOSession is null with authentication ldapsearch -h <host> -p 389 -w secret -D "uid=admin,ou=system" -x -b "dc=foo,dc=com" "[email protected]" IOSession is != null I Used the embedded sample from: https://svn.apache.org/repos/asf/directory/sandbox/kayyagari/embedded-sample-trunk/src/main/java/org/apache/directory/seserver/EmbeddedADSVerTrunk.java Is there any possibility to get the Client-IP address with anonymous bind. -- Regards Ado > Date: Sat, 20 Jul 2013 06:03:56 +0200 > From: [email protected] > To: [email protected] > Subject: Re: getClientAddress() does not provide remote connection info for > anonymous connections > > Le 7/20/13 2:22 AM, Ado Dao a écrit : > > Hi Emmanuel, > > thanks for your answer. > > > > From DefaultCoreSession.java: > > ... > > public SocketAddress getClientAddress() > > { > > if ( ioSession != null ) > > { > > return ioSession.getRemoteAddress(); > > } else { > > return null; > > } > > } > > ... > > > > > > In Anonymous Mode is the IOSession == null. Only in Authentication Mode is > > the IOSession != null. > > You are doing a search without a bind, I guess ? > > > -- > Regards, > Cordialement, > Emmanuel Lécharny > www.iktek.com >
