You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Phillip B Oldham <ph...@gmail.com> on 2008/07/30 23:12:50 UTC

Tracing request origin?

Is it possible running a thrift server to see what IP the request
originated from?

-- 
Phillip B Oldham
phillip.oldham@gmail.com
+44 (0) 7525 01 09 01

Re: Tracing request origin?

Posted by Stuart Sierra <ma...@stuartsierra.com>.
On Thu, Aug 7, 2008 at 3:39 PM, Phillip B Oldham
<ph...@gmail.com> wrote:
> Its more about tracking access, authentication, and authorisation.
>
> I'd like to provide access to a web service using thrift, however I
> need to ensure only a certain number of specific apps have access to
> the service information, and that they're not accessing information
> other than their own and that which is shared.
>
> Any recommendations on how to achieve this with thrift?

I think you have two options: 1) include an authentication token in
the message, handle it in the web service; or 2) hide the Thrift
server behind a proxy that handles authentication and access control.
Either way, Thrift itself is not going to do any of the work for you.

-Stuart

Re: Tracing request origin?

Posted by Phillip B Oldham <ph...@gmail.com>.
On Thu, Aug 7, 2008 at 7:45 PM, Mark Slee <ms...@facebook.com> wrote:
> Sorry if this has already been replied to (didn't see one).

Nope - thought I'd been forgotten!

> This isn't possible in the application layer, because there's no
> requirement that requests to a service handler have to be made via a
> network at all, hence IP might be irrelevant. This is encapsulated
> entirely at the transport layer.
>
> If you need to trace this, you can either modify/extend a TServer or
> TServerTransport of your choice to keep track of this information in
> whatever means you find appropriate, or you can pass along client
> information as part of the actual method call.
>
> If your application depends on client information to function properly,
> then I'd recommend the latter as it really is part of the application,
> but if this is just for debugging, then I'd probably recommend the
> former.

Its more about tracking access, authentication, and authorisation.

I'd like to provide access to a web service using thrift, however I
need to ensure only a certain number of specific apps have access to
the service information, and that they're not accessing information
other than their own and that which is shared.

Any recommendations on how to achieve this with thrift?


-- 
Phillip B Oldham
phillip.oldham@gmail.com
+44 (0) 7525 01 09 01

RE: Tracing request origin?

Posted by Mark Slee <ms...@facebook.com>.
Sorry if this has already been replied to (didn't see one).

This isn't possible in the application layer, because there's no
requirement that requests to a service handler have to be made via a
network at all, hence IP might be irrelevant. This is encapsulated
entirely at the transport layer.

If you need to trace this, you can either modify/extend a TServer or
TServerTransport of your choice to keep track of this information in
whatever means you find appropriate, or you can pass along client
information as part of the actual method call.

If your application depends on client information to function properly,
then I'd recommend the latter as it really is part of the application,
but if this is just for debugging, then I'd probably recommend the
former.


-----Original Message-----
From: Phillip B Oldham [mailto:phillip.oldham@gmail.com] 
Sent: Wednesday, July 30, 2008 2:13 PM
To: thrift-user@incubator.apache.org
Subject: Tracing request origin?

Is it possible running a thrift server to see what IP the request
originated from?

--
Phillip B Oldham
phillip.oldham@gmail.com
+44 (0) 7525 01 09 01