RFC 7469
Public Key Pinning Extension for HTTP
Part 1 of 6 ๐
Public Key Pinning Extension for HTTP ๐
- Series: Internet Engineering Task Force (IETF)
- RFC number: 7469
- Authors: C. Evans, C. Palmer, and R. Sleevi (R. Sleevi is at Google, Inc.)
- Category: Standards Track
- ISSN: 2070-1721
- Date: April 2015
- Obsoletes/Updates: The title block doesn't list anything this one obsoletes or updates.
Abstract ๐ธ
okay so this doc makes a brand new HTTP header that lets web host operators tell user agents (UAs) to remember ("pin") a host's cryptographic identity for a while. ๐ During that window, UAs will require that the host shows up with a certificate chain that has at least one Subject Public Key Info structure whose fingerprint matches one of the pinned fingerprints for that host. โจ Basically, fewer trusted authorities can vouch for the domain while the pin is alive, so pinning may cut down on man-in-the-middle attacks caused by compromised Certification Authorities. iconic ๐
Status of This Memo ๐
bestie, this is an Internet Standards Track document. ๐
It's a product of the Internet Engineering Task Force (IETF), it represents the consensus of the IETF community, it got public review, and the Internet Engineering Steering Group (IESG) approved it for publication. If you want more on Internet Standards, check Section 2 of RFC 5741. ๐
For the current status, any errata, and how to send feedback, look at http://www.rfc-editor.org/info/rfc7469. ๐
Copyright Notice ยฉ๏ธ
Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved. ๐ฆ
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as in effect on the date of publication. Please read these carefully, because they spell out your rights and restrictions for this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as described in the Simplified BSD License. ๐ซถ
Table of Contents ๐บ๏ธ
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5
2. Server and Client Behavior . . . . . . . . . . . . . . . . . 5
2.1. Response Header Field Syntax . . . . . . . . . . . . . . 5
2.1.1. The Pin Directive . . . . . . . . . . . . . . . . . . 6
2.1.2. The max-age Directive . . . . . . . . . . . . . . . . 7
2.1.3. The includeSubDomains Directive . . . . . . . . . . . 7
2.1.4. The report-uri Directive . . . . . . . . . . . . . . 7
2.1.5. Examples . . . . . . . . . . . . . . . . . . . . . . 8
2.2. Server Processing Model . . . . . . . . . . . . . . . . . 9
2.2.1. HTTP-over-Secure-Transport Request Type . . . . . . . 9
2.2.2. HTTP Request Type . . . . . . . . . . . . . . . . . . 9
2.3. User Agent Processing Model . . . . . . . . . . . . . . . 10
2.3.1. Public-Key-Pins Response Header Field Processing . . 10
2.3.2. Interaction of Public-Key-Pins and Public-Key-Pins-
Report-Only . . . . . . . . . . . . . . . . . . . . . 11
2.3.3. Noting a Pinned Host - Storage Model . . . . . . . . 11
2.3.4. HTTP-Equiv <Meta> Element Attribute . . . . . . . . . 13
2.4. Semantics of Pins . . . . . . . . . . . . . . . . . . . . 13
2.5. Noting Pins . . . . . . . . . . . . . . . . . . . . . . . 14
2.6. Validating Pinned Connections . . . . . . . . . . . . . . 15
2.7. Interactions with Preloaded Pin Lists . . . . . . . . . . 16
2.8. Pinning Self-Signed End Entities . . . . . . . . . . . . 16
3. Reporting Pin Validation Failure . . . . . . . . . . . . . . 16
4. Security Considerations . . . . . . . . . . . . . . . . . . . 19
4.1. Maximum max-age . . . . . . . . . . . . . . . . . . . . . 19
4.2. Using includeSubDomains Safely . . . . . . . . . . . . . 20
4.3. Backup Pins . . . . . . . . . . . . . . . . . . . . . . . 21
4.4. Interactions With Cookie Scoping . . . . . . . . . . . . 21
4.5. Hostile Pinning . . . . . . . . . . . . . . . . . . . . . 21
5. Privacy Considerations . . . . . . . . . . . . . . . . . . . 22
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24
7. Usability Considerations . . . . . . . . . . . . . . . . . . 24
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 24
8.1. Normative References . . . . . . . . . . . . . . . . . . 24
8.2. Informative References . . . . . . . . . . . . . . . . . 26
Appendix A. Fingerprint Generation . . . . . . . . . . . . . . . 27
Appendix B. Deployment Guidance . . . . . . . . . . . . . . . . 27
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 28
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28
1. Introduction โจ
okay so this doc defines a new HTTP header that lets UAs figure out which Subject Public Key Info (SPKI) structures will show up in a web host's certificate chain on future Transport Layer Security (TLS) [RFC5246] connections. ๐
Deploying Public Key Pinning (PKP) safely takes real operational and organizational maturity ๐ง , because hosts can make themselves unreachable by pinning to a set of SPKIs that stops being valid (see Section 4). ๐ฌ With care, though, host operators can seriously cut the risk of man-in-the-middle (MITM) attacks and other false-authentication problems for their users without taking on undue risk. ๐
PKP is meant to be used together with HTTP Strict Transport Security (HSTS) [RFC6797], but you can pin keys without HSTS too. ๐
A Pin is a relationship between a hostname and a cryptographic identity. In this document, that identity is one or more of the public keys in a chain of X.509 certificates. ๐ฆ Pin Validation is the process a UA goes through to make sure a host is actually authenticated with its previously established Pin. ๐
Key pinning is a trust-on-first-use (TOFU) mechanism. ๐ซฃ The first time a UA connects to a host, it doesn't have the info it needs to do Pin Validation, so it can only apply its normal cryptographic identity validation. (In this document, it is assumed that UAs apply X.509 certificate chain validation in accord with [RFC5280].)
The UA can't detect and stop a MITM attacking its first connection to the host. ๐ญ (Still, the MITM has to provide an X.509 certificate chain that gets through the UA's validation requirements without error, which helps a little.) Worse, that MITM can inject its own PKP header into the HTTP stream and pin the UA to its own keys. ๐ To avoid detection after the fact, the attacker would have to be in a position to intercept all future requests to the host from that UA.
So yeah, key pinning as described here is not a perfect defense against MITM attackers who can pass certificate chain validation procedures. Honestly, nothing short of pre-shared keys is. ๐ But it's still hugely valuable, because it lets host operators limit how many certification authorities can vouch for the host's identity, and it lets UAs catch in-process MITM attacks after the initial communication. ๐
1.1. Requirements Language ๐
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. ๐
2. Server and Client Behavior ๐
2.1. Response Header Field Syntax ๐ง
The "Public-Key-Pins" and "Public-Key-Pins-Report-Only" header fields are also called the PKP and PKP-RO header fields in this spec. They're new response headers defined here. ๐ A server uses them to tell a UA that it should do Pin Validation (Section 2.6) for the host that sent the response, and they give the UA the info it needs to do that. ๐ซถ
Figure 1 describes the syntax of the header fields in Augmented Backus-Naur Form (ABNF), using the grammar from [RFC5234] and the rules from Section 3.2 of [RFC7230]. Both header fields' values follow the same rules. โจ
Public-Key-Directives = directive *( OWS ";" OWS directive )
directive = directive-name [ "=" directive-value ]
directive-name = token
directive-value = token
/ quoted-string
Figure 1: HPKP Header Syntax
Optional white space (OWS) works the way Section 3.2.3 of [RFC7230] says. token and quoted-string work the way Section 3.2.6 of [RFC7230] says. ๐
The directives this spec defines are described below. Here are the overall requirements for directives, lowkey the most important part of this section ๐:
- The order that directives appear in doesn't matter. ๐
- Except for pin-directives with the same pin-directive-name (more on that below), a given directive MUST NOT appear more than once in a given header field. Directives are either optional or required, depending on how they're defined. ๐
- Directive names are case insensitive. ๐ค
- UAs MUST ignore any header fields containing directives, or other header field value data, that don't conform to the syntax defined in this specification. Also, UAs must not attempt to fix malformed header fields. ๐ โโ๏ธ
- If a header field has any directive(s) the UA doesn't recognize, the UA MUST ignore those directives. ๐ซฅ
- If the PKP or PKP-RO header field otherwise satisfies the above requirements (1 through 5), the UA MUST process the directives it recognizes. ๐
Additional directives that extend the semantic functionality of these header fields can be defined in other specifications. The first such specification will need to define a registry for those directives. ๐๏ธ Future directives like that will be ignored by UAs that only implement this specification, and also by UAs that are generally non-conforming. ๐
When a connection passes Pin Validation using the UA's noted Pins for the host at that time, the host becomes a Known Pinned Host. ๐ฆ๐
2.1.1. The Pin Directive ๐
okay so the pin directive is how web host operators say "hey, this cryptographic identity belongs to me" ๐ its syntax is super simple:
pin-directive = pin-directive-name "=" pin-directive-value
pin-directive-name = "pin-" token
pin-directive-value = quoted-string
Figure 2: Pin Directive Syntax
the token is the name of a cryptographic hash algorithm ๐ง the only one allowed right now is "sha256", aka the hash algorithm SHA256 [RFC6234]. more algorithms may be allowed in this context later, so keep your eyes peeled ๐ the quoted-string is a sequence of base 64 digits, which is the base64-encoded SPKI Fingerprint [RFC4648] (see Section 2.4). โจ
now the drama ๐ญ according to the processing rules of Section 2.1, the UA MUST ignore pin-directives whose tokens name hash algorithms it doesn't recognize. if the set of remaining effective pin-directives is empty and the host is a Known Pinned Host, the UA MUST cease to consider the host as a Known Pinned Host (the UA should fail open). the UA should also tell users that the host is no longer a Known Pinned Host ๐ซถ
quick note ๐ per the processing rules of Section 2.1, the pin-directive-name is case insensitive, so PIN-SHA256 and pin-sha256 are the same vibe ๐
2.1.2. The max-age Directive โณ
the "max-age" directive is the number of seconds after the PKP header field is received during which the UA SHOULD regard the host (the one the message came from) as a Known Pinned Host. it's basically the timer โฐ
the "max-age" directive is REQUIRED to be present within a "Public-Key-Pins" header field. it's meaningless inside a "Public-Key-Pins-Report-Only" header field, so UAs MUST ignore it and not cache the header there. see Section 2.3.3 ๐
it also REQUIRED to have a directive value. after quoted-string unescaping (if needed), the syntax is:
max-age-value = delta-seconds
delta-seconds = 1*DIGIT
Figure 3: max-age Value Syntax
delta-seconds is used as defined in [RFC7234], Section 1.2.1 ๐ and for limits on how big (or small) max-age can get, check out Section 2.3.3 ๐
2.1.3. The includeSubDomains Directive ๐ธ
the OPTIONAL includeSubDomains directive is a valueless directive. if it's there (aka "asserted"), it tells the UA that the Pinning Policy covers this Pinned Host and any subdomains of the host's domain name. main character energy for your whole domain ๐
2.1.4. The report-uri Directive ๐ฃ
the OPTIONAL report-uri directive points to the URI where the UA SHOULD report Pin Validation failures (Section 2.6). the UA POSTs the reports to that URI as described in Section 3 ๐ฆ
when it shows up in a PKP or PKP-RO header, it tells the UA that if Pin Validation fails, it SHOULD POST a report to the report-uri. if the header is Public-Key-Pins, the UA should do this in addition to terminating the connection (as described in Section 2.6) ๐
hosts can set report-uris that use HTTP or HTTPS. if the scheme uses TLS (like HTTPS), UAs MUST perform Pinning Validation when the host in the report-uri is a Known Pinned Host. similarly, UAs MUST apply HSTS if the host in the report-uri is a Known HSTS Host ๐ฅ
also, the report-uri doesn't have to be in the same Internet domain or web origin as the host it's reporting about. no rules there, just vibes ๐
UAs SHOULD make their best effort to report Pin Validation failures to the report-uri, but they may fail to report in exceptional conditions. for example, if connecting to the report-uri itself hits a Pinning Validation failure or some other certificate validation failure, the UA MUST cancel the connection. ๐ซ
and then there's the loop situation ๐ if Known Pinned Host A sets a report-uri pointing at Known Pinned Host B, and B sets a report-uri pointing back at A, and both hosts fail Pin Validation, the UA SHOULD detect and break the loop by not sending reports to or about those hosts. nobody wants an infinite ping-pong match ๐
if a report fails, the UA MAY attempt to re-send it later ๐
last one: UAs SHOULD limit the rate at which they send reports. for example, there's no point sending the same report to the same report-uri more than once per distinct set of declared Pins ๐
2.1.5. Examples ๐
Figure 4 shows some example PKP and PKP-RO response header fields. (Lines are folded so they fit ๐ง)
Public-Key-Pins: max-age=3000;
pin-sha256="d6qzRu9zOECb90Uez27xWltNsj0e1Md7GkYYkVoZWmM=";
pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g="
Public-Key-Pins: max-age=2592000;
pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=";
pin-sha256="LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ="
Public-Key-Pins: max-age=2592000;
pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=";
pin-sha256="LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=";
report-uri="http://example.com/pkp-report"
Public-Key-Pins-Report-Only: max-age=2592000;
pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=";
pin-sha256="LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=";
report-uri="https://other.example.net/pkp-report"
Public-Key-Pins:
pin-sha256="d6qzRu9zOECb90Uez27xWltNsj0e1Md7GkYYkVoZWmM=";
pin-sha256="LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=";
max-age=259200
Public-Key-Pins:
pin-sha256="d6qzRu9zOECb90Uez27xWltNsj0e1Md7GkYYkVoZWmM=";
pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=";
pin-sha256="LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=";
max-age=10000; includeSubDomains
Figure 4: HTTP Public Key Pinning (HPKP) Header Examples
2.2. Server Processing Model ๐ฅ๏ธ
this section describes the processing model that Pinned Hosts implement ๐ the model has 2 parts: (1) the processing rules for HTTP request messages received over a secure transport (e.g., authenticated, non-anonymous TLS), and (2) the processing rules for HTTP request messages received over non-secure transports, such as TCP.
2.2.1. HTTP-over-Secure-Transport Request Type ๐
when replying to an HTTP request that came in over a secure transport, a Pinned Host SHOULD include in its response exactly one PKP header field, exactly one PKP-RO header field, or one of each. every instance of either header field MUST satisfy the grammar in Section 2.1 โจ
establishing a given host as a Known Pinned Host (for a given UA) happens in one of two ways:
- Over the HTTP protocol running over secure transport, by correctly returning (per this specification) at least one valid PKP header field to the UA.
- Through other mechanisms, such as a client-side preloaded Known Pinned Host List. ๐
2.2.2. HTTP Request Type ๐ช
Pinned Hosts SHOULD NOT include the PKP header field in HTTP responses conveyed over non-secure transport. UAs MUST ignore any PKP header received in an HTTP response conveyed over non-secure transport. no PKP over the insecure lane, bestie ๐ซ
2.3. User Agent Processing Model ๐ง
the UA processing model relies on parsing domain names. note that internationalized domain names SHALL be canonicalized according to the scheme in Section 10 of [RFC6797] ๐
2.3.1. Public-Key-Pins Response Header Field Processing ๐ฏ
if the UA receives, over a secure transport, an HTTP response that includes a PKP header field conforming to the grammar in Section 2.1, and there are no underlying secure transport errors or warnings (see Section 2.5), the UA MUST do one of these:
- Note the host as a Known Pinned Host if it isn't already noted (see Section 2.3.3),
or,
- Update the UA's cached information for the Known Pinned Host if any of the max-age, includeSubDomains, or report-uri header field value directives convey information different from what the UA already has ๐
the max-age value is basically a "time to live" counted from the most recent time the PKP header field was seen โณ if the max-age header field value token is 0, the UA MUST remove its cached Pinning Policy information (including the includeSubDomains directive, if asserted) when the Pinned Host is Known. if it isn't Known yet, the UA MUST NOT note this Pinned Host ๐
if a UA gets more than one PKP header field, or more than one PKP-RO header field, in one HTTP response over a secure transport, the UA MUST process only the first PKP header field (if present) and only the first PKP-RO header field (if present) ๐ฅ
if the UA gets the HTTP response over an insecure transport, or the PKP header isn't a Valid Pinning Header (see Section 2.5), the UA MUST ignore any present PKP header field(s). similarly, if the UA gets the HTTP response over an insecure transport, the UA MUST ignore any present PKP-RO header field(s). and the UA MUST ignore any PKP or PKP-RO header fields that don't conform to the grammar in Section 2.1 ๐
2.3.2. Interaction of Public-Key-Pins and Public-Key-Pins-Report-Only ๐ค
a server MAY set both the "Public-Key-Pins" and "Public-Key-Pins-Report-Only" headers at the same time ๐ญ the headers don't interact with each other, but the UA MUST process the PKP header and SHOULD process both.
the headers are processed according to Section 2.3.1 ๐
when the PKP-RO header is used with a report-uri, the UA SHOULD POST reports for Pin Validation failures to the indicated report-uri, although the UA MUST NOT enforce Pin Validation. so when the host has set the PKP-RO header and Pin Validation fails, the UA runs Pin Validation to decide whether it should POST a report, but not whether it should cause a connection failure ๐
Note: there is no purpose to using the PKP-RO header without the report-uri directive. User Agents MAY discard such headers without interpreting them further. ๐๏ธ
when the PKP header is used with a report-uri, the UA SHOULD POST reports for Pin Validation failures to the indicated report-uri, as well as enforce Pin Validation ๐ช
if a host sets the PKP-RO header, the UA SHOULD note the Pins and directives given in it, ignoring any max-age directive. if the UA does note them, it SHOULD evaluate the specified policy and SHOULD report any would-be Pin Validation failures that would happen if the report-only policy were enforced ๐งช
if a host sets both the PKP header and the PKP-RO header, the UA MUST note and enforce Pin Validation as specified by the PKP header, and SHOULD process the Pins and directives given in the PKP-RO header. if the UA does process them, it SHOULD evaluate the specified policy and SHOULD report any would-be Pin Validation failures that would occur if the report-only policy were enforced ๐ซง
2.3.3. Noting a Pinned Host - Storage Model ๐
okay so the Effective Pin Date of a Known Pinned Host is literally the moment the UA saw a Valid Pinning Header for that host ๐ฐ๏ธโจ The Effective Expiration Date is that Effective Pin Date plus the max-age. A Known Pinned Host is "expired" if its Effective Expiration Date is in the past. The UA MUST ignore any expired Known Pinned Hosts in its cache. ๐
For example, say a UA is about to do Pin Validation for a Known Pinned Host and the cached info shows an Effective Expiration Date in the past. The UA MUST NOT continue with Pin Validation for that host, and MUST consider the host to no longer be a Known Pinned Host. no cap, that's a hard stop ๐ โโ๏ธ
Known Pinned Hosts are only identified by domain names, never IP addresses ๐ซ๐ If the substring matching the host production from the Request-URI (of the message the host responded to) syntactically matches the IP-literal or IPv4address productions from Section 3.2.2 of [RFC3986], then the UA MUST NOT note this host as a Known Pinned Host.
Otherwise, if the substring does not congruently match an existing Known Pinned Host's domain name, per the matching procedure specified in Section 8.2 of [RFC6797], then the UA MUST add this host to the Known Pinned Host cache. The UA caches:
- the Pinned Host's domain name,
- the Effective Expiration Date, or enough information to calculate it (the Effective Pin Date and the value of the max-age directive),
- whether or not the includeSubDomains directive is asserted, and
- the value of the report-uri directive, if present.
If any other metadata from optional or future PKP header directives are present in the Valid Pinning Header, and the UA understands them, the UA MAY note them as well. ๐ง โจ
UAs MAY set an upper limit on the value of max-age, so that UAs that have noted erroneous Pins (whether by accident or due to attack) have some chance of recovering over time. ๐ If the server sets a max-age greater than the UA's upper limit, the UA MAY behave as if the server set the max-age to the UA's upper limit. For example, if the UA caps max-age at 5,184,000 seconds (60 days), and a Pinned Host sets a max- age directive of 90 days in its Valid Pinning Header, the UA MAY behave as if the max-age were effectively 60 days. (One way to achieve this behavior is for the UA to simply store a value of 60 days instead of the 90-day value provided by the Pinned Host.) For UA implementation guidance on how to select a maximum max-age, see Section 4.1. ๐ฏ
The UA MUST NOT modify any pinning metadata of any superdomain matched Known Pinned Host. ๐ โโ๏ธ
The UA MUST NOT cache information derived from a PKP-RO header. (PKP-RO headers are useful only at the time of receipt and processing.) ๐ซถ
2.3.4. HTTP-Equiv <Meta> Element Attribute ๐
UAs MUST NOT heed http-equiv="Public-Key-Pins" or http-equiv="Public-Key-Pins-Report-Only" attribute settings on <meta> elements [W3C.REC-html401-19991224] in received content. ๐
2.4. Semantics of Pins ๐
okay the SPKI Fingerprint is the output of a known cryptographic hash algorithm whose input is the DER-encoded ASN.1 representation of the Subject Public Key Info (SPKI) of an X.509 certificate. ๐ง A Pin is the combination of the known algorithm identifier and the SPKI Fingerprint computed using that algorithm. ๐
The SPKI Fingerprint is encoded in base 64 for use in an HTTP header [RFC4648]. ๐ฌ
In this version of the specification, the known cryptographic hash algorithm is SHA-256, identified as "sha256" [RFC6234]. (Future specifications may add new algorithms and deprecate old ones.) UAs MUST ignore Pins for which they do not recognize the algorithm identifier. UAs MUST continue to process the rest of a PKP response header field and note Pins for algorithms they do recognize. ๐ซง
Figure 5 reproduces the definition of the SubjectPublicKeyInfo structure in [RFC5280]. ๐
SubjectPublicKeyInfo ::= SEQUENCE {
algorithm AlgorithmIdentifier,
subjectPublicKey BIT STRING }
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL }
Figure 5: SPKI Definition
If the certificate's Subject Public Key Info is incomplete when taken in isolation, such as when holding a DSA key without domain parameters, a public key pin cannot be formed. ๐
We pin public keys, rather than entire certificates, to enable operators to generate new certificates containing old public keys (see [why-pin-key]). It's giving smart design ๐ง ๐
See Appendix A for an example non-normative program that generates SPKI Fingerprints from certificates. ๐ง
2.5. Noting Pins ๐
Upon receipt of the PKP response header field, the UA notes the host as a Known Pinned Host, storing the Pins and their associated directives in non-volatile storage (for example, along with the HSTS metadata). The Pins and their associated directives are collectively known as Pinning Metadata. ๐๏ธโจ
The UA MUST note the Pins for a Host if and only if all three of the following conditions hold:
- It received the PKP response header field over an error-free TLS connection. If the host is a Pinned Host, this includes the validation added in Section 2.6.
- The TLS connection was authenticated with a certificate chain containing at least one of the SPKI structures indicated by at least one of the given SPKI Fingerprints (see Section 2.6).
- The given set of Pins contains at least one Pin that does NOT refer to an SPKI in the certificate chain. (That is, the host must set a Backup Pin; see Section 4.3.)
If the PKP response header field does not meet all three of these criteria, the UA MUST NOT note the host as a Pinned Host. A PKP response header field that meets all these criteria is known as a Valid Pinning Header. โ
Whenever a UA receives a Valid Pinning Header, it MUST set its Pinning Metadata to the exact Pins, Effective Expiration Date (computed from max-age), and (if any) report-uri given in the most recently received Valid Pinning Header. ๐
For forward compatibility, the UA MUST ignore any unrecognized PKP and PKP-RO header directives, while still processing those directives it does recognize. Section 2.1 specifies the directives max-age, Pins, includeSubDomains, and report-uri, but future specifications and implementations might use additional directives. ๐ฎ
Upon receipt of a PKP-RO response header field, the UA SHOULD evaluate the policy expressed in the field, and SHOULD generate and send a report (see Section 3). However, failure to validate the Pins in the field MUST have no effect on the validity or non-validity of the policy expressed in the PKP field or in previously noted Pins for the Known Pinned Host. ๐
The UA need not note any Pins or other policy expressed in the PKP-RO response header field, except for the purpose of determining that it has already sent a report for a given policy. UAs SHOULD make a best effort not to inundate report-uris with redundant reports. ๐ฌ๐ โโ๏ธ
2.6. Validating Pinned Connections ๐
When a UA connects to a Pinned Host using a TLS connection, if the TLS connection has errors, the UA MUST terminate the connection without allowing the user to proceed anyway. (This behavior is the same as that required by [RFC6797].) ๐จ
If the connection has no errors, then the UA will determine whether to apply a new, additional correctness check: Pin Validation. A UA SHOULD perform Pin Validation whenever connecting to a Known Pinned Host, as soon as possible (e.g., immediately after receiving the Server Certificate message). It is acceptable to allow Pin Validation to be disabled for some Hosts according to local policy. For example, a UA may disable Pin Validation for Pinned Hosts whose validated certificate chain terminates at a user-defined trust anchor, rather than a trust anchor built-in to the UA (or underlying platform). ๐ง
To perform Pin Validation, the UA will compute the SPKI Fingerprints for each certificate in the Pinned Host's validated certificate chain, using each supported hash algorithm for each certificate. (As described in Section 2.4, certificates whose SPKI cannot be taken in isolation cannot be pinned.) The UA MUST ignore superfluous certificates in the chain that do not form part of the validating chain. The UA will then check that the set of these SPKI Fingerprints intersects the set of SPKI Fingerprints in that Pinned Host's Pinning Metadata. If there is set intersection, the UA continues with the connection as normal. Otherwise, the UA MUST treat this Pin Validation failure as a non-recoverable error. Any procedure that matches the results of this Pin Validation procedure is considered equivalent. ๐๐
A UA that has previously noted a host as a Known Pinned Host MUST perform Pin Validation when setting up the TLS session, before beginning an HTTP conversation over the TLS channel. ๐ค
UAs send validation failure reports only when Pin Validation is actually in effect. Pin Validation might not be in effect, e.g., because the user has elected to disable it, or because a presented certificate chain chains up to a user-defined trust anchor. In such cases, UAs SHOULD NOT send reports. ๐ต
2.7. Interactions with Preloaded Pin Lists ๐
UAs MAY choose to implement additional sources of pinning information, such as through built-in lists of pinning information. Such UAs should allow users to override such additional sources, including disabling them from consideration. ๐๏ธ
The effective policy for a Known Pinned Host that has both built-in Pins and Pins from previously observed PKP header response fields is implementation-defined. ๐คทโโ๏ธ
2.8. Pinning Self-Signed End Entities ๐ธ
If UAs accept hosts that authenticate themselves with self-signed end entity certificates, they MAY also allow hosts to pin the public keys in such certificates. The usability and security implications of this practice are outside the scope of this specification. ๐โจ
3. Reporting Pin Validation Failure โจ
okay so bestie, if a Known Pinned Host has set the report-uri directive, the UA SHOULD report Pin Validation failures to that URI ๐ฌ It does this by POSTing a JSON [RFC7159] message to the URI, and the JSON message looks like this ๐
{
"date-time": date-time,
"hostname": hostname,
"port": port,
"effective-expiration-date": expiration-date,
"include-subdomains": include-subdomains,
"noted-hostname": noted-hostname,
"served-certificate-chain": [
pem1, ... pemN
],
"validated-certificate-chain": [
pem1, ... pemN
],
"known-pins": [
known-pin1, ... known-pinN
]
}
Figure 6: JSON Report Format
whitespace outside of quoted strings is not significant ๐ซถ the key/value pairs can show up in any order, but each one MUST appear only once, no duplicates, periodt ๐
the date-time is the time the UA observed the Pin Validation failure ๐ฐ๏ธ it's a string formatted according to Section 5.6, "Internet Date/Time Format", of [RFC3339].
the hostname is the hostname the UA originally made the request to that failed Pin Validation ๐ธ it's a string.
the port is the port the UA originally made that request to ๐ it's an integer.
the effective-expiration-date is the Effective Expiration Date for the noted Pins โณ it's a string formatted according to Section 5.6, "Internet Date/Time Format", of [RFC3339].
include-subdomains tells you whether the UA noted the includeSubDomains directive for the Known Pinned Host ๐ it's one of the JSON identifiers "true" or "false".
noted-hostname is the hostname the UA noted when it noted the Known Pinned Host ๐ this is the bit that helps operators understand why Pin Validation was performed for, e.g., foo.example.com when the noted Known Pinned Host was example.com with includeSubDomains set. it's giving clarity, lowkey iconic ๐ง
the served-certificate-chain is the certificate chain exactly as the Known Pinned Host served it during TLS session setup ๐ it's an array of strings, and each string pem1, ... pemN is the Privacy-Enhanced Mail (PEM) representation of each X.509 certificate, as described in [RFC7468].
the validated-certificate-chain is the certificate chain the UA built itself during certificate chain verification ๐ ๏ธ this may differ from the served-certificate-chain, so don't be shook if they don't match. it's also an array of strings, with each string pem1, ... pemN being the PEM representation of each X.509 certificate as described in [RFC7468]. UAs that build certificate chains in more than one way during the validation process SHOULD send the last chain built ๐ that way they avoid keeping too much state around during validation, which is very much a "less is more" moment ๐
the known-pins are the Pins the UA has noted for the Known Pinned Host ๐ they're an array of strings with this syntax:
known-pin = token "=" quoted-string
Figure 7: Known Pin Syntax
as in Section 2.4, the token refers to the algorithm name, and the quoted-string refers to the base64 encoding of the SPKI Fingerprint ๐ง when the UA formulates the JSON POST body, it MUST either use single-quoted JSON strings, or use double-quoted JSON strings and backslash-escape the embedded double quotes in the quoted-string part of the known-pin. no skipping this one, bestie ๐
here's an example of a Pin Validation failure report ๐ฆ (the PEM strings are split across multiple lines so they're easier to read, btw โจ)
{
"date-time": "2014-04-06T13:00:50Z",
"hostname": "www.example.com",
"port": 443,
"effective-expiration-date": "2014-05-01T12:40:50Z"
"include-subdomains": false,
"served-certificate-chain": [
"-----BEGIN CERTIFICATE-----\n
MIIEBDCCAuygAwIBAgIDAjppMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT\n
...
HFa9llF7b1cq26KqltyMdMKVvvBulRP/F/A8rLIQjcxz++iPAsbw+zOzlTvjwsto\n
WHPbqCRiOwY1nQ2pM714A5AuTHhdUDqB1O6gyHA43LL5Z/qHQF1hwFGPa4NrzQU6\n
yuGnBXj8ytqU0CwIPX4WecigUCAkVDNx\n
-----END CERTIFICATE-----",
...
],
"validated-certificate-chain": [
"-----BEGIN CERTIFICATE-----\n
MIIEBDCCAuygAwIBAgIDAjppMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT\n
...
HFa9llF7b1cq26KqltyMdMKVvvBulRP/F/A8rLIQjcxz++iPAsbw+zOzlTvjwsto\n
WHPbqCRiOwY1nQ2pM714A5AuTHhdUDqB1O6gyHA43LL5Z/qHQF1hwFGPa4NrzQU6\n
yuGnBXj8ytqU0CwIPX4WecigUCAkVDNx\n
-----END CERTIFICATE-----",
...
],
"known-pins": [
'pin-sha256="d6qzRu9zOECb90Uez27xWltNsj0e1Md7GkYYkVoZWmM="',
"pin-sha256=\"E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=\""
]
}
Figure 8: Pin Validation Failure Report Example
4. Security Considerations ๐
okay this section is serious, so let's get into it ๐ pinning public keys helps hosts strongly assert their cryptographic identity, even when an issuer makes a mistake, acts badly, or gets compromised ๐ก๏ธ but there's some risk that a host operator could lose (or lose control of) their host's private key, like through operator error or host compromise ๐ญ if the operator had pinned only the key of the host's end-entity certificate, they wouldn't be able to serve their web site or application in a way UAs would trust for the duration of their pin's max-age. (recall that UAs MUST close the connection to a host upon Pin Failure ๐ช)
so there's a necessary trade-off between two competing goods ๐ญ on one side you've got pin specificity and maximal reduction of the scope of issuers, and on the other side you've got flexibility and resilience of the host's cryptographic identity. one way to balance it is to pin to the key(s) of the issuer(s) of the host's end-entity certificate(s) โจ often a valid certificate chain has at least two certificates above the end-entity certificate: the intermediate issuer and the trust anchor. operators can pin any one or more of the public keys in this chain, and they indeed MUST pin to issuers not in the chain (as, for example, a Backup Pin) ๐งท pinning to an intermediate issuer, or even to a trust anchor or root, still significantly reduces the number of issuers who can issue end-entity certificates for the Known Pinned Host, while still giving that host the flexibility to change keys without a disruption of service ๐ท
4.1. Maximum max-age
as mentioned in Section 2.3.3, UAs MAY cap the max-age value at some upper limit ๐งข there's a security trade-off here: low maximum values give a narrow window of protection for users who only visit the Known Pinned Host infrequently, while high maximum values might mean a UA can't successfully perform Pin Validation for a Known Pinned Host if the UA's noted Pins and the host's true Pins diverge ๐ฌ
that divergence could happen for several reasons, including UA error, host operator error, a network attack, or a Known Pinned Host that intentionally migrates all pinned keys, combined with a UA that has noted true Pins with a high max-age value and hasn't had a chance to observe the new true Pins for the host. (this last example really underscores why host operators should phase in new keys gradually, and set the max-age value in line with their planned key migration schedule ๐ ) there's probably no ideal upper limit to the max-age directive that satisfies every use case ๐คทโโ๏ธ however, a value on the order of 60 days (5,184,000 seconds) may be considered a balance between the two competing security concerns ๐
4.2. Using includeSubDomains Safely
it can happen that Pinned Hosts whose hostnames share a parent domain use different Valid Pinning Headers ๐ฏ if a host whose hostname is a parent domain for another host sets the includeSubDomains directive, the two hosts' Pins may conflict with each other. for example, consider two Known Pinned Hosts, example.com and subdomain.example.com. assume example.com sets a Valid Pinning Header like this:
Public-Key-Pins: max-age=12000; pin-sha256="ABC...";
pin-sha256="DEF..."; includeSubDomains
Figure 9: example.com Valid Pinning Header
assume subdomain.example.com sets a Valid Pinning Header like this:
Public-Key-Pins: pin-sha256="GHI..."; pin-sha256="JKL..."
Figure 10: subdomain.example.com Valid Pinning Header
now assume a UA that hasn't previously noted any Pins for either of these hosts ๐ซ if the UA first contacts subdomain.example.com, it will note the Pins in the Valid Pinning Header and perform Pin Validation as normal on subsequent connections. if the UA then contacts example.com, again it will note the Pins and perform Pin Validation on future connections. easy peasy ๐ญ
but, if the UA happened to visit example.com before subdomain.example.com, then because of example.com's use of the includeSubDomains directive, the UA would attempt to perform Pin Validation for subdomain.example.com using the SPKI hashes ABC... and DEF..., which are not valid for the certificate chains subdomain.example.com uses (the ones with SPKIs GHI... and JLK...) ๐ฑ so depending on the order the UA sees the Valid Pinning Headers for example.com and subdomain.example.com, Pin Validation might or might not fail for subdomain.example.com, even if the certificate chain the UA gets for subdomain.example.com is perfectly valid. chaotic, I know ๐
so Pinned Host operators have to use the includeSubDomains directive with care ๐ง for example, they may choose to use overlapping pin sets for hosts under a parent domain that uses includeSubDomains, or not use the includeSubDomains directive in their effective-second-level domains, or simply use the same pin set for all hosts under a given parent domain ๐
4.3. Backup Pins
the main way to cope with the risk of inadvertent Pin Validation failure is to keep a Backup Pin ๐งณ a Backup Pin is a fingerprint for the public key of a secondary, not-yet-deployed key pair. the operator keeps that backup key pair offline and sets a pin for it in the PKP header. then, if the operator loses control of their primary private key, they can deploy the backup key pair ๐ฆธโโ๏ธ UAs that had the backup key pair pinned (when it was set in previous Valid Pinning Headers) can connect to the host without error. โจ
because having a backup key pair is so important for recovery, UAs MUST require that hosts set a Backup Pin (see Section 2.5) ๐ the downside of keeping a not-yet-deployed key pair is that if an attacker gains control of the private key, she can perform a MITM attack without being discovered ๐ so operators must take care to avoid leaking the key, such as by keeping it offline.
4.4. Interactions With Cookie Scoping
HTTP cookies [RFC6265] set by a Known Pinned Host can be stolen by a network attacker who can forge web and DNS responses so that a client sends the cookies to a phony subdomain of the host ๐ช๐ค to prevent this, hosts SHOULD set the "secure" attribute and precisely scope the "domain" attribute on all security-sensitive cookies, like session cookies ๐ these settings tell the browser that the cookie should only be sent back to the specific host(s) (and not, e.g., all subdomains of a given domain), and that it should only be sent over HTTPS (not HTTP). main character energy for cookie safety ๐
4.5. Hostile Pinning ๐โจ
okay so this one's a lil spicy ๐ถ๏ธ An attacker who can get a valid certificate for a domain, whether a Certification Authority misissued one or they got it some other way (like being the prior owner of the domain), may try 'hostile' pinning ๐. In that case the attacker sends a Valid Pinning Header that pins to a set of SPKIs they picked. If a UA hasn't noted pins for that host before, it may note the attacker's pins, and suddenly the legit site is locked out ๐ โโ๏ธ
Thankfully there are a few ways to stop this ๐ก๏ธ Most prominently, the attack can only persist for the maximum max-age (see Section 4.1). Web host operators can also shut it down earlier by working to preload the host's pins within the UA ๐ง Operators may further detect misissuance through other means, such as certificate transparency ([RFC6962]).
5. Privacy Considerations ๐ต๏ธโโ๏ธ๐
bestie, this section is giving sneaky ๐ Hosts can use HSTS or HPKP as a "super-cookie" by setting distinct policies for a bunch of subdomains. For example, say example.com wants to track distinct UAs without explicitly setting a cookie, or wants to keep tracking after a previously set cookie gets deleted from the UA's cookie store. Here are two attack scenarios.
- example.com can use report-uri and the ability to pin arbitrary identifiers to distinguish UAs ๐ซฃ
- example.com sets a Valid Pinning Header in its response to requests. The header asserts the includeSubDomains directive and specifies a report-uri directive as well. Pages served by the host also include references to the subresource
https://bad.example.com/foo.png๐ผ๏ธ - The Valid Pinning Header includes a "pin" that is not really the hash of an SPKI but is instead an arbitrary distinguishing string sent only in response to a particular request. For each request, the host creates a new, distinct distinguishing string and sets it as if it were a pin ๐งฉ
- The certificate chain served by bad.example.com does not pass Pin Validation given the pin set the host asserted in step (1). The HPKP-conforming UA attempts to report the Pin Validation failure to the specified report-uri, including the certificate chain it observed and the SPKI hashes it expected to see. Among the SPKI hashes is the distinguishing string in step (2) ๐จ
- example.com sets a Valid Pinning Header in its response to requests. The header asserts the includeSubDomains directive and specifies a report-uri directive as well. Pages served by the host also include references to the subresource
- Different site operators/origins can optionally collaborate by setting the report-uri to be in an origin they share administrative control of. UAs MAY, therefore, refuse to send reports outside of the origin that set the
PKPorPKP-ROheader ๐ค - example.com can use server name indication (SNI; [RFC3546]) and subdomains to distinguish UAs ๐ธ๏ธ
- example.com sets a Valid Pinning Header in its response to requests. The header asserts the includeSubDomains directive.
- On a subsequent page view, the host responds with a page including the subresource
https://0.fingerprint.example.com/foo.png, and the server responds using a certificate chain that does not pass Pin Validation for the pin-set defined in the Valid Pinning Header in step (1). The HPKP-conforming UA will close the connection, never completing the request to 0.fingerprint.example.com. The host may thus note that this particular UA had noted the (good) Pins for that subdomain ๐ป - example.com can distinguish
2^NUAs by serving Valid Pinning Headers from an arbitrary numberNof distinct subdomains. For any given subdomainn.fingerprint.example.com, the host may deliver a Valid Pinning Header to one UA, but not deliver it to a different UA. The server may then change the configuration forn.fingerprint.example.com. If the UA fails to connect, it was in the set of UAs that were pinned, which can be distinguished from the UAs that were not pinned, as they will succeed in connecting. The host may repeat this for a sufficient number of subdomains necessary to distinguish individual UAs ๐ฆ
- Conforming implementations (as well as implementations conforming to [RFC6797]) must store state about which domains have set policies, hence which domains the UA has contacted. Because these policies cause remotely detectable behaviors, it is advisable that UAs have a way for privacy-sensitive users to clear current Pins for Pinned Hosts and that UAs allow users to query the current state of Pinned Hosts. In addition, note that because pinning a host implies a degree of persistent state, an attacker with physical access to a device may be able to recover information about hosts a user has visited, even if the user has cleared other parts of the UA's state ๐ง
- Pin reports, as noted in Section 3, contain information about the certificate chain that has failed pin validation. In some cases, such as organization-wide compromise of the end-to-end security of TLS, this may include information about the interception tools and design used by the organization that the organization would otherwise prefer not be disclosed ๐ซ
6. IANA Considerations ๐
IANA has registered the response headers described in this document under "Permanent Message Header Field Names" in the "Message Headers" registry [message-headers] with the following parameters:
- Header Field Names:
Public-Key-PinsandPublic-Key-Pins-Report-Only - Protocol:
http - Status:
standard - Reference:
RFC 7469
7. Usability Considerations ๐ฅบ
When pinning works to detect impostor Pinned Hosts, users will experience denial of service ๐ญ It is advisable for UAs to explain the reason why, i.e., that it was impossible to verify the confirmed cryptographic identity of the host ๐ฌ
It is advisable that UAs have a way for users to clear current Pins for Pinned Hosts and that UAs allow users to query the current state of Pinned Hosts ๐งน
8. References ๐
8.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, July 2002,
<http://www.rfc-editor.org/info/rfc3339>.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, RFC
3986, January 2005,
<http://www.rfc-editor.org/info/rfc3986>.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data
Encodings", RFC 4648, October 2006,
<http://www.rfc-editor.org/info/rfc4648>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, January 2008,
<http://www.rfc-editor.org/info/rfc5234>.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, August 2008,
<http://www.rfc-editor.org/info/rfc5246>.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 5280, May 2008,
<http://www.rfc-editor.org/info/rfc5280>.
[RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms
(SHA and SHA-based HMAC and HKDF)", RFC 6234, May 2011,
<http://www.rfc-editor.org/info/rfc6234>.
[RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265,
April 2011, <http://www.rfc-editor.org/info/rfc6265>.
[RFC6797] Hodges, J., Jackson, C., and A. Barth, "HTTP Strict
Transport Security (HSTS)", RFC 6797, November 2012,
<http://www.rfc-editor.org/info/rfc6797>.
[RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", RFC 7159, March 2014,
<http://www.rfc-editor.org/info/rfc7159>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing", RFC
7230, June 2014, <http://www.rfc-editor.org/info/rfc7230>.
[RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke,
Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching",
RFC 7234, June 2014,
<http://www.rfc-editor.org/info/rfc7234>.
[RFC7468] Josefsson, S. and S. Leonard, "Textual Encodings of PKIX,
PKCS, and CMS Structures", RFC 7468, April 2015,
<http://www.rfc-editor.org/info/rfc7468>.
[W3C.REC-html401-19991224]
Raggett, D., Hors, A., and I. Jacobs, "HTML 4.01
Specification", World Wide Web Consortium Recommendation
REC-html401-19991224, December 1999,
<http://www.w3.org/TR/1999/REC-html401-19991224>.
[message-headers]
IANA, "Message Headers",
<http://www.iana.org/assignments/message-headers/>.
8.2. Informative References
[RFC3546] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J.,
and T. Wright, "Transport Layer Security (TLS)
Extensions", RFC 3546, June 2003,
<http://www.rfc-editor.org/info/rfc3546>.
[RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate
Transparency", RFC 6962, June 2013,
<http://www.rfc-editor.org/info/rfc6962>.
[TACK] Marlinspike, M., "Trust Assertions for Certificate Keys",
Work in Progress, draft-perrin-tls-tack-02, January 2013.
[why-pin-key]
Langley, A., "Public Key Pinning", Imperial Violet: Adam
Langley's Weblog, May 2011,
<https://www.imperialviolet.org/2011/05/04/pinning.html>.
Appendix A. Fingerprint Generation ๐งพ๐
This Portable Operating System Interface (POSIX) shell program generates SPKI Fingerprints, suitable for use in pinning, from PEM-encoded certificates. It is non-normative ๐
openssl x509 -noout -in certificate.pem -pubkey | \
openssl asn1parse -noout -inform pem -out public.key
openssl dgst -sha256 -binary public.key | openssl enc -base64
Figure 11: Example SPKI Fingerprint Generation Code
Appendix B. Deployment Guidance ๐
okay so this section is non-normative guidance, which just means it's friendly advice and not a rulebook. it can still totally smooth out your adoption of public key pinning ๐
- okay so operators should get the backup public key signed by a different (root and/or intermediary) CA than their primary certificate, and store the backup key pair safely offline ๐. the semantics of an SPKI Fingerprint don't require the issuance of a certificate to construct a valid Pin. however, in lots of deployment scenarios, to make a Backup Pin operational, the server operator will need to have a certificate to deploy TLS on the host. if you don't get a certificate through prior arrangement, clients that recognize the site as a Known Pinned Host won't be able to successfully perform Pin Validation until the operator can get a new certificate from their desired certificate issuer ๐ญ
- it's most economical to have the backup certificate signed by a completely different signature chain than the live certificate, to maximize recoverability in the event of compromise of either the root or intermediary signer. the whole point is recoverability, bestie ๐ฆ
- operators should periodically exercise their Backup Pin plan -- an untested backup is no backup at all ๐ seriously, test it
- operators should start small ๐ธ. first deploy public key pinning using report-only mode together with a report-uri directive that points to a reliable report collection endpoint. when moving out of report-only mode, operators should start by setting a max-age of minutes or a few hours, and then gradually increase max-age as they gain confidence in their operational capability. baby steps are iconic, no cap โจ
Acknowledgements ๐ซถ
huge thank you to Tobias Gondrom, Jeff Hodges, Paul Hoffman, Ivan Krstic, Adam Langley, Barry Leiba, Nicolas Lidzborski, SM, James Manger, Yoav Nir, Trevor Perrin, Eric Rescorla, Pete Resnick, Tom Ritter, and Yan Zhu for the suggestions and edits that clarified the text ๐
TACK [TACK] is a fruitful source of alternative design considerations ๐ง
Authors' Addresses ๐
Chris Evans, the first author ๐
Chris Evans
Google, Inc.
1600 Amphitheatre Pkwy
Mountain View, CA 94043
United States
EMail: cevans@google.com
Chris Palmer, slay ๐
Chris Palmer
Google, Inc.
1600 Amphitheatre Pkwy
Mountain View, CA 94043
United States
EMail: palmer@google.com
Ryan Sleevi, the last one, and they're iconic too ๐
Ryan Sleevi
Google, Inc.
1600 Amphitheatre Pkwy
Mountain View, CA 94043
United States
EMail: sleevi@google.com
๐ฆ where this page comes from
- ietf: rfc7469 2015-04
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms