Re: [core] RFC 7252 - Forward Proxies

Achim Kraus <achimkraus@gmx.net> Sun, 12 January 2020 12:21 UTC

Return-Path: <achimkraus@gmx.net>
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 006C2120043 for <core@ietfa.amsl.com>; Sun, 12 Jan 2020 04:21:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=gmx.net
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AM6fWx_6vGav for <core@ietfa.amsl.com>; Sun, 12 Jan 2020 04:21:43 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D08DA12003E for <core@ietf.org>; Sun, 12 Jan 2020 04:21:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578831699; bh=uEMEyhrQ/LIUDi24xPYrtfeteFIcvICkNsIIsTwijW4=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=R1xiTJKsvAkqiuVwiG/Fqysle67S6iVqpqbrwDCPVMr9qXUnPzMFFIKUDW+8yWVd9 xfIxnORfSH1aZDvhJES6wqOXbOVtwrbR98uQbuBIL+2T7+UG1l7Tbf6oucVJYYHNxl 3cW9LZNuB599EaGjlbr/xPf44ugpF/dGwVjI8SJo=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.178.45] ([94.216.249.196]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mq2nK-1jTqoi3UDi-00n9Uf; Sun, 12 Jan 2020 13:21:38 +0100
To: Klaus Hartke <hartke@projectcool.de>
Cc: "core@ietf.org" <core@ietf.org>
References: <324677e1-06d4-a4d6-b79c-9a55c01adcbb@gmx.net> <CAAzbHvYA4nX2ZaL__+yuk8W1e0JXZTx5D4fTgW0F3nJTat0spA@mail.gmail.com> <d192fb34-31eb-e9b6-d446-782d8145ca16@gmx.net> <CAAzbHvZymn-3mUqATAW_NC4KNK3w6oFLJKrCVdQFnE3MVtWWgQ@mail.gmail.com>
From: Achim Kraus <achimkraus@gmx.net>
Message-ID: <6eeba0d2-7cce-44b1-cc47-70886277739d@gmx.net>
Date: Sun, 12 Jan 2020 13:21:37 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2
MIME-Version: 1.0
In-Reply-To: <CAAzbHvZymn-3mUqATAW_NC4KNK3w6oFLJKrCVdQFnE3MVtWWgQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: de-AT-frami
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:gaRFJ7nN0zEjqxWcNLxmNWQWJaR0TcSOWNPE9o5poxcbbk5Ox2k 0n6oDFasnChRm6mKYl462J7ve5n8wJDH8/ol2guKay8XRNXVDKTaa6x9sJcDBfo6XUKOKgu mRwPfAuUjbXhapRxt8kb2lropbFoeHc3B8fNJyBHJA/TgagkNoTKdFLFA+vuAoTN2VvzPu+ PwrnRIz4B/S+waKr6xGog==
X-UI-Out-Filterresults: notjunk:1;V03:K0:Rlt8G7yEppQ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JgfGvyluKYCPu4OswM9/AGLSIKyUss0XEMvV/2SCNBdzT0lVfDh1KnU4 6aBeAg7s6BEHs6iEe59dcBsS+Tt+gsPfQ+peHMbqFtQI4gP67zdoSbMFr+yqe1JmUY0Eb/zZj zmNiOhS0tY4UYBp79PJRcAqhsI6GwO63J3eaFgXLsS86d6KEl57/uf/6QvoSKGdttEV+rUXBd TE1ASBfja5Zq1z3lRvOdr74YMKf3D7pxxhcIZbfHKX9VuRf0OT7mRxWTlNYU=
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/2M_NQmHhtFutP45LbSQukoUi42w>
Subject: Re: [core] RFC 7252 - Forward Proxies
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
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: <https://mailarchive.ietf.org/arch/browse/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: Sun, 12 Jan 2020 12:21:45 -0000

Hi Klaus,

thanks again for the clarifications!

best regards
Achim

Am 11.01.20 um 14:03 schrieb Klaus Hartke:
> Achim Kraus wrote:
>> In my understanding the, CoAP URI-Host option will be "example.com" and
>> not "198.51.100.1", otherwise hosts with multiple virtual server will
>> not be able to differentiate the logical request destination.
>
> Oh, sorry. I changed the example at some point from "example.com" to
> "198.51.100.1" and apparently didn't change all instances. Here's the
> corrected example:
>
>     If a client wants to GET a representation of
>     <coap://198.51.100.1:12345/.well-known/core>,
>     then the CoAP options always encode
>     <coap://198.51.100.1:12345/.well-known/core>,
>     regardless of the destination of the UDP datagram.
>
> Of course, the same is true for "example.com":
>
>     If a client wants to GET a representation of
>     <coap://example.com:12345/.well-known/core>,
>     then the CoAP options always encode
>     <coap://example:12345/.well-known/core>,
>     regardless of the destination of the UDP datagram.
>
>> Also in my understanding, the port, IP-literal and IPv4address (the none
>> regname variants), are only included, if they differ from the
>> destination (which will be the porxy's address in case of a proxy).
>
> Yes, exactly. In pseudo-code:
>
>    |url| = the request URI
>    |scheme| = the <scheme> component of |url|
>    |host| = the <host> component of |url|
>    if the <port> component of |url| is present then
>      |port| = the <port> component of |url|
>    else
>      |port| = the default port number for |scheme|
>    endif
>
>    if a forward-proxy is configured then
>      include a Proxy-Scheme option with value |scheme|
>      |transfer-protocol| = the protocol of the forward proxy
>      |destination-host| = the IP address of the forward proxy
>      |destination-port| = the port number of the forward proxy
>    else
>      do not include a Proxy-Scheme option
>      |transfer-protocol| = the protocol indicated by |scheme|
>      |destination-host| = |host| resolved to an IP address
>      |destination-port| = |port|
>    endif
>
>    if |host| equals |destination-host| then
>      do not include a Uri-Host option
>    else
>      include a Uri-Host option with value |host|
>    endif
>
>    if |port| equals |destination-port| then
>      do not include a Uri-Port option
>    else
>      include a Uri-Port option with value |port|
>    endif
>
> (Necessary data conversions omitted for brevity.)
>
>>   > It's the port number of the request URI (or, if the port number in
>> the request URI is omitted, the default port number for the scheme of
>> the request URI). It's not the port number of the forward proxy.
>>
>> My question was rather, if it's the default port of the proxy scheme
>> (maybe http), or the requests coap-uri-scheme.
>
> It's the default port number for the scheme of the request URI.
>
>
> Klaus
>