<?xml version="1.0" encoding="UTF-8"?>
<!--  
  <!ENTITY      PUBLIC ""  
  ""-->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [



  <!ENTITY RFC.2119     PUBLIC ""  
  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">

  <!ENTITY RFC.2460     PUBLIC ""  
  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2460.xml">


  <!ENTITY RFC.2830     PUBLIC ""  
  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2830.xml">

  <!ENTITY RFC.3490     PUBLIC ""  
  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3490.xml">

  <!ENTITY RFC.4346     PUBLIC ""  
  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4346.xml">

  <!ENTITY RFC.4513     PUBLIC ""  
  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4513.xml">


]>


<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="no" ?>
<?rfc compact="no" ?>
<?rfc subcompact="no" ?>



<rfc ipr="full3978" docName="draft-hodges-server-ident-check-00.txt">

    <front>
        <title abbrev="Server Ident Check">
            Generic Server Identity Check
        </title>

        <author initials="J." surname="Hodges" fullname="Jeff Hodges">
            <organization abbrev="NeuStar">NeuStar</organization>
            <address>
                <postal>
                    <street>2000 Broadway Street</street>
                    <city>Redwood City</city>
                    <region>CA</region>
                    <code>94063</code>
                    <country>US</country>
                </postal>
                <email>Jeff.Hodges@neustar.biz</email>
            </address>
        </author>

        <author initials="R.L." surname="Morgan" fullname="RL 'Bob' Morgan">
            <organization abbrev="Internet2">UWashington/Internet2</organization>
            <address>
                <postal>
                <!--  
                    <street></street>  --> 
                    <city>Seattle</city>
                    <region>WA</region>
                 <!--    <code></code>  --> 
                    <country>US</country>
                </postal>
                <email>rlmorgan@washington.edu</email>
            </address>
        </author>

        <date month="February" year="2008"/>
        <area></area>
        <workgroup>None</workgroup>
        <keyword>Internet-Draft</keyword>

        <abstract>
            <t>
                This document specifies the how an entity establishing a TLS connection,
                or other PKI-based interaction, with a server
                should verify the server identity. 
            </t>
        </abstract>
    </front>

    <middle>
        <section anchor="sctn-intro" title="Introduction">
            <t>
                Establishing a TLS-based connection with a server, or any other sort of client-server PKI-based interaction,
                entails, on the part of the client,
                verifying the &quot;server&apos;s identity&quot; based upon information presented by 
                the server in its certificate correlated with the
                information about the server ensconced in the Domain Name
                System (DNS). 
            </t>
            <t>
                Presently, various Internet-Drafts utilizing TLS or prescribing PKI-based interactions, 
                either prescribe their own server identity check, or reference <xref target="RFC4513"/>
                or its predecesor, <xref target="RFC2830"/>. [there may be other I-Ds referencing other 
                specs that describe the equivalent of server identity checks]
            </t>
            <t>
                Converging our present understanding of this critical aspect of PKI-based interactions is 
                desirable in that it will hopefully encourage more coherence in specifications
                and actual implementations thereof, as 
                well as ease the burden of crafting new specifications because this aspect has been factored
                out and separately standardized. 
            </t>
            <t>
                This document extracts the &quot;server identity check&quot; section from 
                 <xref target="RFC4513"/>, with the goal of becoming a stand-alone BCP document
                appropriately 
                referenceable by I-Ds and thus RFCs. 
            </t>
        </section> <!--  intro  --> 

        <section anchor="sctn-terms" title="Terminology">
            <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 <xref target="RFC2119"/>.
            </t>

        </section>
<!--  
        <section anchor="spec-scope" title="Specification Scope">
            <t>
                The scope of this specification is:
            </t>
            <t>
                <list style="symbols">
                    <t>
                        Specify a "lightweight" SAML "web browser
                        single sign-on" profile. 
                    </t>
                </list>
            </t>
            <t>
                The following are outside the scope of this specification:
            </t>
            <t>
                <list style="symbols">
                    <t>
                        Mechanisms for evaluating keys or certificates
                        used for signing.
                    </t>
                </list>
            </t>
        </section> 
 --> 




        <section anchor="sctn-server-ident-check" 
            title="Server Identity Check">

            <t>   
   In order to prevent man-in-the-middle attacks, the client MUST verify
   the server's identity (as presented in the server's Certificate
   message).  In this section, the client's understanding of the
   server's identity (typically the identity used to establish the
   transport connection) is called the "reference identity".
            </t>
   The client determines the type (e.g., DNS name or IP address) of the
   reference identity and performs a comparison between the reference
   identity and each subjectAltName value of the corresponding type
   until a match is produced.  Once a match is produced, the server's
   identity has been verified, and the server identity check is
   complete.  Different subjectAltName types are matched in different
   ways.  Sections 3.1.3.1 - 3.1.3.3 explain how to compare values of
   various subjectAltName types.
            <t>
   The client may map the reference identity to a different type prior
   to performing a comparison.  Mappings may be performed for all
   available subjectAltName types to which the reference identity can be
   mapped; however, the reference identity should only be mapped to
   types for which the mapping is either inherently secure (e.g.,
   extracting the DNS name from a URI to compare with a subjectAltName
   of type dNSName) or for which the mapping is performed in a secure
   manner (e.g., using DNSSEC, or using user- or admin-configured host-
   to-address/address-to-host lookup tables).
            </t>
            <t>
     The server's identity may also be verified by comparing the reference
   identity to the Common Name (CN) [RFC4519] value in the leaf Relative
   Distinguished Name (RDN) of the subjectName field of the server's
   certificate.  This comparison is performed using the rules for
   comparison of DNS names in Section 3.1.3.1, below, with the exception
   that no wildcard matching is allowed.  Although the use of the Common
   Name value is existing practice, it is deprecated, and Certification
   Authorities are encouraged to provide subjectAltName values instead.
   Note that the TLS implementation may represent DNs in certificates
   according to X.500 or other conventions.  For example, some X.500
   implementations order the RDNs in a DN using a left-to-right (most
   significant to least significant) convention instead of LDAP's
   right-to-left convention.

          </t>
            <t>
   If the server identity check fails, user-oriented clients SHOULD
   either notify the user (clients may give the user the opportunity to
   continue with the LDAP session in this case) or close the transport
   connection and indicate that the server's identity is suspect.
   Automated clients SHOULD close the transport connection and then
   return or log an error indicating that the server's identity is
   suspect or both.
            </t>
            <t>
    Beyond the server identity check described in this section, clients
   should be prepared to do further checking to ensure that the server
   is authorized to provide the service it is requested to provide.  The
   client may need to make use of local policy information in making
   this determination.

           </t>


            <section anchor="sctn-comp-dns-names" 
            title="Comparison of DNS Names">

                <t>   
   If the reference identity is an internationalized domain name,
   conforming implementations MUST convert it to the ASCII Compatible
   Encoding (ACE) format as specified in Section 4 of RFC 3490 [RFC3490]
   before comparison with subjectAltName values of type dNSName.
   Specifically, conforming implementations MUST perform the conversion
   operation specified in Section 4 of RFC 3490 as follows:
                    </t>

                <t>
                    <list style="symbols">
                        <t>                     in step 1, the domain name SHALL be considered a "stored
                    string";</t>

                        <t>                     in step 3, set the flag called "UseSTD3ASCIIRules";</t>

                        <t>                     in step 4, process each label with the "ToASCII" operation; and</t>

                        <t>                     in step 5, change all label separators to U+002E (full stop).</t>
                    </list>
                </t> 
               <t>   
                    After performing the "to-ASCII" conversion, the DNS labels and names
                    MUST be compared for equality according to the rules specified in
                    Section 3 of RFC3490.
                </t>
                <t>   
                    The '*' (ASCII 42) wildcard character is allowed in subjectAltName
                    values of type dNSName, and then only as the left-most (least
                    significant) DNS label in that value.  This wildcard matches any
                    left-most DNS label in the server name.  That is, the subject
                    *.example.com matches the server names a.example.com and
                    b.example.com, but does not match example.com or a.b.example.com.
                </t>
            </section>

            <section anchor="sctn-comp-ip-addrs" 
            title="Comparison of IP Addresses">

                <t>   
   When the reference identity is an IP address, the identity MUST be
   converted to the "network byte order" octet string representation
   [RFC791][RFC2460].  For IP Version 4, as specified in RFC 791, the
   octet string will contain exactly four octets.  For IP Version 6, as
   specified in RFC 2460, the octet string will contain exactly sixteen
   octets.  This octet string is then compared against subjectAltName
   values of type iPAddress.  A match occurs if the reference identity
   octet string and value octet strings are identical.
                </t>

            </section>

            <section anchor="sctn-comp-other-subjname" 
                title="Comparison of Other subjectName Types">

                <t>   
   Client implementations MAY support matching against subjectAltName
   values of other types as described in other documents.
                </t>

            </section>


        </section>
 




    </middle>


    <back>

        <references>


            &RFC.2119;
            <!--  <xref target="RFC2119"/>  --> 

           &RFC.2460;
            <!--  <xref target="RFC2460"/>  --> 

            &RFC.2830;
            <!--  <xref target="RFC2830"/>  --> 

            &RFC.3490;
            <!--  <xref target="RFC3490"/>  --> 

            &RFC.4346;
            <!--  <xref target="RFC4346"/>  --> 

            &RFC.4513;
            <!--  <xref target="RFC4513"/>  --> 

        </references>
    </back>
</rfc>


<!-- PLEASE DO NOT DELETE!!! The below is used by XEmacs XML major-mode -->
<!--
Local Variables:
mode: xml
indent-tabs-mode:nil
sgml-omittag:t
sgml-shorttag:t
sgml-namecase-general:t
sgml-general-insert-case:lower
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:4
sgml-indent-data:t
sgml-parent-document:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
<!-- PLEASE DO NOT DELETE!!! The above is used by XEmacs XML major-mode -->

