Subject: [Webpush] question on Urgency semantics in draft-ietf-webpush-protocol-04

From: Darshak Thakore <[email-masked]>
Date: Thu, 7 Apr 2016 18:34:22 +0000

Hi all,

In reviewing the 04 version, I was hoping for some comment/clarification on the Urgency semanics:

Section 6.3 - Urgency header

The last paragraph - “An absent Urgency header field indicates that the request is to be forwarded at “normal” urgency…"

I’m assuming this statement applies to the “Urgency” header only when it is used by the AS to send the message to the PS. Correct? An absent “Urgency” header field in the request from the UA to PS should result in all messages being retrieved. Am i interpreting it correctly ?

Also in general, i’m trying to understand how the “Urgency” header actually works here. Once a radio is up for communication, you typically want to complete as much of data communication as possible so that you can go back to sleep for an extended period. If we had the following scenario;

Three applications have subscribed with the PS so we have a subscription set consisting of these three. Now the following messages are sent

AS1 -> PS : Sends 5 messages without the Urgency header so all 5 are “normal"
AS2 -> PS : Sends 2 messages with “high”, 5 with “low” and 5 with “very-low"
AS3 -> PS : Games the system and sends 5 messages with “high”

Now before AS2 sends any messages, if the UA polls the PS with the Urgency set to “high”, it doesn’t get any pushes. If the UA polls the PS subsequently after AS3 sends the messages again with Urgency set to “high", it will receive 7 messages (2 from AS2 and 5 from AS3). The other 15 messages (from AS1 and AS2) remain outstanding.

In the above scenario, the pending 15 messages may expire before getting delivered and requiring the PS and AS# to maintain state, deliver back “expiration” receipts and retry delivery (this cycle may happen a couple of times). Is all this complexity only to allow the device’s radio to be in full-power communication mode for the duration of the 7 messages instead of (7+15) messages or is there any other benefit i’m missing ? Given that the radio was in full power mode along with a “fully-primed” TCP connection from the UA to the PS, are we really saving any significant energy by not sending those 15 messages ? Also there does not seem to be anything that stops a particular AS from gaming the system and sending all its messages with “high” urgency.

My main goal here is to understand what precise benefit we are providing with the Urgency header.

Regards,
Darshak

---

From: Martin Thomson <[email-masked]>
Date: Thu, 7 Apr 2016 15:55:56 -0300

A timely question, or set thereof.

I was most of the way through
https://github.com/webpush-wg/webpush-protocol/pull/82

1. The UA should be able to filter out messages of lower urgency, the
above PR clarifies that point.
2. We can't stop an AS from gaming the system, but we could treat too
many high-urgency messages as a DoS attack (more on this later)
3. There are cases where accepting messages entails more work than
would be ideal.  There are some messaging channels where the delivery
of a certain amount of data causes a dramatic increase in cost.  For
example, the paging channel in a cellular network.

On 7 April 2016 at 15:34, Darshak Thakore <[email-masked]> wrote:
> The last paragraph - “An absent Urgency header field indicates that the
> request is to be forwarded at “normal” urgency…"
>
> I’m assuming this statement applies to the “Urgency” header only when it is
> used by the AS to send the message to the PS. Correct? An absent “Urgency”
> header field in the request from the UA to PS should result in all messages
> being retrieved. Am i interpreting it correctly ?
>
> Also in general, i’m trying to understand how the “Urgency” header actually
> works here. Once a radio is up for communication, you typically want to
> complete as much of data communication as possible so that you can go back
> to sleep for an extended period. If we had the following scenario;
>
> Three applications have subscribed with the PS so we have a subscription set
> consisting of these three. Now the following messages are sent
>
> Now before AS2 sends any messages, if the UA polls the PS with the Urgency
> set to “high”, it doesn’t get any pushes. If the UA polls the PS
> subsequently after AS3 sends the messages again with Urgency set to “high",
> it will receive 7 messages (2 from AS2 and 5 from AS3). The other 15
> messages (from AS1 and AS2) remain outstanding.
>
> In the above scenario, the pending 15 messages may expire before getting
> delivered and requiring the PS and AS# to maintain state, deliver back
> “expiration” receipts and retry delivery (this cycle may happen a couple of
> times). Is all this complexity only to allow the device’s radio to be in
> full-power communication mode for the duration of the 7 messages instead of
> (7+15) messages or is there any other benefit i’m missing ? Given that the
> radio was in full power mode along with a “fully-primed” TCP connection from
> the UA to the PS, are we really saving any significant energy by not sending
> those 15 messages ? Also there does not seem to be anything that stops a
> particular AS from gaming the system and sending all its messages with
> “high” urgency.
>
> _______________________________________________
> Webpush mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/webpush
>

---

From: Darshak Thakore <[email-masked]>
Date: Thu, 7 Apr 2016 21:41:35 +0000

Thanks, PR 82 addresses my question around Urgency header usage.

Regarding point #2 below, would it make sense to provide some text that
declares this as ³fair-warning² and that PS¹s should address this (maybe
in the security considerations section)

Darshak

On 4/7/16, 12:55 PM, "Martin Thomson" <[email-masked]> wrote:

>> In reviewing the 04 version, I was hoping for some
>>comment/clarification on
>> the Urgency semanics:
>>
>> The last paragraph - ³An absent Urgency header field indicates that the
>> request is to be forwarded at ³normal² urgencyŠ"
>>
>> I¹m assuming this statement applies to the ³Urgency² header only when
>>it is
>> used by the AS to send the message to the PS. Correct? An absent
>>³Urgency²
>> Also in general, i¹m trying to understand how the ³Urgency² header
>>actually
>> AS1 -> PS : Sends 5 messages without the Urgency header so all 5 are
>> ³normal"
>> AS2 -> PS : Sends 2 messages with ³high², 5 with ³low² and 5 with
>>³very-low"
>> AS3 -> PS : Games the system and sends 5 messages with ³high²
>>
>> set to ³high², it doesn¹t get any pushes. If the UA polls the PS
>> subsequently after AS3 sends the messages again with Urgency set to
>>³high",
>> ³expiration² receipts and retry delivery (this cycle may happen a
>>couple of
>> times). Is all this complexity only to allow the device¹s radio to be in
>> (7+15) messages or is there any other benefit i¹m missing ? Given that
>>the
>> radio was in full power mode along with a ³fully-primed² TCP connection
>>from
>> ³high² urgency.

---

From: Brian Raymor <[email-masked]>
Date: Fri, 8 Apr 2016 15:32:42 +0000

We have existing language for DoS that could be adapted:

   A malicious application with a valid push URI could use the greater
   resources of a push service to mount a denial of service attack on a
   user agent.  Push services SHOULD limit the rate at which push
   messages are sent to individual user agents.  A push service or user
   agent MAY terminate subscriptions (Section 8.3) that receive too many
   push messages.

However - for the issue of excessive high-urgency messages, I'm wondering whether the end user would make that decision. If an application server is burning the battery with messages that are either not really high-urgency or excessive in number, then the user would probably identify and remove the offending client application or reconfigure its settings.

Does Mozilla or Google have any experiences to share for this scenario?

Thanks,
...Brian

-----Original Message-----
From: Webpush [mailto:[email-masked]] On Behalf Of Darshak Thakore
Sent: Thursday, April 7, 2016 6:42 PM
To: Martin Thomson <[email-masked]>
Cc: [email-masked]
Subject: Re: [Webpush] question on Urgency semantics in draft-ietf-webpush-protocol-04

Darshak

---

From: Martin Thomson <[email-masked]>
Date: Fri, 8 Apr 2016 14:34:17 -0300

> Does Mozilla or Google have any experiences to share for this scenario?

We don't have much data to share at this point.  However, as I noted,
we do have safeguard mechanisms in place to deal with this.