Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbounded lease duration #17

Closed
tonyg opened this issue Oct 24, 2016 · 8 comments
Closed

Unbounded lease duration #17

tonyg opened this issue Oct 24, 2016 · 8 comments

Comments

@tonyg
Copy link
Contributor

tonyg commented Oct 24, 2016

The specification of 20 Oct 2016 specifies hub.lease_seconds as specifying a finite number of seconds after which a subscription will expire.

Previous PSHB discussion [1] included discussion of a special value indicating a lease of unbounded duration, for use both in requests from subscribing parties and verifications from hubs. Suggestions for a concrete value included 0 and -1; I'd also like to suggest unbounded here. I also recommend that 0 not be considered as an indication of unboundedness, since it already has a reasonable meaning when interpreted as an actual lease duration.

Having an explicit value would help avoid situations where 'random large integers' like 999999 etc. are used in place of a true unbounded value.

[1] e.g. https://groups.google.com/forum/#!msg/pubsubhubbub/q6_ahhn1FpU/uXW8d58BKAkJ

@dret
Copy link
Member

dret commented Oct 24, 2016

with #20 this problem would go away and simply translate to a subscription resource not signaling a Sunset.

@tonyg
Copy link
Contributor Author

tonyg commented Oct 24, 2016

I don't think that's true: not specifying a lease duration is different to specifying an unbounded lease duration, unless that is explicitly given in the spec as the interpretation of an absent lease duration.

For example, not specifying a lease duration could mean "whatever the hub does by default", rather than "unbounded".

The form by which the information is communicated (hub.lease_seconds vs a Sunset header) doesn't change that the spec still needs clarity on a) how to signal unbounded lease duration and b) what (if permitted) an absent lease duration might mean.

@dret
Copy link
Member

dret commented Oct 24, 2016

I don't think that's true: not specifying a lease duration is different to specifying an unbounded lease duration, unless that is explicitly given in the spec as the interpretation of an absent lease duration.

true. any resource on the web that does not advertise its sunset can disappear at any time.

however, what would be the problem with saying that not asking for hub.lease_seconds is equivalent for an unbounded lease, and the hub responding with not giving hub.lease_seconds or Sunset also is equivalent to such a lease? of course it still can disappear.

if we use #20, a client could find out by HEAD/GET requesting the subscription and if it's 410, then it has disappeared even though it may have been unbounded in theory.

@tonyg
Copy link
Contributor Author

tonyg commented Oct 24, 2016

There would be no problem with that: it is one way of a) signalling unbounded lease duration and b) interpreting a missing lease duration.

My preference would be to make unbounded-duration explicit, and to keep the current behaviour of hub.lease_seconds being mandatory in certain places. But having missing-parameter mean unbounded-duration would also work OK.

@julien51
Copy link
Collaborator

I am strongly opposed to unbound subscriptions for 2 reasons:

  • Garbage collections. Subscribers will go away (nothing is ever permanent on the web!). The hubs should be able to clean the data they store "safely".
  • Security: in the context of signatures, we should expect that https and/or the signature mechanism will eventually be "cracked". In that regard it is much safer to have reasonably short leases (30 to 90 days) to make sure that leaked secrets or too weak algorithms can be replaced when renewing subscriptions.

@aaronpk
Copy link
Member

aaronpk commented Nov 18, 2016

We discussed this with the group during the f2f meeting and came to the conclusion that requiring lease expiration is important.

@aaronpk
Copy link
Member

aaronpk commented Dec 19, 2016

@tonyg just wanted to double check that you're okay with the outcome of this thread.

@tonyg
Copy link
Contributor Author

tonyg commented Dec 19, 2016

Yes, I am. Thank you, Aaron.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants