Loading ...
Sorry, an error occurred while loading the content.

Re: possible to retrieve remote address when running as Daemon?

Expand Messages
  • jpeyser
    See message 2090. ... in ... cannot ... I ... and ... by ... come
    Message 1 of 2 , Sep 24 8:05 AM
    • 0 Attachment
      See message 2090.

      --- In soaplite@yahoogroups.com, "c_r_dawson" <cdawson@w...> wrote:
      > Hi there,
      >
      > I would like to know if it is possible to retrieve the remote
      > IP/address from the connecting client when servicing a SOAP request
      in
      > my module. I had hoped that either the %ENV was set like a CGI, or
      > that perhaps I could use Apache::Request, but I am unfortunately
      > running as a Daemon, not withing Apache. Is this possible?
      >
      > My code is really simple:
      >
      > my $daemon = SOAP::HTTP::Transport::Daemon
      > -> new( LocalPort => 80, LocalAddr => 192.168.1.10 )
      > -> objects_by_reference( qw( My::Module ) )
      > -> dispatch_to( 'My::Module::MethodA' )
      > $daemon->handle;
      >
      > This is all working fine.
      >
      > Would this be something to avoid when running a SOAP server? I
      cannot
      > think of any reason why you would want to hide this. The reason I
      > want to do it is to implement a kind of poor man's authentication.
      I
      > have a web page coming over SSL which will serve up a java applet
      and
      > send a cryptographic key generated using the IP address and a secret
      > string. The SOAP client will return this key back to the server and
      > the server can then verify whether they are properly authenticated
      by
      > verifying that their validated IP and the hidden key generate the
      > public key. So, obviously I need to get a handle on the IP they
      come
      > from, not one which could be parameterized in the method call.
      >
      > Thanks in advance.
      > Chris
    Your message has been successfully submitted and would be delivered to recipients shortly.