<?xml version='1.0' encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>

<?rfc compact="yes"?>
<?rfc subcompact="no" ?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc toc="yes" ?>  

<rfc number="7633" ipr="trust200902" category="std" consensus="yes" submissionType="IETF">
<front>
<title abbrev="TLS Feature Extension">X.509v3 Transport Layer Security (TLS) Feature Extension</title>
<author fullname="Phillip Hallam-Baker" initials="P. M." surname="Hallam-Baker">
<organization>Comodo Group Inc.</organization>
<address>
<email>philliph@comodo.com</email>
</address>
</author>
<date month="October" year="2015"/>
<area>Security</area>
<workgroup/>


<keyword>PKIX, Transport Layer Security, Cryptography Certificate</keyword>

<abstract>
<t>The purpose of the TLS feature extension is to prevent downgrade attacks
that are not otherwise prevented by the TLS protocol. In particular, the TLS
feature extension may be used to mandate support for revocation checking
features in the TLS protocol such as Online Certificate Status Protocol (OCSP) stapling.  Informing clients that an OCSP status response will always be stapled permits an immediate failure in the case that the response is not stapled. This in turn prevents a denial-of-service attack that might otherwise be possible.</t>
</abstract>
</front>
<middle>

<section title="Introduction">
<t>
   The Transport Layer Security (TLS) feature extension provides a means of 
   preventing downgrade attacks that are not otherwise prevented by the TLS 
   protocol.
 </t>
<t>
   Since the TLS protocol itself provides strong protection against most
   forms of downgrade attack including downgrade attacks against cipher
   suite choices offered and client credentials, the TLS feature
   extension is only relevant to the validation of TLS protocol
   credentials.
   </t>
   </section>
<section title="Definitions" anchor="Section_1">
<section title="Requirements Language" anchor="Section_1_1">
<t>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 <xref target="RFC2119"/>.</t>
</section>
<section title="TLS Feature, X.509 Extension" anchor="Section_1_2">


<t>
   In order to avoid the confusion that would occur in attempting to
   specify an X.509 extension describing the use of TLS extensions, in this document the
term "extension" is reserved to refer to X.509v3 extensions and the term "TLS
feature extension" is used to refer to what the TLS specification <xref target="RFC5246"/> refers to as an "extension".</t>
</section>
</section>
<section title="Purpose" anchor="Section_2">
<t>Currently, the only TLS feature extensions that are relevant to the revocation status of credentials are the Certificate Status Request extension (status_request) and the Multiple Certificate Status Extension (status_request_v2).  These extensions are used to support in-band exchange of Online Certificate Status Protocol (OCSP) tokens, otherwise known as OCSP stapling.  These extensions are described in <xref target="RFC6066"/> and <xref target="RFC6961"/>.</t>
<t>The OCSP stapling mechanism described in <xref target="RFC6066"/> permits a
TLS server to provide evidence of valid certificate status in-band.  When this
information is provided in-band, the privacy, performance, and reliability
concerns arising from the need to make a third-party connection during the TLS
handshake are eliminated.  However, a client cannot draw any conclusion from the absence of in-band status information unless it knows that the legitimate server would have provided it.  The status information might have been omitted because the server does not support the extension or because the server is withholding the information intentionally, knowing the certificate to be invalid.</t>
<t>The inclusion of a TLS feature extension advertising the status_request feature in the server end-entity certificate permits a client to fail immediately if the certificate status information is not provided by the server.  The need to query the OCSP responder is eliminated entirely.  This improves client efficiency and, more importantly, prevents a denial-of-service attack against the client by either blocking the OCSP response or mounting a denial-of-service attack against the OCSP responder.</t>
<t>Since the TLS feature extension is an option, it is not likely that an
attacker attempting to obtain a certificate through fraud will choose to have
a certificate issued with this extension.  Such risks are more appropriately
addressed by mechanisms such as Certification Authority Authorization DNS
records <xref target="RFC6844"/> that are designed to prevent or mitigate mis-issue.</t>
<t>A server offering an end-entity certificate with a TLS feature extension MUST satisfy a client request for the specified feature unless this would be redundant as described below.  Clients MAY refuse to accept the connection if the server does not accept a request for a specified feature.</t>
<t>A Certification Authority SHOULD NOT issue certificates that specify a TLS feature extension advertising features that the server does not support.</t>
<t>A server MAY advise a Certification Authority that it is capable of supporting a feature by including the corresponding TLS feature extension in a Certificate Signing Request <xref target="RFC2986"/>. A server SHOULD verify that its configuration supports the features advertised in the credentials presented to a client requesting connection.</t>
<t>This document describes the use of the TLS feature in PKIX end-entity
certificates and Certificate Signing Certificates. A mechanism that MAY be used to describe support for the specified features in-band for the most commonly used certificate registration protocol is also provided.</t>
</section>
<section title="Syntax" anchor="Section_3">
<t>See <xref target="ASN1module"/> for an ASN.1 module</t>
<t>The TLS feature extension has the following format:</t>
<figure>
<artwork>
<![CDATA[
id-pe-tlsfeature OBJECT IDENTIFIER ::=  { id-pe 24 }

Features ::= SEQUENCE OF INTEGER]]></artwork>
</figure>


<t>The extnValue of the id-pe-tlsfeature extension is the ASN.1 DER encoding of the Features structure.</t>
<t>The TLS feature extension SHOULD NOT be marked critical.  RFC 5280 <xref target="RFC5280"/> requires that implementations that do not understand critical extensions MUST reject the certificate.  Marking the TLS feature extension critical breaks backward compatibility and is not recommended unless this is the desired behavior.</t>
<section title="TLS Feature" anchor="Section_3_1">
<t>The object member "Features" is a sequence of TLS extension identifiers (features, in this specification's terminology) as specified in the IANA Transport Layer Security (TLS) Extensions registry.  If these features are requested by the client in its ClientHello message, then the server MUST return a ServerHello message that satisfies this request.</t>
<t>This specification does not require a TLS client to offer or support any
TLS feature regardless of whether or not it is specified in the server certificate's
TLS feature extension.  In particular, a client MAY request and a server
MAY support any TLS extension regardless of whether or not it is specified in a TLS feature extension.</t>
<t>A server that offers a certificate that contains a TLS feature extension MUST support the features specified and comply with the corresponding requirements.</t>
</section>
<section title="Use" anchor="Section_3_2">
<section title="Certificate Signing Request" anchor="Section_3_2_1">
<t>If the certificate issue mechanism makes use of the PKCS #10 Certificate Signing Request (CSR) <xref target="RFC2986"/>, the CSR MAY specify a TLS
feature extension as a CSR Attribute as defined in Section 4.1 of <xref target="RFC2986"/>.  A server or server administration tool should only generate key signing requests that it knows can be supported by the server for which the certificate is intended.</t>
</section>
<section title="Certificate Signing Certificate" anchor="Section_3_2_2">
<t>When present in a Certificate Signing Certificate (i.e., Certification
Authority certificate with the key usage extension value set to keyCertSign),
the TLS feature extension specifies a constraint on valid certificate chains.
Specifically, a certificate that is signed by a Certificate Signing
Certificate that contains a TLS feature extension MUST contain a TLS feature
extension that offers the same set or a superset of the features advertised in the signing certificate.</t>
<t>This behavior provides a means of requiring support for a particular set of features for certificates issued under a particular Certificate Signing Certificate without requiring TLS clients to verify compliance with TLS feature extensions in multiple certificates.</t>
</section>

<section title="End-Entity Certificate" anchor="Section_3_2_3">

<t>When specified in a server end-entity certificate (i.e., a certificate that
specifies the id-kp-serverAuth Extended Key Usage (EKU)), the TLS feature extension specifies criteria that a server MUST meet to be compliant with the feature declaration.</t>
<t>In the case that a client determines that the server configuration is inconsistent with the specified feature declaration, it MAY reject the TLS configuration.</t>
<section title="TLS status_request" anchor="Section_3_2_3_1">
<t>In the case that a client determines that the server configuration is inconsistent with a feature declaration specifying support for the TLS status_request extension, it SHOULD reject the TLS configuration.</t>
<t>A client MAY accept a TLS configuration despite it being inconsistent with
the TLS feature declaration if the validity of the certificate chain presented
can be established through other means (for example, by successfully obtaining the OCSP data from another source).</t>
<t>There are certain situations in which the alternative to establishing a connection with imperfect TLS security is to transmit the same information with no security controls whatsoever. Accordingly, a client MAY accept a TLS configuration despite it being inconsistent with the TLS feature declaration but MUST NOT distinguish that connection as secure.</t>
</section>
</section>
</section>
<section title="Processing" anchor="Section_3_3">
<t>Advertising a TLS feature extension may change the expectations of relying parties. If these expectations are not met, a valid certificate may be rejected as invalid. Particular attention is required at the start of a certificate lifecycle. A server will be unable to comply with a TLS feature extension if the certificate is issued and released to the subject before the corresponding status token is published.</t>
<section title="Certification Authority" anchor="Section_3_3_1">

<t>A Certification Authority SHOULD NOT issue certificates with a TLS feature
extension unless there is an affirmative statement to the effect that the end
entity intends to support the specified features (for example, the use of a feature extension in the CSR or through an out-of-band communication).</t>
<t>A Certification Authority SHOULD ensure that the certificate provisioning
process for certificates containing a TLS feature extension permits the
certificate subject to meet the requirements (for example, ensuring that OCSP tokens are published before the corresponding certificate is released to the subscriber).</t>
</section>
<section title="Server" anchor="Section_3_3_2">
<t>A TLS server certificate containing a TLS feature extension MAY be used with any TLS server that supports the specified features.  It is not necessary for the server to provide support for the TLS feature extension itself.  Such support is nevertheless desirable as it can reduce the risk of administrative error.</t>
<t>A server SHOULD verify that its configuration is compatible with the TLS
feature extension expressed in a certificate it presents.  When an existing
certificate is to be replaced by a new one, the server SHOULD NOT begin using
the new certificate until the necessary OCSP status token or tokens are available.</t>
<t>A server MAY override local configuration options if necessary to ensure
consistency, but it SHOULD inform the administrator whenever such an inconsistency is discovered.</t>
<t>A server SHOULD support generation of the feature extension in CSRs if key generation is supported.</t>
</section>
<section title="Client" anchor="Section_3_3_3">
<t>A client MUST treat a certificate with a TLS feature extension as an invalid certificate if the features offered by the server do not contain all features present in both the client's ClientHello message and the TLS feature extension.</t>
<t>In the case that use of TLS with a valid certificate is mandated by explicit security policy, application protocol specification, or other means, the client MUST refuse the connection.  If the use of TLS with a valid certificate is optional, a client MAY accept the connection but MUST NOT treat the certificate as valid.</t>
</section>
</section>
</section>
<section title="Security Considerations" anchor="Section_5">
<section title="Alternative Certificates and Certificate Issuers" anchor="Section_5_1">
<t>Use of the TLS feature extension to mandate support for a particular form of revocation checking is optional.  This control can provide protection in the case that a certificate with a TLS feature is compromised after issue but not in the case that the attacker obtains an unmarked certificate from an issuer through fraud.</t>
<t>The TLS feature extension is a post-issue security control.  Such risks can only be addressed by security controls that take effect before issue.</t>
</section>
<section title="Denial of Service" anchor="Section_5_2">
<t>A certificate issuer could issue a certificate that intentionally specified a feature statement that they knew the server could not support.</t>
<t>The consequences of such refusal would appear to be limited since a Certification Authority could equally refuse to issue the certificate.</t>
</section>
<section title="Cipher Suite Downgrade Attack" anchor="Section_5_3">
<t>The TLS feature extension does not provide protection against a cipher suite downgrade attack.  This is left to the existing controls in the TLS protocol itself.</t>
</section>
</section>
<section title="IANA Considerations" anchor="Section_6">
<t>IANA has added the following entry in the "SMI Security for PKIX
Certificate Extension" (1.3.6.1.5.5.7.1) registry:</t>

<figure><artwork><![CDATA[
Decimal  Description                     References
-------  ------------------------------  ---------------------

  24     id-pe-tlsfeature                this document (RFC 7633)]]></artwork>
</figure>

<t>
IANA has added the following entry in the "SMI
Security for PKIX Module Identifier" (1.3.6.1.5.5.7.0) registry:

<figure><artwork><![CDATA[
Decimal  Description                     References
-------  ------------------------------  ---------------------

  86     id-mod-tls-feature-2015         this document (RFC 7633)]]></artwork>
</figure>

</t>
</section>
</middle>

<back>


<references title="Normative References">
<?rfc include="reference.RFC.2119"?>
<?rfc include="reference.RFC.5246"?>
<?rfc include="reference.RFC.6066"?>
<?rfc include="reference.RFC.6961"?>
<?rfc include="reference.RFC.6844"?>
<?rfc include="reference.RFC.2986"?>
<?rfc include="reference.RFC.5280"?>
</references>

<section title="ASN.1 Module" anchor="ASN1module">


<figure><artwork><![CDATA[
TLS-Feature-Module-2015 {
    iso(1) identified-organization(3) dod(6) internet(1)
    security(5) mechanisms(5) pkix(7) id-mod(0)
    id-mod-tls-feature-2015(86)}

DEFINITIONS IMPLICIT TAGS ::=
BEGIN

    IMPORTS -- From RFC 5912

    id-pe
    FROM PKIX1Explicit-2009 {
        iso(1) identified-organization(3) dod(6) internet(1)
        security(5) mechanisms(5) pkix(7) id-mod(0)
        id-mod-pkix1-explicit-02(51)}

    EXTENSION
    FROM PKIX-CommonTypes-2009 {
        iso(1) identified-organization(3) dod(6) internet(1) 
        security(5) mechanisms(5) pkix(7) id-mod(0) 
        id-mod-pkixCommon-02(57)}
    ;

    CertExtensions EXTENSION ::= {
        ext-TLSFeatures, ... }

        -- TLS Features Extension

    ext-TLSFeatures EXTENSION ::= { SYNTAX
        Features IDENTIFIED BY id-pe-tlsfeature }

    id-pe-tlsfeature OBJECT IDENTIFIER ::= { id-pe 24 }

    Features ::= SEQUENCE OF INTEGER

END
]]></artwork>
</figure>
</section>

<section title="Acknowledgements" numbered="no">
<t>This proposal incorporates text and other contributions from participants
in the IETF and CA-Browser forum -- in particular, Robin Alden, Richard Barnes, Viktor Dukhovni, Stephen Farrell, Gervase Markham, Yoav Nir, Tom Ritter, Jeremy Rowley, Stefan Santesson, Ryan Sleevi, Brian Smith, Rob Stradling, and Sean Turner.</t>
</section>

</back>
</rfc>
