Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Restrict encryption header values #188

Closed
ghost opened this issue Oct 19, 2015 · 3 comments
Closed

Restrict encryption header values #188

ghost opened this issue Oct 19, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 19, 2015

webpush-wg/webpush-encryption#1 tightens some of the requirements for the Content-Encoding, Encryption, and Encryption-Key headers.

  • Content-Encoding can only be aesgcm128.
  • Encryption and Encryption-Key can only contain one entry.
  • Encryption can't contain a key param.

We could validate this on the server, and reject invalid messages with a 400.

@ghost ghost added the enhancement label Oct 19, 2015
@jrconlin
Copy link
Member

+1 for server based rejection. Should be easy to do there.

@ghost ghost added WebPush ready labels Oct 21, 2015
@bbangert bbangert added this to the PUSHSVC-0: quality milestone Oct 21, 2015
@bbangert
Copy link
Member

bbangert commented May 9, 2016

Depends #379.

@bbangert bbangert added the p1 label Oct 7, 2016
@bbangert bbangert self-assigned this Oct 26, 2016
@ghost
Copy link
Author

ghost commented Oct 26, 2016

Here's what we can check and reject on the server:

  • Missing Encryption header.
  • Encryption header doesn't have any fields or params.
  • dh or salt param in Encryption header is missing, invalid base64url, or has trailing =.
  • Content-Encoding is missing or not aesgcm or aesgcm128.
  • Missing Crypto-Key (new aesgcm encoding) or Encryption-Key (old aesgcm128) header.
  • Optional rs in Encryption header, if specified, is < 2 (or < 1 for aesgcm128) or > 2^36-31.

bbangert added a commit that referenced this issue Nov 15, 2016
Explicitly verify the crypto headers are present and match either the
01 or 04 webpush encryption drafts. This also includes a refactor of
the push schemas to remove the push_validation file.

Closes #188
bbangert added a commit that referenced this issue Nov 15, 2016
Explicitly verify the crypto headers are present and match either the
01 or 04 webpush encryption drafts. This also includes a refactor of
the push schemas to remove the push_validation file.

Closes #188
bbangert added a commit that referenced this issue Nov 15, 2016
Explicitly verify the crypto headers are present and match either the
01 or 04 webpush encryption drafts. This also includes a refactor of
the push schemas to remove the push_validation file.

Closes #188
bbangert added a commit that referenced this issue Nov 15, 2016
Explicitly verify the crypto headers are present and match either the
01 or 04 webpush encryption drafts. This also includes a refactor of
the push schemas to remove the push_validation file.

Closes #188
bbangert added a commit that referenced this issue Nov 16, 2016
Explicitly verify the crypto headers are present and match either the
01 or 04 webpush encryption drafts. This also includes a refactor of
the push schemas to remove the push_validation file.

Closes #188
bbangert added a commit that referenced this issue Nov 16, 2016
Explicitly verify the crypto headers are present and match either the
01 or 04 webpush encryption drafts. This also includes a refactor of
the push schemas to remove the push_validation file.

Closes #188
bbangert added a commit that referenced this issue Nov 16, 2016
Explicitly verify the crypto headers are present and match either the
01 or 04 webpush encryption drafts. This also includes a refactor of
the push schemas to remove the push_validation file.

Closes #188
bbangert added a commit that referenced this issue Nov 16, 2016
Explicitly verify the crypto headers are present and match either the
01 or 04 webpush encryption drafts. This also includes a refactor of
the push schemas to remove the push_validation file.

Closes #188
pjenvey pushed a commit that referenced this issue Nov 16, 2016
* feat: enforce strict crypto header checks

Explicitly verify the crypto headers are present and match either the
01 or 04 webpush encryption drafts. This also includes a refactor of
the push schemas to remove the push_validation file.

Closes #188
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants