Re: Way to obtain client IP / Port?

2004-12-01 Thread James Russo
   Understood. This isn't really an issue with my application, but 
could be important for others. It would be up to the proxy to add these 
fields. It would be nice if the rpc method had access to all this 
information. A hashtable with the incoming headers, as well as the data 
contained the Socket returned from accept, SSL information if the 
connection is SSL (client certificate information, etc)

I am willing to implement it and provide patches if there is some 
consensus on how it should be done to so that it is useful to more then 
just me.

-jr
Tino Wildenhain wrote:
Am Dienstag, den 30.11.2004, 17:42 -0500 schrieb James Russo:
 

Jochen,
   I think my original question was not clear. I want the server to be 
able to obtain the IP address of the client calling the RPC method. I 
want to be able to get this information from within the RPC method 
itself. Right now, I don't think it is possible with the current way 
things are implemented. Other then userpassword (via 
AuthenticatedXmlRpcHandler, or ContextXmlRpcHandler) no information 
about the underlying transport is available at the RpcMethod layer.

   

When it comes to HTTP - and XMLRPC works on top of HTTP -
beware of the proxies. The IP you see at server level
isnt garantied the IP of the client box of the user.
And it might even be not constant over subsequent 
requests from the same user.

Best bet if you need some informations about the request
patch the server so you get all the (cgi) variables like
REMOTE_HOST, HTTP_X_FORWARDED_FOR, ... whatnot.
Regards
Tino
 



Re: Way to obtain client IP / Port?

2004-12-01 Thread keroppi kero
I readed all messages about how to view the ip of the client from the server 
code.

My English isn't very good but I've understood that it's impossible (now) to 
view this information.

I'd need to know the ip of the client wich is doing the call.
Other thing:
Where can I find information about to use logged calls? Whith user and 
password.

Thanks to all, keroppi.
_
Un amor, una aventura, compañía para un viaje. Regístrate gratis en MSN Amor 
 Amistad. http://match.msn.es/match/mt.cfm?pg=channeltcid=162349



Re: Way to obtain client IP / Port?

2004-11-30 Thread James Russo
Jochen,
   I agree. The port is subject to change, but the IP should remain the 
same. (or at least in my application it will) I think this information 
could be as useful as the userid/password. Other information which could 
be useful could be the client certificate information if the connection 
is SSL and a client certificate was presented. This could allow  the rpc 
method to do authentication/authorization based on that data too.

-jr
Jochen Wiedmann wrote:
James Russo wrote:
I am application which needs gain access to the client IP / port.

There is no such thing as *the* client IP / port. Even with HTTP 
keepalive you have to accept the possibility, that different XML-RPC 
requests use different ports. (The IP address is likely to be 
constant, though.)

Jochen


Re: Way to obtain client IP / Port?

2004-11-30 Thread Jochen Wiedmann
James Russo wrote:
   I agree. The port is subject to change, but the IP should remain the 
same. (or at least in my application it will) I think this information 
could be as useful as the userid/password. Other information which could 
be useful could be the client certificate information if the connection 
is SSL and a client certificate was presented. This could allow  the rpc 
method to do authentication/authorization based on that data too.
If that's sufficient for you, simply create a socket to the HTTP server: 
This will use the same IP address. SSL is a little bit more tricky, but 
possible in the same manner. (If the client certificate obtained in this 
way is *not* the same, then you're stick with the same problem that 
holds for the port numbers.)

Jochen
--
http://lilypie.com/baby1/050423/1/5/1/+1


Re: Way to obtain client IP / Port?

2004-11-30 Thread James Russo
Jochen,
   I think my original question was not clear. I want the server to be 
able to obtain the IP address of the client calling the RPC method. I 
want to be able to get this information from within the RPC method 
itself. Right now, I don't think it is possible with the current way 
things are implemented. Other then userpassword (via 
AuthenticatedXmlRpcHandler, or ContextXmlRpcHandler) no information 
about the underlying transport is available at the RpcMethod layer.

-jr
Jochen Wiedmann wrote:
James Russo wrote:
   I agree. The port is subject to change, but the IP should remain 
the same. (or at least in my application it will) I think this 
information could be as useful as the userid/password. Other 
information which could be useful could be the client certificate 
information if the connection is SSL and a client certificate was 
presented. This could allow  the rpc method to do 
authentication/authorization based on that data too.

If that's sufficient for you, simply create a socket to the HTTP 
server: This will use the same IP address. SSL is a little bit more 
tricky, but possible in the same manner. (If the client certificate 
obtained in this way is *not* the same, then you're stick with the 
same problem that holds for the port numbers.)

Jochen