Re: [Ecrit] planned-changes: two questions

Brian Rosen <br@brianrosen.net> Wed, 08 September 2021 23:31 UTC

Return-Path: <br@brianrosen.net>
X-Original-To: ecrit@ietfa.amsl.com
Delivered-To: ecrit@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 42C523A0063 for <ecrit@ietfa.amsl.com>; Wed, 8 Sep 2021 16:31:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.887
X-Spam-Level:
X-Spam-Status: No, score=-1.887 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=brianrosen-net.20150623.gappssmtp.com
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 8Lfstxg1GJaz for <ecrit@ietfa.amsl.com>; Wed, 8 Sep 2021 16:31:38 -0700 (PDT)
Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 430FF3A003C for <ecrit@ietf.org>; Wed, 8 Sep 2021 16:31:38 -0700 (PDT)
Received: by mail-io1-xd2f.google.com with SMTP id a13so5519289iol.5 for <ecrit@ietf.org>; Wed, 08 Sep 2021 16:31:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brianrosen-net.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=kXQGpSV/Lk3H8mv15S+nv2Ry7dQeVP4C5WXucg5EqXU=; b=KuswFMQDIkOYUhWQ6O8Jkwv5UNRNEbfAWkVn3NbhUC6RPb5QSjU0yePXVFVikB5u20 3ke/fVe0MS9AcoQi2DWHB/ckgP7XLxW3J7syhTIP8c8UTOQVcvPu0zpDbFcE0bCq+GQn wMgwHTI8HV7fPQ0r1kKTJL89xzN2tj6rprXdjjiSO79V6qzHvPQc+VaeZ1Ro+dS/VRrD JIqJCp03IYRUK+BoGivn7At7Mn1DqE7+dqjZCz15OgqEc+Qw+OK7JMknJ3zJh+VpNixt z1hADHKJwGUq8gX6FnX2hqcN/ff8xUIlCFiLNjFdZnytHc9E2MTMzxgnRNNXuH8f5N7V 2/mw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=kXQGpSV/Lk3H8mv15S+nv2Ry7dQeVP4C5WXucg5EqXU=; b=wwcuE4IH8K+Sg3JCQRTV9L1WSojYxkNtjQqb1ygATDCIoD/tjUQkcsuikYckLZuRSR YZoIfy8QW7iadv0gVe6ZdiN7DUneVSHR8+TYf572eOlFq/uuveGf41AvzY3VH+pGAslK bKXyLz1+Q0JXg/Lza8LMbT30WGPBF7F2nvVNIjycPraAWI3H5X8Tf8VqRglLXLCicDup ZUH7Kq0hABoK0FsRwyccUl7SYQWUyydoy2f7dnptx6S2lfNqflfAvlZPzr1M+17VcBaX i9SGcaxXR6ZRK8rroHkaillxEYtdvV+MLm4DsKv60o+9vVS8uUu21Q/hEj+8GcM7jBeq 0DSQ==
X-Gm-Message-State: AOAM532GmydmpfEzu8y6hWrcnoLy/VH+ZigkGQk+GhrnHQRWCyrYPzBr OFCzB0VaIaR6uS9OgYud7NH+RQ==
X-Google-Smtp-Source: ABdhPJzTA1Do4SeNsUOpVJRr90cfrlt5nlRNPUGZl8NnD1IqhEwiWrgOEBt/r6XJmsFkstW+Jk2IYw==
X-Received: by 2002:a6b:b88a:: with SMTP id i132mr35397iof.215.1631143896398; Wed, 08 Sep 2021 16:31:36 -0700 (PDT)
Received: from smtpclient.apple (dynamic-acs-24-154-121-237.zoominternet.net. [24.154.121.237]) by smtp.gmail.com with ESMTPSA id x1sm32405ilg.33.2021.09.08.16.31.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Sep 2021 16:31:35 -0700 (PDT)
From: Brian Rosen <br@brianrosen.net>
Message-Id: <83D1AC98-BE13-4BB7-AAC0-D9D60719D0F6@brianrosen.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_D9039EE6-C052-43AE-9356-2A89676E0A29"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Date: Wed, 8 Sep 2021 19:31:33 -0400
In-Reply-To: <E31A5619-0FC6-45FD-8541-644C269AE5EC@randy.pensive.org>
Cc: "Caron, Guy" <g.caron@bell.ca>, ECRIT <ecrit@ietf.org>
To: Randall Gellens <rg+ietf@randy.pensive.org>
References: <A0FC259C-DF34-4496-9013-422006278DA6@randy.pensive.org> <FB2A33E8-E146-404B-B150-1496C40510EF@brianrosen.net> <5577e2e6daa4405bbe12ef61675e1f55@bell.ca> <DE195D79-5A01-48EE-95CA-6C4B82E0886D@brianrosen.net> <e6e17f501711441188119cdfbe384d3d@bell.ca> <3AD58DEC-1DC9-4BC0-B55C-4E782E4AAA74@brianrosen.net> <E20342E7-2EFB-4479-96C2-85B4B7E16989@randy.pensive.org> <A7D59E8E-A014-4CC8-A0FF-5F58E81C6D4A@brianrosen.net> <2b4abbef37be4131a87471af75b6e7da@bell.ca> <CF2E8EDC-B38D-4742-B317-F3CE3E831578@brianrosen.net> <f82108f590674341a22da9c2e4c649e0@bell.ca> <7C4F6B87-C480-4963-B582-7639A9A1B029@brianrosen.net> <89a34416a9224a3bbccb520408283373@bell.ca> <D3AA7F51-01F4-4ED6-BFC3-2B3BF5AB1536@brianrosen.net> <DA890A1B-E22F-4EBB-B312-53A6C5BCD7B9@randy.pensive.org> <3441984B-D273-48FC-BCF1-AACB4AFCA2BF@brianrosen.net> <E31A5619-0FC6-45FD-8541-644C269AE5EC@randy.pensive.org>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ecrit/0ADMf2jCOhUV6fRDC5O6pfg4kKM>
Subject: Re: [Ecrit] planned-changes: two questions
X-BeenThere: ecrit@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Emergency Context Resolution with Internet Technologies <ecrit.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ecrit>, <mailto:ecrit-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ecrit/>
List-Post: <mailto:ecrit@ietf.org>
List-Help: <mailto:ecrit-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ecrit>, <mailto:ecrit-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Sep 2021 23:31:44 -0000

Inline.  I think we need other opinions.  Certainly, we don’t have rough consensus.


> On Sep 8, 2021, at 5:45 PM, Randall Gellens <rg+ietf@randy.pensive.org> wrote:
> 
> Why is a subsequent transaction better than a parallel one? The subsequent transaction model delays knowledge of the state.
> 
> If the client doesn't see an immediate POST, it doesn't know if there's been an error or not.
> 
Yes it does.  If it doesn’t see an immediate POST, then there was a problem and it has to try again.
> If the client sees a POST and sends an ID, it doesn't know if the server received it and stored the URI.
> 
Technically true, but vanishingly small issue.  You had a complete HTTPS transaction, but somehow the client isn’t sure the server got the ID. 
> If the server tries a POST but gets an error, it may retry but meanwhile the client may retry the query, since it didn't get a POST.
> 
That's always going to be something the server has to deal with: re-enrollment of the URI.  The client gets a normal response, and that tells it the URI was accepted.
> Should a client retain IDs if it hasn't seen a POST?
> 
No, lack of POST means URI is not enrolled
> Also, requiring that the client send an ID seems like it may constrain client architectures since any part of the client system that receives a POST must know which IDs are pending.
> 
I don’t agree.  This is a pretty normal “I send you a magic number and you have to return it to me” thing.  There are no “pending IDs”.  This is the first ID, so you need to return it, and only it, but it’s the only ID the client has at this point.
> What is the objection to a parallel POST?
> 
I was taught that you don’t embed an HTTP transaction in another with the same partner because things go wrong with timeouts and logic.  It’s not a parallel POST, it’s an HTTPS transaction one way that encloses another HTTPS transaction the other way.  You are dependent on the inner one completing before the outer one times out or has some other issue.  I just think that’s dangerous.  I will admit that I was taught this quite a long time ago (before HTTPS for sure) and things could have changed, but I can’t recall an API that does that.  Also note that keep alive works exactly the same way as the initial POST.  In your proposal, those are different.  That’s not much, but it’s some code.  The “test” transaction tells you that the mechanism works and your URI is being retained, whether that happens the first time, or a year later.
> --Randall
> 
> On 8 Sep 2021, at 14:22, Brian Rosen wrote:
> 
> I don’t think there is any fragility in the URI setup.  For a new URI, the client requests the server to keep it in a findService.  That transaction concludes by sending an ID.  The server immediately sends the test notification, to which the client responds with the ID.  At that point both sides know the URI was accepted and the client is valid.  That may be repeated periodically so both sides know the other is happy with the arrangements.  If the client doesn’t get the test notification, it knows the URI isn’t accepted.  If the server doesn’t see the ID, it’s knows that was a bogus request, or there is some other problem, and it shouldn’t save the URI.
> 
> I proposed a null ID as the test transaction flag.  That would be a piece of XML with the right namespace, the right element name, but no value.  I think that is adequate and meets Guy’s minimal mechanism criteria.  The same XML is always sent.  It either has a set of IDs or it’s empty.
> 
> Brian
> 
>> On Sep 8, 2021, at 5:11 PM, Randall Gellens <rg+ietf@randy.pensive.org <mailto:rg+ietf@randy.pensive.org>> wrote:
>> 
>> The proposed mechanism seems fragile. A client has no way to know if its request to store a URI was accepted. That makes it hard to debug. If there are errors of any kind when the server initially verifies a URI, the client has no idea. Even if the client repeats the transaction, the server will silently discard the URI. To me, that's asking for problems.
>> 
>> In my proposal, when the client requests to be notified and provides a URI, the server immediately does a parallel POST to that URI. If it gets a 202 Accepted response to the POST (or we can choose a different value), it stores the URI and returns the query result. If it gets a different response, it does not store the URI and returns the query result with a uriNotStored warning. If a client is trying to get the server to launch an attack on a third party entity, that entity will likely not support the URI in the first place, or will likely return an error response. If you want additional verification, have the server include the queried location in its test POST. That way, if the client maliciously sent a URI of a third party LIS, that LIS will know it does not have a query with that location outstanding.
>> 
>> Doing a parallel POST from the server to the client is one small transaction; this mechanism provides immediate feedback to both client and server. If there are DNS failures or network congestion or whatever, the server returns uriNotStored and the client can try again later.
>> 
>> As for multiple IDs in a single notification POST, having the client specify in the initial request the maximum it is prepared to accept seems reasonable. We can require that clients support a minimum number. If a server has more than the maximum, it sends them in multiple POSTs, with whatever separation in time it chooses. A server can include fewer IDs in a POST than the client's maximum.
>> 
>> We can have a 'test' notification value that is used both for the initial verification test and for periodic keep-alive tests.
>> 
>> --Randall
>> 
>> On 8 Sep 2021, at 12:17, Brian Rosen wrote:
>> 
>> Okay, I think the three of us are converging,  Here is a restatement of your description:
>> 1) In a validation query, a Client can request to be notified when the proffered LI should be revalidated, and provides a URI to send the notifications to;
>> 2) In the validation response, the Server provides an ID that the Client associates with the LI it just validated.   The server may silently ignore repeated requests to store a URI where the test in 4 below fails.
>> 3) Immediately thereafter, if the URI is new to the Server, the Server sends a ‘test’ notification to the URI, with an empty ID.
>> 4) The recipient at the URI is expected to respond with the ID provided in step 2. If it does, the Server stores the URI for future notifications.  If it does not, the server ignores the request to store the URI. 
>> 5) Some time after, the Server notifies the Client of an upcoming planned change by sending a notification to the successfully tested URI with the location ID;
>> 6) The client revalidates each LI in its database that matches the ID as of the date of the planned change. If no ID matches, it is a no-op at the Client. Revalidations may also result in no-op at the Client.
>> 7) LIs at the Client that are invalidated by the planned change are modified in its database to be valid (which probably mean another revalidation cycle) with an effective date set to <revalidateAsoF> value.
>> 8) The Server may send ’test’ notifications to the URI without any ID as a form of “keep-alive”.  Any ID provided by the Server to the client may be used as the response to the test transaction
>> 
>> 
>> There has been a discussion of sending more than one ID in a transaction.  I think that is a decent idea, but I worry about how big that could be.  Either we put a hard limit in the text or have something in the response to the test transaction that specifies a size limit for that client.
>> 
>> Brian
>> 
>>> On Sep 7, 2021, at 8:31 PM, Caron, Guy <g.caron@bell.ca <mailto:g.caron@bell.ca>> wrote:
>>> 
>>> 1) In a validation query, a Client can request to be notified when the proffered LI should be revalidated, and provides a URI to send the notifications to;
>>> 2) In the validation response, the Server provides an ID that the Client associates with the LI it just validated;
>>> 3) Immediately thereafter, the Server sends a ‘test’ notification to the URI, without any ID;\
>>> [br[For every new ID?  Or just once?  I wanted this to be a one time registration.
>>> [GC] Just once per offered URI.
>>> 
>>> 
>>> 4) The recipient at the URI is expected to respond with the ID provided in step 2. If it does, the Server stores the URI for future notifications. If it does not, the Server [let’s pick one: reject silently the URI and block the Client permanently/provides a ‘uriNotStored’ warning response to the URI {not compatible with the current proposal to test outside of LoST}/reject silently the URI and block the Client temporarily/other?];
>>> [br]I don’t think an explicit failure is a problem.  The LoST server can limit retries if it needs to.
>>> [GC] Ok for HTTP failures but what I’m talking about is when it fails to return the ID, like in your DoS example.
>>>  
>>> 
>>> 
>>> 5) Some time after, the Server notifies the Client of an upcoming planned change by sending a notification to the successfully tested URI with the location ID;
>>> 6) The client revalidates each LI in its database that matches the ID as of the date of the planned change. If no ID matches, it is a no-op at the Client. Revalidations may also result in no-op at the Client.
>>> 7) LIs at the Client that are invalidated by the planned change are modified in its database to be valid (which probably mean another revalidation cycle) with an effective date set to <revalidateAsoF> value.
>>> [br]I wanted periodic keep alives.  How would that work?
>>> [GC] You mean at step 3? As I mentioned below, I was wondering about the necessity for periodic tests. If the group is convinced it is needed, the Server can simply redo step 3 and the Client can respond with one or many IDs it has from that Server. 
>> 
>