Re: [core] Call for reviews of draft-castellani-core-http-mapping

"Dijk, Esko" <esko.dijk@philips.com> Fri, 12 April 2013 08:15 UTC

Return-Path: <esko.dijk@philips.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6DF8521F89FB for <core@ietfa.amsl.com>; Fri, 12 Apr 2013 01:15:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.599
X-Spam-Level:
X-Spam-Status: No, score=-5.599 tagged_above=-999 required=5 tests=[AWL=1.000, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xwernPHn6hNc for <core@ietfa.amsl.com>; Fri, 12 Apr 2013 01:15:52 -0700 (PDT)
Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe004.messaging.microsoft.com [65.55.88.14]) by ietfa.amsl.com (Postfix) with ESMTP id 9C84D21F8AA6 for <core@ietf.org>; Fri, 12 Apr 2013 01:15:50 -0700 (PDT)
Received: from mail48-tx2-R.bigfish.com (10.9.14.230) by TX2EHSOBE014.bigfish.com (10.9.40.34) with Microsoft SMTP Server id 14.1.225.23; Fri, 12 Apr 2013 08:15:47 +0000
Received: from mail48-tx2 (localhost [127.0.0.1]) by mail48-tx2-R.bigfish.com (Postfix) with ESMTP id 260BD48019F; Fri, 12 Apr 2013 08:15:47 +0000 (UTC)
X-Forefront-Antispam-Report: CIP:157.55.7.222; KIP:(null); UIP:(null); IPV:NLI; H:mail.philips.com; RD:none; EFVD:NLI
X-SpamScore: -31
X-BigFish: VPS-31(zz98dI15d6O9251J542I1432I217bIzz1f42h1fc6h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ahzz1033IL177df4h17326ah8275dh1b3f39h92f2jz2dh2a8h668h839h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h19ceh1ad9h1b0ah1155h)
Received: from mail48-tx2 (localhost.localdomain [127.0.0.1]) by mail48-tx2 (MessageSwitch) id 1365754544429794_9031; Fri, 12 Apr 2013 08:15:44 +0000 (UTC)
Received: from TX2EHSMHS024.bigfish.com (unknown [10.9.14.237]) by mail48-tx2.bigfish.com (Postfix) with ESMTP id 650C222006F; Fri, 12 Apr 2013 08:15:44 +0000 (UTC)
Received: from mail.philips.com (157.55.7.222) by TX2EHSMHS024.bigfish.com (10.9.99.124) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 12 Apr 2013 08:15:43 +0000
Received: from 011-DB3MPN2-083.MGDPHG.emi.philips.com ([169.254.3.176]) by 011-DB3MMR1-005.MGDPHG.emi.philips.com ([10.128.28.55]) with mapi id 14.02.0328.011; Fri, 12 Apr 2013 08:15:37 +0000
From: "Dijk, Esko" <esko.dijk@philips.com>
To: Klaus Hartke <hartke@tzi.org>, "core@ietf.org" <core@ietf.org>
Thread-Topic: [core] Call for reviews of draft-castellani-core-http-mapping
Thread-Index: AQHOKN+l05uJa1Rmo0etQcuHR51NeJjNq40AgAOE8xCAAFgqAIAAzS6g
Date: Fri, 12 Apr 2013 08:15:36 +0000
Message-ID: <031DD135F9160444ABBE3B0C36CED618C08FCE@011-DB3MPN2-083.MGDPHG.emi.philips.com>
References: <0C9867A6-AED5-4063-88AE-E9D1C6CDE75E@tzi.org> <d5a79ad7412cfca4e5ac41c2be4e11e4@xs4all.nl> <031DD135F9160444ABBE3B0C36CED618BFEA84@011-DB3MPN2-082.MGDPHG.emi.philips.com> <CAAzbHvbRoitn6v_oFZna2LMkA9t7XCGE7M-=JN+Xwhc=q0SKGg@mail.gmail.com>
In-Reply-To: <CAAzbHvbRoitn6v_oFZna2LMkA9t7XCGE7M-=JN+Xwhc=q0SKGg@mail.gmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [194.171.252.103]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: philips.com
Subject: Re: [core] Call for reviews of draft-castellani-core-http-mapping
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/core>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Apr 2013 08:15:53 -0000

Hi Klaus,

> - Does the client have an http:// URI and does the HTTP server make the unilateral decision
> to make a CoAP request (based on an embedded coap:// URI in the http:// URI, opaque to the client)?
>  Reverse proxy.
>
> - Does the client have a coap:// URI and does it make the unilateral decision to perform an HTTP request
> (with the coap:// URI translated to a http:// URI according to some standardized scheme)?
> Forward proxy.

If I apply the same argumentation, I may get these 2 cases:

1) The client has a coap:// URI and makes the unilateral decision to perform an HTTP request (with the coap:// URI translated to a http:// URI according to some standardized scheme) to the proxy. Then the proxy makes the decision to get the coap:// URI out of the HTTP request and performs a CoAP request using this coap:// URI.
-> Forward proxy.

2) The client got a http:// URI from someone, doesn't know a thing about CoAP, and this URI happens to be the same http:// URI as the one in point 1) above. Then the HTTP server makes the unilateral decision to get the coap:// URI out of the HTTP request and performs a CoAP request using this coap:// URI.
-> Reverse proxy.

The point/issue here is that the proxy acting in point 1) and 2) is the same HTTP server operating in exactly the same way. And it's both a Forward and a Reverse proxy depending on what the client knows. So it's hard to define guidelines for a Reverse Proxy only, because it could unknowingly be also a Forward Proxy. Therefore I argued that the distinction in this way is not useful.
(See also the earlier thread http://www.ietf.org/mail-archive/web/core/current/msg04170.html )

Esko

-----Original Message-----
From: core-bounces@ietf.org [mailto:core-bounces@ietf.org] On Behalf Of Klaus Hartke
Sent: Thursday, April 11, 2013 21:46
To: core@ietf.org
Subject: Re: [core] Call for reviews of draft-castellani-core-http-mapping

Esko Dijk wrote:
> I propose to define the forward/reverse proxy in such a way that the
> "client awareness" does not play a role anymore

Client awareness is pretty much what distinguishes a forward proxy from a reverse proxy.


Assume a client retrieves a representation of a resource and this representation contains a link. Then there are the following cases:

* The client uses the information in the URI to connect to a server.
The server at that address is the authoritative source for representations of the resource identified by the URI, so it returns a response directly.

     -> "Origin server".

* The client uses the information in the URI to connect to a server.
However, the server is _not_ the authoritative source for representations of the resource identified by the URI. Instead, it has been configured to obtain the representation from an unrelated third party. Which third party it connects to can come from local configuration or be embedded in the URI. From the perspective of the client, the response looks and feels exactly as a response from an origin server, though.

     -> "Reverse proxy". It is an unilateral decision of the server to obtain the representation from a third party.

* The client does _not_ use the information in the URI. Instead, it has been configured to connect to an unrelated third party. The client requests this third party to obtain the representation of the resource identified by the URI, well aware that this third party not the authoritative source for the representation.

     -> "Forward proxy". It is an unilateral decision of the client to request a third party to obtain the representation and not to connect to the server specified in the URI.


The protocol between client--proxy and proxy--origin-server do not have to be the same. For example, a client can make an HTTP request to a reverse proxy and the reverse proxy makes a CoAP request to the origin server.

http://coap.me/ is a good example of an HTTP/CoAP cross-protocol reverse proxy. It embeds the information which CoAP server to connect to in the http:// URI, and rewrites all links in representations obtained from CoAP servers to http:// URIs, so you can use a simple web browser to browse CoAP servers.

The protocol between client--forward-proxy is often a bit different than between client--origin-server and client--reverse-proxy. For example, when a client makes a CoAP request to a forward proxy, the URI is transmitted in the Proxy-Uri Option and not in the Uri-* Options. Similarly, when a client makes an HTTP request to a forward proxy, the entire URI is transmitted in the request line and not in the Host header field.

Unfortunately, in case of a HTTP/CoAP cross-protocol forward proxy, we cannot simply put a coap:// URI in the HTTP request line. So we need a different protocol that both the client and the forward-proxy agree on to encode this request. One way is to let the client translate the coap:// URI to an http:// URI in a standardized way, and the forward proxy translates the http:// URI back to the original coap:// URI.


The line between reverse proxy and forward proxy seems to blur when we embed coap:// URIs in http:// URIs in the reverse proxy case, and translate coap:// URIs to http:// URIs in the forward proxy case. But it doesn't.

- Does the client have an http:// URI and does the HTTP server make the unilateral decision to make a CoAP request (based on an embedded coap:// URI in the http:// URI, opaque to the client)? Reverse proxy.

- Does the client have a coap:// URI and does it make the unilateral decision to perform an HTTP request (with the coap:// URI translated to a http:// URI according to some standardized scheme)? Forward proxy.


Just my 2 cents.

Klaus
_______________________________________________
core mailing list
core@ietf.org
https://www.ietf.org/mailman/listinfo/core

________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.