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

Describe how to check for revocation and downgrades when loading a package #59

Closed
jyasskin opened this issue May 26, 2017 · 2 comments
Closed

Comments

@jyasskin
Copy link
Member

jyasskin commented May 26, 2017

The sketch, which I've run by @sleevi, is:

  1. Check the manifest's signature and that the signing certificate is for the package's claimed origin and that it chains to a trusted root, using intermediate certificates included in the package.
  2. Each package also has an accompanying set of OCSP responses and anti-downgrade information.
  3. The UA checks that the OCSP responses are signed by the certificate's signer and were generated less than 7 days ago.
  4. The UA checks that the anti-downgrade information is signed by a certificate trusted for package's origin (potentially taking advantage of the package's intermediate certs), hasn't expired yet and was signed less than 7 days ago, and says that the package's date is sufficiently recent.
  5. If any of this isn't recent enough, the package identifies a URL from which to fetch newer validity information. This validity information is small (<1kb?), so it should be cheap enough to fetch even when full packages are too expensive.

There's some evidence that we'll still have a significant number of UAs that are fully offline and won't be able to fetch new validity information every week. Depending on the existing HTTP cache's behavior, maybe we don't need to revalidate once we've opened a package once. Maybe it's ok to trust older validations as long as the package doesn't make any network requests, and have revalidation block the package's first network request when the UA gets back online. We'll need to decide what to do about local storage if that validation fails.

I need to add this to the main explainer.

@bmeck
Copy link
Collaborator

bmeck commented Jul 31, 2017

As long as it is an explainer (SHOULD not MUST) +1

@jyasskin
Copy link
Member Author

This is now in https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#signature-validity. It is a bunch of MUSTs. I'm tracking one need to loosen those up in #117. @bmeck, could you file any others you know about?

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

No branches or pull requests

2 participants