Re: [Webpush] Require the TTL header

Benjamin Bangert <bbangert@mozilla.com> Fri, 05 February 2016 17:09 UTC

Return-Path: <bbangert@mozilla.com>
X-Original-To: webpush@ietfa.amsl.com
Delivered-To: webpush@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ED00C1B3BB2 for <webpush@ietfa.amsl.com>; Fri, 5 Feb 2016 09:09:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=no
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 NicktbtihcGT for <webpush@ietfa.amsl.com>; Fri, 5 Feb 2016 09:09:29 -0800 (PST)
Received: from mail-yk0-x22d.google.com (mail-yk0-x22d.google.com [IPv6:2607:f8b0:4002:c07::22d]) (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 A15161B3BB1 for <webpush@ietf.org>; Fri, 5 Feb 2016 09:09:29 -0800 (PST)
Received: by mail-yk0-x22d.google.com with SMTP id u9so62713326ykd.1 for <webpush@ietf.org>; Fri, 05 Feb 2016 09:09:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mozilla-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DSqRqvsrIpaLjrM7oprfT6visxierEx4dbNxYTQCXV4=; b=OuhCScgwWx6KBCopT4adobp9rCGOXLvnK/+ZunfFAI9rmwW41HWx7zk1EiDckSD6xj SVonY5C+yKmOyM/2452p7dWRXiu2N7AU+W9AcuEXbufoBESXgONKF5mjvlR1C3ITlt9p gYki1TNZ8B1Hd4YE1rBso7gfkfu2G1Vphjkhzp5z/rNv8cST5Jog2Cg+WNIqnMm6ck9h RQKs2xi9SlGOTdG/05kUoGpdhdiZMekRGfcPWQw4iwtk7i4pOI/HoHUmrp8OLYWSBhsY cy4ijT8L/mkkEdLfrxyUeZFHEhRUpp94LX8z8gZe9FCKbZC7e3YEP20pcy6iJE8+no0A c7Sw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=DSqRqvsrIpaLjrM7oprfT6visxierEx4dbNxYTQCXV4=; b=mXx6CihG0PmpWE9AZG3jEHdD1EF+GrTBfiUc1dMNXC7IYur/84PJ+pf1fnociEzGUR SAuUfosyn8jI3KQgkle3zqFnHXeUWqQ8mEEcRA6dNA1VAClaD+lyrCIeaMCxu0KFLu/y Wj2rXJgK5u/oN76h9D6udM8xcxLK62OWUn0pmHK+RC4oLaIFDUXfibqmVkZSYqw5YO8b UWlzz7mjlpW/zITaYwXEzfTO2cjX9l2r/a2HSJs3wLtd4Oxy5tQgmF1mGqtY24ZjSzf7 /mSnD2biJ5vaAj2iBcWuesGKca43leEsLw761bgT+RooXdZC7zcS7fZ5/4jKLaEsxha+ pmPg==
X-Gm-Message-State: AG10YOR4CCANlNKH7WPZ/GZRnrTGI2hDrNxds4a//Vo2ssSvoLbqwyY7rqc652s8BLEHsN6FfREKn7FXEGWJJlaf
MIME-Version: 1.0
X-Received: by 10.37.95.84 with SMTP id t81mr7731513ybb.58.1454692168652; Fri, 05 Feb 2016 09:09:28 -0800 (PST)
Received: by 10.37.196.68 with HTTP; Fri, 5 Feb 2016 09:09:28 -0800 (PST)
In-Reply-To: <BY2PR0301MB064705934B6DE1B371E1301D83D20@BY2PR0301MB0647.namprd03.prod.outlook.com>
References: <CABp8Eu+oBj8XKWbqd9ypT_mQWzMxXDe+cBR_vqk=rJ=6tM3tFA@mail.gmail.com> <BY2PR0301MB06477C93FA8937F0ABD4393383D20@BY2PR0301MB0647.namprd03.prod.outlook.com> <CABp8EuJFn+e8ParLY5+SLRVA-_8XgFgp5k8a2W2Ejir35hucxA@mail.gmail.com> <BY2PR0301MB064705934B6DE1B371E1301D83D20@BY2PR0301MB0647.namprd03.prod.outlook.com>
Date: Fri, 5 Feb 2016 09:09:28 -0800
Message-ID: <CABp8EuJQ_KXSs6Zz-fbhPcrnYymk14tShu4ukATX9GJ9J3PMjQ@mail.gmail.com>
From: Benjamin Bangert <bbangert@mozilla.com>
To: Brian Raymor <Brian.Raymor@microsoft.com>
Content-Type: multipart/alternative; boundary=001a11427594f8a0ea052b08e97f
Archived-At: <http://mailarchive.ietf.org/arch/msg/webpush/BA8uiNEGCZtMWpyAWdk7mSEqY-g>
Cc: "Martin Thomson \(martin.thomson@gmail.com\)" <martin.thomson@gmail.com>, "webpush@ietf.org" <webpush@ietf.org>
Subject: Re: [Webpush] Require the TTL header
X-BeenThere: webpush@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Discussion of potential IETF work on a web push protocol <webpush.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/webpush>, <mailto:webpush-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/webpush/>
List-Post: <mailto:webpush@ietf.org>
List-Help: <mailto:webpush-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/webpush>, <mailto:webpush-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Feb 2016 17:09:33 -0000

On Fri, Feb 5, 2016 at 8:29 AM, Brian Raymor <Brian.Raymor@microsoft.com>
wrote:

>
>
> If you don’t create a push message resource, how do you handle all the
> related dependencies?
>
>
>
> For example, Receiving Push Messages:
>
>
>
> https://tools.ietf.org/html/draft-ietf-webpush-protocol-03#section-7
>
>
>
>    Each push message is pushed as the response to a synthesized GET
>
>    request in a PUSH_PROMISE.  This GET request is made to the push
>
>    message resource that was created by the push service when the
>
>    application server requested message delivery.
>

In our system we determine if the user agent is available as we process the
notification from the application server and attempt delivery immediately
if so.


>  and in Acknowledging Push Messages:
>
>
>
> https://tools.ietf.org/html/draft-ietf-webpush-protocol-03#section-7.2
>
>
>
>    To ensure that a push message is properly delivered to the user agent
>
>    at least once, the user agent MUST acknowledge receipt of the message
>
>    by performing a HTTP DELETE on the push message resource.
>
>
>
> There is also a caveat in the TTL section that the push message resource
> may be deleted before the acknowledgement:
>
>
>
> https://tools.ietf.org/html/draft-ietf-webpush-protocol-03#section-6.2
>
>
>
>    A Push message with a zero TTL is immediately delivered
>
>    if the user agent is available to receive the message.  After
>
>    delivery, the push service is permitted to immediately remove a push
>
>    message with a zero TTL.  This might occur before the user agent
>
>    acknowledges receipt of the message by performing a HTTP DELETE on
>
>    the push message resource.  Consequently, an application server
>
>    cannot rely on receiving acknowledgement receipts for zero TTL push
>
>    messages.
>

 It looks like our current choice of not returning a Location if the user
is offline is not to spec, since returning a 201 implies it must contain a
Location header. We will be changing this to a 400 for a Bad Request if the
TTL header is missing in the future, and always include the Location field
for TTL: 0 messages.

Cheers,
Ben