<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4034 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4034.xml">
<!ENTITY RFC5685 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5685.xml">
<!ENTITY RFC5723 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5723.xml">
<!ENTITY RFC5890 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5890.xml">
<!ENTITY RFC6698 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6698.xml">
<!ENTITY RFC6982 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6982.xml">
<!ENTITY RFC7296 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7296.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC7942 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7942.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc ipr="trust200902" updates="" obsoletes="" category="exp" docName="draft-pwouters-ipsecme-delete-info-03">
  <front>
    <title>IKEv2 support for specifying a Delete notify reason</title>
    <author fullname="Antony Antony" initials="A." surname="Antony">
      <organization abbrev="secunet">secunet Security Networks AG</organization>
      <address>
        <email>antony.antony@secunet.com</email>
      </address>
    </author>
    <author fullname="Patrick Kerpan" initials="P." surname="Kerpan">
      <organization>Cohesive Networks</organization>
      <address>
        <email>pjkerpan@cohesive.net</email>
      </address>
    </author>
    <author initials="P." surname="Wouters" fullname="Paul Wouters">
      <organization>Aiven</organization>
      <address>
        <email>paul.wouters@aiven.io</email>
      </address>
    </author>
    <date/>
    <area>General</area>
    <workgroup>Network</workgroup>
    <keyword>IKEv2</keyword>
    <keyword>IPsec</keyword>
    <abstract>
      <t>
       This document defines the DELETE_REASON Notify Message Status Type Payload
       for the Internet Key Exchange Protocol Version 2 (IKEv2) to support adding
       a reason for the deletion of the IKE or Child SA(s).
      </t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction">
      <t>
       The IKEv2 <xref target="RFC7296"/> protocol supports sending
       a Delete Notify message, but this message cannot convey the
       reason why a particular Child SA or IKE SA is being deleted. It
       can be useful to know why a certain IPsec IKE SA or Child SA
       was deleted by the peer. Sometimes, when the peer's operator
       notices a specific SA is down, they have no idea whether this
       is permanent or temporary problem, and have no idea how long an
       outage might last. The DELETE_REASON Notify message can be added
       to any exchange that contains a Delete (42) payload to give more
       information about why the deletion is happening. The initial Delete
       Reason values are specified in <xref target="Delete-Reasons"/>.
      </t>
      <section title="Requirements Language">
        <t>
       The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
       "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
       "OPTIONAL" in this document are to be interpreted as described in BCP
       14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
       when, they appear in all capitals, as shown here.
      </t>
      </section>
    <section title="Payload Format" anchor="payload_formats">
      <t>
      All multi-octet fields representing integers are laid out in big
      endian order (also known as "most significant byte first", or
      "network byte order").
     </t>
    </section>
    </section>
    <section title="Delete Reason Usage" anchor="payload_usage">
      <t>Whenever an IKE peer wishes to relay the reason for why it is deleting an
         IKE SA or one or more IPsec SAs, it MAY include a DELETE_REASON notify payload.
         The notify payload contains a single Reason Type.
      </t>
      <t>
       A DELETE_REASON payload MUST be ignored if the exchange does not contain
       a Delete payload.</t>
      <t> If multiple Delete payloads are present, the DELETE_REASON message applies
       to all of these. If separate different reasons should be
       conveyed for different Child SAs or IKE SA, those Delete messages and their
       accompanied DELETE_REASON messages should be sent in separate Informational
       Exchange messages.
      </t>
      </section>
      <section title="DELETE_REASON Notify Status Message Payload format" anchor="payload_format">
        <figure align="center">
          <artwork align="left"><![CDATA[
                    1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-----------------------------+-------------------------------+
| Next Payload  |C|  RESERVED   |         Payload Length        |
+---------------+---------------+-------------------------------+
|  Protocol ID  |   SPI Size    |      Notify Message Type      |
+---------------+---------------+-------------------------------+
|    Delete Reason Type         |
+-------------------------------+
            ]]></artwork>
        </figure>
        <t>
          <list style="symbols">
            <t>(C)ritical bit - MUST be 0.</t>
            <t>Protocol ID (1 octet) - MUST be 0. MUST be ignored if not 0.</t>
            <t>SPI Size (1 octet) - MUST be 0. MUST be ignored if not 0.</t>
            <t>Notify Status Message Type (2 octets) - set to [TBD1]</t>
            <t>Delete Reason Type (2 octets) - See <xref target="Delete-Reasons"/></t>
          </list>
        </t>
      </section>


    <section anchor="Delete-Reasons" title="Initial Delete Reason Registry Values">
    <t>The initial list of Delete Reason values and their meanings</t>
    <section anchor="SERVICE_SHUTDOWN" title="SERVICE_SHUTDOWN">
    <t>The IPsec (IKE) service is being shutdown. This implies all connections to this
       peer are being terminated. The service might not be restored. If the service was reached via DNS, it might be useful
       to refresh the DNS lookup or use another one of the IP addresses returned for the
       service. If the service was reached via an IKEv2 Redirect <xref target="RFC5685"/>,
       it might be useful to attempt a new connection via the original redirect server again.</t>
    </section>
    <section anchor="SERVICE_RESTART" title="SERVICE_RESTART">
    <t>The IPsec (IKE) service is being restarted. This implies all connections to this peer are
       being terminated for a brief moment while the service is restarting. Reconnecting to the service
       can be attempted, although there might be a brief outage trying to do so. Session Resumption tickets
       <xref target="RFC5723"/> are unlikly to be usable.</t>
    </section>
    <section anchor="CONFIGURATION_CHILD_DELETED" title="CONFIGURATION_CHILD_DELETED">
    <t>The configuration for the specific Child SA parameters has been removed. This implies the peer's IKE
       configuration has not been removed. If static tunnels are deployed, this means the endpoint administrators have
       updated the configuration and any unexpected change should be resolved by the operators. The connection likely
       will not work and might need to be disabled. If the configuration of the Child SA was dynamic, such as an address
       pool IP obtained via narrowed traffic selectors, the connection can be retried (either with the current IKE SA,
       or possibly by tearing down the IKE SA as well and restarting the entire connection from scratch.</t>
    </section>
    <section anchor="CONFIGURATION_IKE_DELETED" title="CONFIGURATION_IKE_DELETED">
    <t>The configuration for the specific IKE SA peer has been removed. This implies the peer will not accept a
       new connection with the exact same IKE parameters as those that were just in use.</t>
    </section>
    <section anchor="CONFIGURATION_IKE_UDPDATED" title="CONFIGURATION_IKE_UPDATED">
    <t>The configuration for the specific IKE SA peer has been updated. Depending on the configuration change, this
       might require an update to the location configuration or not. For example, an updated PreSharedKey would require
       a configuration update. A change of accepted algorithms might mean that the IKE SA can be established with a
       different algorithm that the one that was in use on this IKE SA.</t>
    </section>
    <section anchor="ADMINISTRATIVELY_DOWN" title="ADMINISTRATIVELY_DOWN">
    <t>The configuration for the IKE SA or Child SA has been disabled and the running connection has been torn down. This
       implies that reconnection is prevented until an administrative issue is resolved. This could be related to temporary
       network topology changes (e.g. subnet is no longer being offered) or billing related (e.g. user needs to pay a bill)</t>
    </section>
    <section anchor="IDLE_TIMEOUT" title="IDLE_TIMEOUT">
    <t>The instance of the IKE SA or Child SA has been disabled due to inactivity. This implies reconnecting again is possible.</t>
    </section>
    <section anchor="INITIAL_CONTACT_REPLACED" title="INITIAL_CONTACT_REPLACED">
    <t>A new IKE SA with this peer was established that signaled INITIAL_CONTACT, meaning the peer claimed all older instances of
       this IKE SA and all its Child SAs are no longer alive and should be terminated.</t>
    </section>
    <section anchor="REPLACED_SA" title="REPLACED_SA">
    <t>This IKE SA or Child SA was replaced by a newer one and is therefor terminated. This could be the losing SA in a simultanious
       rekey event, the peer has re-authenticaed and established a new IKE SA and child SAs and this SA is no longer used, or the
       peer established fresh IKE SA or fresh Child SAs and the older ones are being deleted. For example when a peer does not allow
       or support identical Child SAs under different IKE SAs.</t>
    </section>
    <section anchor="LIFETIME_EXCEEDED" title="LIFETIME_EXCEEDED">
    <t>The IKE SA or Child SA reached its local lifetime counter (bytes or seconds or packets) and was not rekeyed in time.</t>
    </section>
    </section>

    <section title="Operational Considerations" anchor="op_consider">
    <t>The reason for supporting Deletion Reasons is for peer systems and their administrators to get a better idea of what is
    going on. Often in the field, people attempt to debug a failed connection only to find out much later that the configuration
    was simply removed from the peer. Administrators would now be able to find a reason for the connection being brought down by
    the peer.</t>

    <t>While most reasons might be useful primarily to interactive operations that are (re)configuring and testing their configurations,
    some automated actions could be taken. For example, a connection that received ADMINISTRATIVELY_DOWN, could place a connection
    in "standby mode" and prevent further attempts for IKE SA or Child SA connections. Such behaviour SHOULD NOT be done without
    sending a high priority alert on the device. It might even make sense to keep a limited retry alive (for example hourly) in case
    the peer send such a message by mistake. This would allow a recovery - even if slowly.</t>
    </section>


    <section title="Security Considerations" anchor="sec_consider">
      <t>
       As Delete Reasons are authenticated by the peer, these can be trusted and acted upon in the
       determinations on what to do in response to the deletion of the IKE or Child SA. This only
       allows improved fine tuning of a system, but does not change the security aspect in any way
       beyond the above mentioned Operational Considerations.  </t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
    <t>This document adds one new IKEv2 Notify Message Status Type value and one new IKEv2 registry.</t>
    <section anchor="IANA-Delete-Reason-Notify" title="Delete Reason Notify">
      <t>
        The following Notify Message Status is added:
        </t>
      <figure align="center" anchor="iana_requests_1">
        <artwork align="left"><![CDATA[
      Value   IKEv2 Notify Message Status Type    Reference
      -----   ------------------------------    ---------------
      [TBD1]   DELETE_REASON                    [this document]
            ]]></artwork>
      </figure>
    </section>
    <section anchor="IANA-Delete-Reason-Registry" title="Delete Reason Registry">
    <t>This document requests IANA create the IKEv2 Notify Message Delete Reason Registry
       under the Internet Key Exchange Version 2 (IKEv2) Parameters Registry with the
       following fields and initial values:</t>
      <figure align="center" anchor="iana_requests_2">
        <artwork align="left"><![CDATA[
      Type    Reason Name                    Reference
      -----   ----------------------------   -------------------
      0       RESERVED                       [this document]
      1       SERVICE_SHUTDOWN               [this document]
      2       SERVICE_RESTART                [this document]
      3       CONFIGURATION_CHILD_DELETED    [this document]
      4       CONFIGURATION_IKE_DELETED      [this document]
      5       CONFIGURATION_IKE_UPDATED      [this document]
      6       ADMINISTRATIVELY_DOWN          [this document]
      7       IDLE_TIMEOUT                   [this document]
      9       INITIAL_CONTACT_REPLACED       [this document]
      10      REPLACED_SA                    [this document]
      11      LIFETIME_EXCEEDED              [this document]
      12-255  Unassigned
      256 - 65279 Unassigned
      65280 - 65535 Private Use Values

            ]]></artwork>
      </figure>
      <t>The registry values 0-255 are assigned using the RFC Required registration policy.</t>
      <t>The registry values 256-65279 are assigned using the First Come First Servce registration policy.</t>
      <t>The registry values 65280-65535 are reserved for Private Use and Experimental Use</t>
         
    </section>
    <section anchor="IANA-DE-" title="Designated Expert Advise">
    <t>The Designated Expert (DE) for this new registry should verify that the entry makes sense within
    the IKEv2 protocol context and is distinct from existing entries in the registry.</t>
    </section>
    </section>

    <section title="Implementation Status" anchor="impl_status">
      <t>
      [Note to RFC Editor: Please remove this section and the reference to
      <xref target="RFC6982"/> before publication.]
     </t>
      <t>
      This section records the status of known implementations of the
      protocol defined by this specification at the time of posting of
      this Internet-Draft, and is based on a proposal described in
      <xref target="RFC7942"/>. The description of implementations in this
      section is intended to assist the IETF in its decision processes
      in progressing drafts to RFCs. Please note that the listing of
      any individual implementation here does not imply endorsement
      by the IETF. Furthermore, no effort has been spent to verify the
      information presented here that was supplied by IETF contributors.
      This is not intended as, and must not be construed to be, a catalog
      of available implementations or their features. Readers are advised
      to note that other implementations may exist.
     </t>
      <t>
      According to <xref target="RFC7942"/>, "this will allow reviewers
      and working groups to assign due consideration to documents that
      have the benefit of running code, which may serve as evidence of
      valuable experimentation and feedback that have made the implemented
      protocols more mature.  It is up to the individual working groups
      to use this information as they see fit".
     </t>
      <t>
      Authors are requested to add a note to the RFC Editor at the
      top of this section, advising the Editor to remove the entire
      section before publication, as well as the reference to <xref target="RFC7942"/>.
     </t>
      <section anchor="section.impl-status.libreswan" title="Libreswan">
        <t>
          <list style="hanging">
            <t hangText="Organization: ">The Libreswan Project</t>
            <t hangText="Name: ">https://libreswan.org/</t>
            <t hangText="Code: ">https://github.com/libreswan/libreswan</t>
            <t hangText="Description: ">
           An initial IKE implementation using the Private Use value 40960 for the Notify payload</t>
            <t hangText="Level of maturity: ">Beta</t>
            <t hangText="Coverage: ">Implements the draft's example reasons</t>
            <t hangText="Licensing: ">GPLv2</t>
            <t hangText="Implementation experience: ">TBD</t>
            <t hangText="Contact: ">Libreswan Development: swan-dev@libreswan.org</t>
          </list>
        </t>
      </section>
     </section>





  </middle>
  <back>
    <references title="Normative References">
     &RFC2119;
     &RFC7296;
     &RFC8174;
    </references>
    <references title="Informative References">
     &RFC5685;
     &RFC5723;
     &RFC6982;
     &RFC7942;
    </references>
  </back>
</rfc>
