rfc-8292

Voluntary Application Server Identification (VAPID) for Web Push

M. Thomson, P. Beverloo
date2017-11 streamIETF areaart wgwebpush statusPROPOSED STANDARD pages14 canonicalhttps://www.rfc-editor.org/rfc/rfc8292 doi10.17487/RFC8292
An application server can use the Voluntary Application Server Identification (VAPID) method described in this document to voluntarily identify itself to a push service. The "vapid" authentication scheme allows a client to include its identity in a signed token with requests that it makes. The signature can be used by the push service to attribute requests that are made by the same application server to a single entity. The identification information can allow the operator of a push service to contact the operator of the application server. The signature can be used to restrict the use of a push message subscription to a single application server.

Extracted elements (28)

design-rationale §1

RFC 8030 deliberately omits mandatory application server authentication to avoid constraining user agent/application server interactions and to preserve privacy properties; VAPID is a voluntary, opt-in supplement that addresses denial-of-service risks and subscription leakage without mandating identity.

security, privacy

design-rationale §2.3

VAPID uses a separate HTTP authentication scheme ('vapid') to identify this specific JWT profile, so that cryptographic agility (algorithm updates) can reuse existing HTTP authentication negotiation mechanisms rather than inventing new parameter negotiation.

security, http, crypto

design-rationale §3.2

X9.62 encoding is used over JWK for the public key parameter because JWK lacks a canonical form (making key comparison harder) and X9.62 is considerably smaller, reducing header size.

crypto, json

interoperability-note §4.2

An application server that needs to replace its signing key must request creation of a new subscription from the user agent restricted to the updated key; there is no in-place key rotation mechanism for existing subscriptions.

security, crypto

normative-requirement §2 MUST NOT

A push service MAY reject a request with a 403 (Forbidden) status code if the JWT signature or its claims are invalid. A push service MUST NOT use information from an invalid token.

security, http

normative-requirement §4.1 MUST

A push service MUST ignore the body of a subscription creation request that uses a media type other than 'application/webpush-options+json', and MUST ignore any unrecognized members in that JSON object.

http, json

normative-requirement §4.2 MUST NOT

A push service MUST NOT forward the JWT or public key to the user agent when delivering the push message.

security, privacy

normative-requirement §4.2 MUST

A push service MUST reject a message sent to a restricted subscription if it includes no 'vapid' authentication or invalid 'vapid' authentication (401 if absent, 403 if invalid).

security, http

normative-requirement §3 MUST

All unknown or unsupported parameters to 'vapid' authentication credentials MUST be ignored. The 'realm' parameter is ignored for this authentication scheme.

http

normative-requirement §3.2 MUST

An application server MUST select a different private key for key exchange (RFC 8291) and for signing the authentication token; a push service SHOULD reject push messages where these keys are identical with a 400 (Bad Request).

crypto, security

normative-requirement §2 MUST NOT

An 'exp' (Expiry) claim MUST be included in the JWT, and MUST NOT be more than 24 hours from the time of the request, limiting the window of token reuse.

security, jose

normative-requirement §2 MUST

The application server signing key pair MUST be usable with ECDSA over the P-256 curve. This key establishes a consistent identity for the application server across multiple push messages.

crypto, security

normative-requirement §2 MUST

The JWT 'aud' (Audience) claim MUST include the Unicode serialization of the origin of the push resource URL, binding the token to a specific push service.

security, jose

normative-requirement §2 MUST

The JWT MUST use JSON Web Signature (JWS) and the signature MUST use ECDSA on the NIST P-256 curve, identified as 'ES256'.

crypto, jose, security

normative-requirement §2.1 SHOULD

The 'sub' claim SHOULD include a contact URI as either a 'mailto:' or 'https:' URI if the application server wishes to provide contact details.

security

normative-requirement §3 MUST NOT

The 'vapid' authentication scheme MUST NOT be used with the Proxy-Authenticate or Proxy-Authorization header fields; it is for origin-server authentication only.

http, security

normative-requirement §4.2 MUST

When a push message subscription has been restricted to an application server, the delivery request MUST include a JWT signed by the corresponding private key.

security

protocol-element §2

The JWT used in VAPID contains at minimum an 'aud' claim (push service origin), an 'exp' claim (expiry ≤24 hours), and optionally a 'sub' claim (contact URI) and additional public/private claims.

jose, crypto

protocol-element §3

The 'vapid' HTTP authentication scheme carries a signed JWT in the 't' parameter and the corresponding ECDSA public key in the 'k' parameter, both in the Authorization header field.

http, crypto, jose

registry §6.2

This document creates the 'VAPID Authentication Scheme Parameters' registry (under 'Web Push Parameters'), operating under Specification Required policy, with initial entries for the 't' (JWT token) and 'k' (signing key) parameters.

registry, http

registry §6.3

This document registers the 'application/webpush-options+json' media type in the IANA Media Types registry for use with the Web Push protocol subscription restriction mechanism.

registry, json, http

registry §6.1

This document registers the 'vapid' authentication scheme in the IETF 'Hypertext Transfer Protocol (HTTP) Authentication Scheme Registry' established by RFC 7235.

registry, http

security-consideration §5

Changing a signing key breaks linkability between push messages; gradual migration to a new key reduces the risk that requests with the new key are misclassified as abusive by push services that track consistent identity.

security

security-consideration §5

Contact information in the 'sub' claim is unvalidated; a push service operator MUST NOT use unvalidated contact information as input to security-critical decisions.

security

security-consideration §5

JWT signature validation is computationally expensive, which is problematic for denial-of-service mitigation. Application servers are encouraged to reuse tokens so that push services can cache validation results.

security

security-consideration §5

The 'vapid' authentication scheme is vulnerable to replay attacks if an attacker acquires a valid JWT. HTTPS (required by RFC 8030) provides confidentiality, and limiting token validity to 24 hours reduces the value of a stolen token.

security, crypto

wire-format §4.1

For subscription restriction, a JSON body of media type 'application/webpush-options+json' is sent with the subscription creation request; it contains a 'vapid' member holding the base64url-encoded uncompressed P-256 public key.

json, crypto, http

wire-format §3.2

The 'k' parameter carries an ECDSA P-256 public key in uncompressed form per X9.62 encoding, then base64url-encoded per RFC 7515. This is the application server's signing public key.

crypto, jose