<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced.
     An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3688 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3688.xml">
<!ENTITY RFC5730 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5730.xml">
<!ENTITY RFC7451 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7451.xml">
<!ENTITY RFC7942 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7942.xml">
<!ENTITY W3C.REC-xmlschema-2-20041028 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml4/reference.W3C.REC-xmlschema-2-20041028.xml'>]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="yes"?>
<!-- keep one blank line between list items -->
<?rfc comments="yes" ?>
<!-- show cref output -->
<?rfc inline="yes" ?>
<!-- inline cref output -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-ietf-regext-login-security-01" ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN"
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <title abbrev="loginSec">
    Login Security Extension for the Extensible Provisioning Protocol (EPP)</title>

    <author fullname="James Gould" initials="J.G" surname="Gould">
      <organization>VeriSign, Inc.</organization>

      <address>
        <postal>
          <street>12061 Bluemont Way</street>

          <city>Reston</city>

          <region>VA</region>

          <code>20190</code>

          <country>US</country>
        </postal>

        <email>jgould@verisign.com</email>

        <uri>http://www.verisign.com</uri>
      </address>
    </author>

    <author fullname="Matthew Pozun" initials="M.P" surname="Pozun">
      <organization>VeriSign, Inc.</organization>

      <address>
        <postal>
          <street>12061 Bluemont Way</street>

          <city>Reston</city>

          <region>VA</region>

          <code>20190</code>

          <country>US</country>
        </postal>

        <email>mpozun@verisign.com</email>

        <uri>http://www.verisign.com</uri>
      </address>
    </author>

    <date day="9" month="April" year="2019"/>

    <abstract>
      <t>The Extensible Provisioning Protocol (EPP) includes a client authentication scheme 
      that is based on a user identifier and password. The structure of the password field is defined 
      by an XML Schema data type that specifies minimum and maximum password length values, 
      but there are no other provisions for password management other than changing the password. 
      This document describes an EPP extension 
      that allows longer passwords to be created and adds additional security features 
      to the EPP login command and response.</t>
    </abstract>

  </front>

  <middle>
    <section title="Introduction">
      <t>This document describes an Extensible Provisioning Protocol (EPP)
      extension for enhancing the security of the EPP login command in EPP RFC 5730.  
      The enhancements include supporting longer passwords (or passphrases) than the 16-character 
      maximum and providing a list of security events in the 
      login response.  The password (current and new) in EPP RFC 5730 can be 
      overridden by the password included in the extension to extend past the 16-character maximum.  
      The security events supported include: 
      password expiry, client certificate expiry, insecure cipher, insecure 
      TLS protocol, new pasword complexity, login security statistical warning, 
      and a custom event.  The attributes supported 
      by the security events include identifying the event type or sub-type, indicating 
      the security level of warning or error, a future or past-due expiration 
      date, the value that resulted in the event, the duration of the statistical event, 
      and a free-form description with an optional language.</t>
      
      <section title="Conventions Used in This Document">
        <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">RFC 2119</xref>.</t>

        <t>XML is case sensitive. Unless stated otherwise, XML specifications
        and examples provided in this document MUST be interpreted in the
        character case presented in order to develop a conforming
        implementation.</t>

        <t>In examples, "C:" represents lines sent by a protocol client and "S:" represents lines returned by a protocol server.
        Indentation and white space in examples are provided only to illustrate element relationships
        and are not a REQUIRED feature of this protocol.
        </t>

        <t>"loginSec-0.4" is used as an abbreviation for
        "urn:ietf:params:xml:ns:epp:loginSec-0.4". The XML namespace prefix
        "loginSec" is used, but implementations MUST NOT depend on
        it and instead employ
        a proper namespace-aware XML parser and serializer to interpret and
        output the XML documents.</t>
      </section>
    </section>

    <section title="Migrating to Newer Versions of This Extension">
      <t>(Note to RFC Editor: remove this section before publication as an RFC.)</t>
      
      <t>Servers which implement this extension SHOULD provide a way for
         clients to progressively update their implementations when a new
         version of the extension is deployed.</t>
 
       <t>Servers SHOULD (for a temporary migration period) provide support for
          older versions of the extension in parallel to the newest version,
          and allow clients to select their preferred version via the
          &lt;svcExtension&gt; element of the &lt;login&gt; command.</t>

		<t>If a client requests multiple versions of the extension at login,
           then, when preparing responses to commands which do not include
           extension elements, the server SHOULD only include extension elements
           in the namespace of the newest version of the extension requested by
           the client.</t>
         
        <t>When preparing responses to commands which do include extension
           elements, the server SHOULD only include extension elements for the
           extension versions present in the command.</t>
          
    </section>


    <section anchor="attrs" title="Object Attributes">

      <t>This extension adds additional elements to <xref target="RFC5730"/> login command 
      and response.  Only those new elements
      are described here.</t>

      <section anchor="event" title="Event">

        <t>A security event, using the &lt;loginSec:event&gt; element, 
        represents either a warning or error identified by the server after 
        the client has connected and submitted the login command. There MAY 
        be multiple events returned that provides information for the client 
        to address. The &lt;loginSec:event&gt; MAY include a free form description. 
        All of the security events use a consistent set of attributes, 
        where the exact set of applicable attributes is based on the event type. 
        The supported set of &lt;loginSec:event&gt; element attributes include:</t>
        
		  <t><list hangIndent="4" style="hanging">
			<t hangText="&quot;type&quot;:">A REQUIRED attribute that defines the type of security event.  The enumerated list of &quot;type&quot; values include:</t>
			
			
			  <t><list hangIndent="4" style="hanging">
				<t hangText="&quot;password&quot;:">Identifies a password expiry event, where the password expires in the future or has expired based on the "exDate" date and time.</t>
				<t hangText="&quot;certificate&quot;:">Identifies a client certificate expiry event, where the client certificate will expire at the "exDate" date and time.</t>
				<t hangText="&quot;cipher&quot;:">Identifies the use of an insecure or deprecated TLS cipher suite.</t>
				<t hangText="&quot;tlsProtocol&quot;:">Identifies the use of an insecure or deprecated TLS protocol.</t>
				<t hangText="&quot;newPW&quot;:">The new password does not meet the server password complexity requirements.</t>
				<t hangText="&quot;stat&quot;:">Provides a login security statistical warning that MUST set the "name" of the statistic.</t>
				<t hangText="&quot;custom&quot;:">Custom event type that MUST set the "name" attribute with the custom event type name.</t>
			  </list></t>
			
			
			
			<t hangText="&quot;name&quot;:">Used to define a sub-type or the type name when the "type" attribute is "custom".</t>
			<t hangText="&quot;level&quot;:">Defines the level of the event as either "warning" for a warning event 
			  that needs action, or "error" for an error event that requires immediate action.</t>
			<t hangText="&quot;exDate&quot;:">Contains the date and time that a "warning" level has or will become an "error" level.  At expiry there 
			  MAY be an error to connect or MAY be an error to login.  An example is an expired certificate that will result in a error to connect or 
			  an expired password that may result in a failed login.</t>
			<t hangText="&quot;value&quot;:">Identifies the value that resulted in the login security event.  
			  An example is the negotiated insecure cipher suite or the negotiated insecure TLS protocol.</t>
			<t hangText="&quot;duration&quot;:">Defines the duration that a statistical event is associated with.</t>
			<t hangText="&quot;lang&quot;:">Identifies the language of the free form description if the negotiated language is something other than the 
			default value of "en" (English).</t>
		  </list></t>
		  
       <figure>
            <preamble>Example login security event for a password expiring in a week:</preamble>

            <artwork><![CDATA[
<loginSec:event 
  type="password" 
  level="warning"
  exDate="2018-04-01T22:00:00.0Z"
  lang="en">
  Password expiration soon
</loginSec:event>]]></artwork>
       </figure>
		  

       <figure>
            <preamble>Example login security event for identifying 100 failed logins 
            over the last day, using the "stat" sub-type of "failedLogins":</preamble>

            <artwork><![CDATA[
<loginSec:event 
  type="stat" 
  name="failedLogins" 
  level="warning"
  value="100"
  duration="P1D">
  Excessive invalid daily logins
</loginSec:event>]]></artwork>
       </figure>

        		
      </section>

      <section anchor="loginSecurityPassword" title="&quot;[LOGIN-SECURITY]&quot; Password">

        <t>The &lt;loginSec:pw&gt; element MUST override the <xref target="RFC5730"/> &lt;pw&gt; element only if the &lt;pw&gt; contains the predefined 
        value of "[LOGIN-SECURITY]", which is a constant value for the server to use the &lt;loginSec:pw&gt; element for the password.  Similarly, 
        the &lt;loginSec:newPW&gt; element MUST override the <xref target="RFC5730"/> &lt;newPW&gt; element only if the &lt;newPW&gt; contains the predefined 
        value of "[LOGIN-SECURITY]", which is a constant value for the server to use the &lt;loginSec:newPW&gt; element for the new password.  The 
        "[LOGIN-SECURITY]" pre-defined string MUST be supported by the server for the client to explicitly indicate to the server 
        whether to use &lt;loginSec:pw&gt; element in place of the <xref target="RFC5730"/> &lt;pw&gt; element or to use the &lt;loginSec:newPW&gt; in place 
        of the <xref target="RFC5730"/> &lt;newPW&gt; element.</t>
      </section>

      
      <section anchor="datestimes" title="Dates and Times">
      
        <t>Date and time attribute values MUST be represented in Universal
           Coordinated Time (UTC) using the Gregorian calendar.  The extended
           date-time form using upper case "T" and "Z" characters defined in
           <xref target="W3C.REC-xmlschema-2-20041028"/> MUST be used to represent date-time
           values, as XML Schema does not support truncated date-time forms or
           lower case "T" and "Z" characters.</t>

      </section>


    </section>

    <section anchor="commands" title="EPP Command Mapping">
      <t>A detailed description of the EPP syntax and semantics can be found
      in the EPP core protocol specification <xref target="RFC5730"/>.</t>

      <section anchor="loginCommand" title="EPP &lt;login&gt; Command">

        <t>This extension defines additional elements to extend the EPP &lt;login&gt; command and response to be used 
        in conjunction with <xref target="RFC5730"/>.</t>

		<t>The EPP &lt;login&gt; command is used to establish a session with an EPP server.  This extension overrides 
		the password that is passed with the <xref target="RFC5730"/> &lt;pw&gt; or the &lt;newPW&gt; element as defined in
		<xref target="loginSecurityPassword"/>.  A &lt;loginSec:loginSec&gt; element is sent along with the <xref target="RFC5730"/> 
		&lt;login&gt; command and MUST contain at least one of the following child elements:</t>
		
		 <t><list hangIndent="4" style="hanging">
		  <t hangText="&lt;loginSec:userAgent&gt;:">OPTIONAL client user agent that identifies the client software, language, and operating system used by the server to identify functional or security constraints, 
		  current security issues, and potential future functional or security issues for the client.  The &lt;loginSec:userAgent&gt; element contains the following child elements:</t> 
		    <t><list hangIndent="4" style="hanging">
		      <t hangText="&lt;loginSec:app&gt;:">OPTIONAL name of the client application software with version if available, such as the name of the client SDK "EPP SDK 1.0.0".</t>
		      <t hangText="&lt;loginSec:tech&gt;:">OPTIONAL technology used for the client software with version if available, such as "Java 11.0.2".</t>
		      <t hangText="&lt;loginSec:os&gt;:">OPTIONAL client operating system used with version if available, such as "x86_64 Mac OS X 10.11.6".</t>
		    </list></t>
		  <t hangText="&lt;loginSec:pw&gt;:">OPTIONAL plain text password that is case sensitive, has a minimum length of 6 characters, and has a maximum length that 
		  is up to server policy.  All leading and trailing whitespace is removed, and all internal contiguous whitespace that includes #x9 (tab), #xA (linefeed), #xD (carriage return), and #x20 (space) is 
		  replaced with a single #x20 (space).  This element MUST only be used if the <xref target="RFC5730"/> &lt;pw&gt; element is set to the "[LOGIN-SECURITY]" value.</t>
		  <t hangText="&lt;loginSec:newPW&gt;:">OPTIONAL plain text new password that is case sensitive, has a minimum length of 6 characters, and has a maximum length that 
		  is up to server policy.  All leading and trailing whitespace is removed, and all internal contiguous whitespace that includes #x9 (tab), #xA (linefeed), #xD (carriage return), and #x20 (space) is 
		  replaced with a single #x20 (space).  This element MUST only be used if the <xref target="RFC5730"/> &lt;newPW&gt; element is set to the "[LOGIN-SECURITY]" value.</t>
		</list></t>


       <figure>
            <preamble>Example login command that uses the &lt;loginSec:pw&gt; element instead of the <xref target="RFC5730"/> &lt;pw&gt; element to 
            establish the session and includes the &lt;loginSec:userAgent&gt; element:</preamble>

            <artwork><![CDATA[
C:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
C:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
C:  <command>
C:    <login>
C:      <clID>ClientX</clID>
C:      <pw>[LOGIN-SECURITY]</pw>
C:      <options>
C:        <version>1.0</version>
C:        <lang>en</lang>
C:      </options>
C:      <svcs>
C:        <objURI>urn:ietf:params:xml:ns:obj1</objURI>
C:        <objURI>urn:ietf:params:xml:ns:obj2</objURI>
C:        <objURI>urn:ietf:params:xml:ns:obj3</objURI>
C:        <svcExtension>
C:          <extURI>urn:ietf:params:xml:ns:epp:loginSec-0.4</extURI>
C:        </svcExtension>
C:      </svcs>
C:    </login>
C:    <extension>
C:      <loginSec:loginSec
C:        xmlns:loginSec=
C:          "urn:ietf:params:xml:ns:epp:loginSec-0.4">
C:        <loginSec:userAgent>
C:          <loginSec:app>EPP SDK 1.0.0</loginSec:app>
C:          <loginSec:tech>Java 11.0.2</loginSec:tech>
C:          <loginSec:os>x86_64 Mac OS X 10.11.6</loginSec:os>
C:        </loginSec:userAgent>
C:        <loginSec:pw>this is a long password</loginSec:pw>
C:      </loginSec:loginSec>
C:    </extension>
C:    <clTRID>ABC-12345</clTRID>
C:  </command>
C:</epp>]]></artwork>
       </figure>

       <figure>
            <preamble>Example login command that uses the &lt;loginSec:pw&gt; element instead of the <xref target="RFC5730"/> &lt;pw&gt; element to 
            establish the session, and uses the &lt;loginSec:newPW&gt; element instead of the <xref target="RFC5730"/> &lt;newPW&gt; element to 
            set the new password:</preamble>

            <artwork><![CDATA[
C:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
C:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
C:  <command>
C:    <login>
C:      <clID>ClientX</clID>
C:      <pw>[LOGIN-SECURITY]</pw>
C:      <newPW>[LOGIN-SECURITY]</newPW>
C:      <options>
C:        <version>1.0</version>
C:        <lang>en</lang>
C:      </options>
C:      <svcs>
C:        <objURI>urn:ietf:params:xml:ns:obj1</objURI>
C:        <objURI>urn:ietf:params:xml:ns:obj2</objURI>
C:        <objURI>urn:ietf:params:xml:ns:obj3</objURI>
C:        <svcExtension>
C:          <extURI>urn:ietf:params:xml:ns:epp:loginSec-0.4</extURI>
C:        </svcExtension>
C:      </svcs>
C:    </login>
C:    <extension>
C:      <loginSec:loginSec
C:        xmlns:loginSec=
C:          "urn:ietf:params:xml:ns:epp:loginSec-0.4">
C:        <loginSec:pw>this is a long password
C:        </loginSec:pw>
C:        <loginSec:newPW>new password that is still long
C:        </loginSec:newPW>
C:      </loginSec:loginSec>
C:    </extension>
C:    <clTRID>ABC-12345</clTRID>
C:  </command>
C:</epp>]]></artwork>
       </figure>

       <figure>
            <preamble>Example login command that uses the <xref target="RFC5730"/> &lt;pw&gt; element to 
            establish the session, and uses the &lt;loginSec:newPW&gt; element instead of the <xref target="RFC5730"/> &lt;newPW&gt; element to 
            set the new password:</preamble>

            <artwork><![CDATA[
C:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
C:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
C:  <command>
C:    <login>
C:      <clID>ClientX</clID>
C:      <pw>shortpassword</pw>
C:      <newPW>[LOGIN-SECURITY]</newPW>
C:      <options>
C:        <version>1.0</version>
C:        <lang>en</lang>
C:      </options>
C:      <svcs>
C:        <objURI>urn:ietf:params:xml:ns:obj1</objURI>
C:        <objURI>urn:ietf:params:xml:ns:obj2</objURI>
C:        <objURI>urn:ietf:params:xml:ns:obj3</objURI>
C:        <svcExtension>
C:          <extURI>urn:ietf:params:xml:ns:epp:loginSec-0.4</extURI>
C:        </svcExtension>
C:      </svcs>
C:    </login>
C:    <extension>
C:      <loginSec:loginSec
C:        xmlns:loginSec=
C:          "urn:ietf:params:xml:ns:epp:loginSec-0.4">
C:        <loginSec:newPW>new password that is still long
C:        </loginSec:newPW>
C:      </loginSec:loginSec>
C:    </extension>
C:    <clTRID>ABC-12345</clTRID>
C:  </command>
C:</epp>]]></artwork>
       </figure>

          <t>Upon a completed login command (success or failed), the extension MUST 
          be included in the response based on the following conditions:</t>
          
          <t><list hangIndent="4" style="hanging">
            <t hangText="Client supports extension:">
            client supports the extension based on the &lt;svcExtension&gt; element 
            of the &lt;login&gt; command.</t>
            <t hangText="At least one login security event:">
            The server has identified at least one login security event to 
            communicate to the client.</t>
          </list></t> 
          
          <t>The extension to the EPP response uses 
          the &lt;loginSec:loginSecData&gt; element that contains the following
          child elements:</t>
          
		 <t><list hangIndent="4" style="hanging">
		  <t hangText="&lt;loginSec:event&gt;:">One or more &lt;loginSec:event&gt; elements 
		  defined in <xref target="event"/>.</t>
		</list></t>
          
       <figure>
            <preamble>Example EPP response to a successful login command where 
            the password will expire in a week:</preamble>

            <artwork><![CDATA[
S:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
S:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
S:  <response>
S:    <result code="1000">
S:      <msg>Command completed successfully</msg>
S:    </result>
S:    <extension>
S:      <loginSec:loginSecData
S:        xmlns:loginSec=
S:          "urn:ietf:params:xml:ns:epp:loginSec-0.4">
S:        <loginSec:event 
S:          type="password" 
S:          level="warning"
S:          exDate="2018-04-01T22:00:00.0Z"
S:          lang="en">
S:          Password expiring in a week
S:        </loginSec:event>
S:      </loginSec:loginSecData>
S:    </extension>
S:    <trID>
S:      <clTRID>ABC-12345</clTRID>
S:      <svTRID>54321-XYZ</svTRID>
S:    </trID>
S:  </response>
S:</epp>]]></artwork>
       </figure>

       <figure>
            <preamble>Example EPP response to a failed login command where 
            the password has expired and the new password does not 
            meet the server complexity requirements:</preamble>

            <artwork><![CDATA[
S:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
S:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
S:  <response>
S:    <result code="2200">
S:      <msg>Authentication error</msg>
S:    </result>
S:    <extension>
S:      <loginSec:loginSecData
S:        xmlns:loginSec=
S:          "urn:ietf:params:xml:ns:epp:loginSec-0.4">
S:        <loginSec:event 
S:          type="password" 
S:          level="error"
S:          exDate="2018-03-26T22:00:00.0Z">
S:          Password has expired
S:        </loginSec:event>
S:        <loginSec:event 
S:          type="newPW" 
S:          level="error">
S:          New password does not meet complexity requirements
S:        </loginSec:event>
S:      </loginSec:loginSecData>
S:    </extension>
S:    <trID>
S:      <clTRID>ABC-12345</clTRID>
S:      <svTRID>54321-XYZ</svTRID>
S:    </trID>
S:  </response>
S:</epp>]]></artwork>
       </figure>

       <figure>
            <preamble>Example EPP response to a successful login command where 
            there is a set of login security events:</preamble>

            <artwork><![CDATA[
S:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
S:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
S:  <response>
S:    <result code="1000">
S:      <msg>Command completed successfully</msg>
S:    </result>
S:    <extension>
S:      <loginSec:loginSecData
S:        xmlns:loginSec=
S:          "urn:ietf:params:xml:ns:epp:loginSec-0.4">
S:        <loginSec:event 
S:          type="password" 
S:          level="warning"
S:          exDate="2018-04-01T22:00:00.0Z"
S:          lang="en">
S:          Password expiration soon
S:        </loginSec:event>
S:        <loginSec:event 
S:          type="certificate" 
S:          level="warning"
S:          exDate="2018-04-02T22:00:00.0Z"/>
S:        <loginSec:event 
S:          type="cipher" 
S:          level="warning"
S:          value="TLS_RSA_WITH_AES_128_CBC_SHA">
S:          Non-PFS Cipher negotiated
S:        </loginSec:event>
S:        <loginSec:event 
S:          type="tlsProtocol" 
S:          level="warning"
S:          value="TLSv1.0">
S:          Insecure TLS protocol negotiated
S:        </loginSec:event>
S:        <loginSec:event 
S:          type="stat" 
S:          name="failedLogins" 
S:          level="warning"
S:          value="100"
S:          duration="P1D">
S:          Excessive invalid daily logins
S:        </loginSec:event>
S:        <loginSec:event 
S:          type="custom"
S:          name="myCustomEvent"
S:          level="warning">
S:          A custom login security event occured
S:        </loginSec:event>
S:      </loginSec:loginSecData>
S:    </extension>
S:    <trID>
S:      <clTRID>ABC-12345</clTRID>
S:      <svTRID>54321-XYZ</svTRID>
S:    </trID>
S:  </response>
S:</epp>]]></artwork>
       </figure>

      </section>
      <!-- end LOGIN command -->

    </section>

    <!-- EPP command mapping -->

    <section anchor="syntax" title="Formal Syntax">

      <t>One schema is presented here that is the EPP Login Security Extension
      schema.</t>

      <t>The formal
      syntax presented here is a complete schema representation of the object
      mapping suitable for automated validation of EPP XML instances. The
      BEGIN and END tags are not part of the schema; they are used to note the
      beginning and ending of the schema for URI registration purposes.</t>

    <section title="Login Security Extension Schema">

      <figure>
        <artwork><![CDATA[
BEGIN
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" 
  xmlns:epp="urn:ietf:params:xml:ns:epp-1.0" 
  xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0" 
  xmlns:loginSec="urn:ietf:params:xml:ns:epp:loginSec-0.4" 
  targetNamespace="urn:ietf:params:xml:ns:epp:loginSec-0.4" 
  elementFormDefault="qualified">
  
  <!--
  Import common element types.
  -->
  <import namespace="urn:ietf:params:xml:ns:eppcom-1.0" />
  <import namespace="urn:ietf:params:xml:ns:epp-1.0" />
  
  <annotation>
    <documentation>Extensible Provisioning Protocol v1.0
       Login Security Extension Schema.</documentation>
  </annotation>
  
  <!-- Login command extension elements -->
  <element name="loginSec" type="loginSec:loginSecType" />
  
  <!--
    Attributes associated with the login command extension.
   -->
  <complexType name="loginSecType">
    <sequence>
      <element name="userAgent" 
        type="loginSec:userAgentType" minOccurs="0" />
      <element name="pw" 
        type="loginSec:pwType" minOccurs="0" />
      <element name="newPW" 
        type="loginSec:pwType" minOccurs="0" />
    </sequence>
  </complexType>
  
  <simpleType name="pwType">
    <restriction base="token">
      <minLength value="6" />
    </restriction>
  </simpleType>
  
  <complexType name="userAgentType">
    <sequence>
      <element name="app" 
        type="token" minOccurs="0" />
      <element name="tech" 
        type="token" minOccurs="0" />
      <element name="os" 
        type="token" minOccurs="0" />
    </sequence>
  </complexType>
  
  <!-- Login response extension elements -->
  <element name="loginSecData" 
    type="loginSec:loginSecDataType" />
  <complexType name="loginSecDataType">
    <sequence>
      <element name="event" 
        type="loginSec:eventType" 
        minOccurs="1" maxOccurs="unbounded" />
    </sequence>
  </complexType>
  
  <!-- Security event element -->
  <complexType name="eventType">
    <simpleContent>
      <extension base="normalizedString">
        <attribute name="type" 
          type="loginSec:typeEnum" use="required" />
        <attribute name="name" 
          type="token" />
        <attribute name="level" 
          type="loginSec:levelEnum" use="required" />
        <attribute name="exDate" 
          type="dateTime" />
        <attribute name="value" 
          type="token" />
        <attribute name="duration" 
          type="duration" />
        <attribute name="lang" 
          type="language" default="en" />
      </extension>
    </simpleContent>
  </complexType>
  
  <!--
    Enumerated list of event types, with extensibility via "custom".
    -->
  <simpleType name="typeEnum">
    <restriction base="token">
      <enumeration value="password" />
      <enumeration value="certificate" />
      <enumeration value="cipher" />
      <enumeration value="tlsProtocol" />
      <enumeration value="newPW" />
      <enumeration value="stat" />
      <enumeration value="custom" />
    </restriction>
  </simpleType>
  
  <!--
    Enumerated list of levels.
    -->
  <simpleType name="levelEnum">
    <restriction base="token">
      <enumeration value="warning" />
      <enumeration value="error" />
    </restriction>
  </simpleType>
 <!--
 End of schema.
 -->
</schema>
END]]></artwork>
      </figure>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">

    	<section anchor="IANA-XML-Namespace" title="XML Namespace">
         <t>
             This document uses URNs to describe XML namespaces and XML schemas
             conforming to a registry mechanism described in <xref target="RFC3688"/>.
             The following URI assignment is requested of IANA:
         </t>

         <t>Registration request for the loginSec namespace:</t>
         
         <t><list>
         <t>URI: urn:ietf:params:xml:ns:epp:loginSec-0.4</t>
         
         <t>Registrant Contact: IESG</t>
          
         <t>XML: None. Namespace URIs do not represent an XML specification.</t>
         </list></t>
         
         <t>Registration request for the loginSec XML schema:</t>
         
         <t><list>
         <t>URI: urn:ietf:params:xml:schema:epp:loginSec-0.4</t>
         
         <t>Registrant Contact: IESG</t>
          
         <t>XML: See the "Formal Syntax" section of this document.</t>
         
         </list></t>

       </section>

       <section anchor="EPP-Extension-Registry" title="EPP Extension Registry">

       	<t>
   The EPP extension described in this document should be registered by
   the IANA in the EPP Extension Registry described in <xref target="RFC7451"/>.  The
   details of the registration are as follows:
   </t>

   <t>
   Name of Extension: &quot;Login Security Extension for the Extensible Provisioning Protocol (EPP)&quot;
   </t>

   <t>
   Document status: Standards Track
   </t>

   <t>
   Reference: (insert reference to RFC version of this document)
   </t>

   <t>
   Registrant Name and Email Address: IESG, &lt;iesg@ietf.org&gt;
   </t>

   <t>
   TLDs: Any
   </t>

   <t>
   IPR Disclosure: None
   </t>

   <t>
   Status: Active
   </t>

   <t>
   Notes: None
   </t>

       </section>

    </section>

    <section anchor="Implementation" title="Implementation Status">
      <t>Note to RFC Editor: Please remove this section and the reference to
         <xref target="RFC7942">RFC 7942</xref> before publication.</t>
      <t>TBD</t>
    </section>



    <section anchor="Security" title="Security Considerations">
      <t>The extension leaves the password (&lt;pw&gt; element) and new password (&lt;newPW&gt; element) minimum length 
      beyond 6 characters and the maximum length up to sever policy.  The server SHOULD enforce minimum and maximum length requirements that are 
      appropriate for their operating environment.  One example of a guideline for password length policies can be found in section 5 of 
      <eref target="https://pages.nist.gov/800-63-3/sp800-63b.html">NIST Special Publication 800-63B</eref>.</t>  
      <t>The client SHOULD NOT decrease 
      the security of a new password by decreasing the length of the current password.  For example, a client with a 20 character password set using 
      the extension, should not use the login command in <xref target="RFC5730"/> without using the extension, to set a new password that is less than or equal to 16 characters.</t>
      <t>The extension provides an extensible list of login security events to inform clients of connection and login warnings and errors.</t>  
     </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors wish to thank the following persons for their feedback and suggestions:</t>
      <t><list style="symbols">
        <t>Martin Casanova</t>
        <t>Scott Hollenbeck</t>
        <t>Patrick Mevzek</t>
      </list></t>
      
    </section>

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">

      &RFC2119;

      &RFC3688;

      &RFC5730;
      
      &RFC7942;      
      
      &W3C.REC-xmlschema-2-20041028;

    </references>

    <references title="Informative References">  
    
      &RFC7451; 

    </references>

   <section title="Change History">
    
    <section title="Change from 00 to 01" anchor="change-00-to-01">
      <t><list style="numbers">
        <t>Based on the feedback from Patrick Mevzek and a proposal from Scott Hollenbeck, changed the minimum length of the password from 8 to 6, revised the description of the password, 
        and added text in the Security Considerations section for the server password length policy.</t>
      </list></t>
    </section>
    <section title="Change from 01 to 02" anchor="change-01-to-02">
      <t><list style="numbers">
        <t>Changed the XML namespace from urn:ietf:params:xml:ns:loginSec-0.3 to urn:ietf:params:xml:ns:epp:loginSec-0.3, 
        and changed the XML schema registration from urn:ietf:params:xml:ns:loginSec-0.3 to urn:ietf:params:xml:schema:epp:loginSec-0.3 based 
        on a request from IANA with draft-ietf-regext-allocation-token.</t>
      </list></t>
    </section>
    <section title="Change from 02 to 03" anchor="change-02-to-03">
        <t>Updates based on the review by Patrick Mevzek, that include:
          <list style="numbers">
            <t>Fix the inconsistent case for newPW, that required a global change in the draft text and an update to the XML schema to "urn:ietf:params:xml:ns:loginSec-0.3".</t>
            <t>Changed "contains the following child elements" to "MUST contain at least one of the following child elements", section "EPP &lt;login&gt; Command" to ensure that 
            an empty &lt;loginSec:loginSec&gt; element is not passed.</t>
            <t>Add "The client SHOULD NOT decrease the security of a new password by decreasing the length of the current password." along with an example to the "Security Considerations" section.</t>
          </list>
        </t>
    </section>
    
    <section title="Change from 03 to REGEXT 00" anchor="change-03-to-WG00">
        <t>Changed to regext working group draft by changing draft-gould-regext-login-security to draft-ietf-regext-login-security.</t>
    </section>
 
     <section title="Change from REGEXT 00 to REGEXT 01" anchor="change-WG00-to-WG01">
        <t>Changed the &lt;loginSec:userAgent&gt; element to be structured with the &lt;loginSec:app&gt;, &lt;loginSec:tech&gt;, and &lt;loginSec:os&gt; sub-elements.  This was based on the 
        feedback from Martin Casanova.  This resulted in the need to change the XML namespace from urn:ietf:params:xml:ns:epp:loginSec-0.3 to urn:ietf:params:xml:ns:epp:loginSec-0.4.</t>
    </section>

   </section>

  </back>

  <!-- vim: set ts=2 sw=2 expandtab: -->
</rfc>
