<?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 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="std" docName="draft-pwouters-ipsecme-delete-info-00">
  <front>
    <title>IKEv2 support for specifying a Delete notify reason</title>
    <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 specifying
       an estimated duration and reason. Example reasons are specified
       in <xref target="examples"/>.
      </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 Notify Status Message Payload" anchor="payload_del_reason">
        <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      !
+---------------+---------------+-------------------------------+
!            Downtime           !                               !
+-------------------------------+  Reason Message               ~
~                                                               !
+-------------------------------+-------------------------------+
            ]]></artwork>
        </figure>
        <t>
          <list style="symbols">
            <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>Downtime. A value in seconds for the expected downtime. 0 means unspecified.</t>
            <t>Reason Message. May be empty. Otherwise a non-NULL terminated UTF-8 or ASCII text.</t>
          </list>
        </t>
      </section>
    <section title="Operational Considerations" anchor="ops_consider">
      <t>
       A DELETE_REASON payload MUST be ignored if the exchange does not contain
       a Delete payload. 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="Security Considerations" anchor="sec_consider">
      <t>
       Any timing information and reason should be treated as an informational
       "best effort" message from the peer's operator. A DELETE_REASON message
       SHOULD NOT change the behaviour of the IKE implementation other than
       logging the message or triggering an informational or alert message.
      </t>
      <t>
       As with all received free-form text data, the receiver MUST treat the
       DELETE_REASON notify data as untrusted. It SHOULD strip or replace any
       characters not deemd regular text, for example the dollar sign ($), braces,
       backticks and backslashes. The Reason Message MUST NOT be assumed to be safe
       to display. It MUST NOT be assumed to be NULL terminated, which means common
       string operations such as strlen() MUST NOT be used without precautions. After
       the data has been processed and confirmed safe, it can be used for logging or
       as messages in notification systems.
      </t>
    </section>
    <section title="Example Messages" anchor="examples">
      <t>
       This section specifies short example messages that could be used to convey common
       reasons that implementations might have for deleting SAs.
      </t>
      <t>
        <list style="hanging">
            <t hangText='Reason Message'>Meaning of the Reason Message</t>
            <t hangText='"SERVICE_SHUTDOWN"'>The IKE service is being shut down</t>
            <t hangText='"SERVICE_RESTART"'>The IKE service is being restarted</t>
            <t hangText='"HOST_SHUTDOWN"'>The host running the IKE service is being shut down</t>
            <t hangText='"HOST_RESTART"'>The host running the IKE service is being restarted</t>
            <t hangText='"CONFIGURATION_CHILD_REMOVED"'>The Child SA was removed from the peer's configuration</t>
            <t hangText='"CONFIGURATION_IKE_REMOVED"'>The IKE SA was removed from the peer's configuration</t>
            <t hangText='"ADMINISTRATIVELY_DOWN"'>The SA was brought down by the operator</t>
            <t hangText='"IDLE_TIMEOUT"'>The SA was inactive and brought down automatically by the system</t>
          </list>
      </t>
    </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="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>
    <section anchor="IANA" title="IANA Considerations">
      <t>
        This document defines one new IKEv2 Notify Message Type payload for the IANA "IKEv2 Notify Message Types - Status Types" registry.
        </t>
      <figure align="center" anchor="iana_requests_i">
        <artwork align="left"><![CDATA[
      Value   Notify Type Messages - Status Types    Reference
      -----   ------------------------------    ---------------
      [TBD1]   DELETE_REASON                    [this document]
            ]]></artwork>
      </figure>
    </section>
  </middle>
  <back>
    <references title="Normative References">
     &RFC2119;
     &RFC7296;
     &RFC8174;
    </references>
    <references title="Informative References">
     &RFC6982;
     &RFC7942;
    </references>
  </back>
</rfc>
