directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ado Dao <ado...@hotmail.de>
Subject RE: getClientAddress() does not provide remote connection info for anonymous connections
Date Mon, 22 Jul 2013 11:08:48 GMT
When I search anonymous, e.g. with MS Outlook or so

ldapsearch -h <host> -p 389 -x -b "dc=foo,dc=com" "mail=test@mail.loc" 

IOSession is null

with authentication 

ldapsearch -h <host> -p 389 -w secret -D "uid=admin,ou=system"  -x -b "dc=foo,dc=com"
"mail=test@mail.loc"

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: elecharny@gmail.com
> To: users@directory.apache.org
> 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 
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message