<?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 RFC4301 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4301.xml">
<!ENTITY RFC5570 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5570.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 RFC7942 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7942.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.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="7296"
    obsoletes=""
    category="std"
    docName="draft-ietf-ipsecme-labeled-ipsec-04">

  <front>

    <title abbrev="Labeled IPsec">Labeled IPsec Traffic Selector support for IKEv2 </title>

    <author initials='P.' surname="Wouters" fullname='Paul Wouters'>
     <organization>Red Hat</organization>
     <address>
      <email>pwouters@redhat.com</email>
     </address>
    </author>

    <author fullname="Sahana Prasad" initials="S." surname="Prasad">
        <organization>Red Hat</organization>
        
        <address>
            <email>sahana@redhat.com</email>
        </address>
    </author>
    
    <date/>

    <area>General</area>

    <workgroup>Network</workgroup>

    <keyword>IKEv2</keyword>
    <keyword>SPD</keyword>
     <keyword>SAD</keyword>
    
    <abstract>
      <t> This document defines a new Traffic Selector (TS) Type for
      Internet Key Exchange version 2 to add support for negotiating
      Mandatory Access Control (MAC) security labels as a traffic selector
      of the Security Policy Database (SPD). Security Labels for IPsec
      are also known as "Labeled IPsec".  The new TS type is TS_SECLABEL,
      which consists of a variable length opaque field specifying the
      security label. This document updates the IKEv2 TS negotiation
      specified in RFC 7296 Section 2.9.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
        <t> In computer security, Mandatory Access Control usually
        refers to systems in which all subjects and objects are assigned
        a security label. A security label is comprised of a set of
        security attributes. The security labels along with a system
        authorization policy determine access. Rules within the system
        authorization policy determine whether the access will be granted
        based on the security attributes of the subject and object.</t>

        <t> Traditionally, security labels used by Multilevel Systems
        (MLS) are comprised of a sensitivity level (or classification)
        field and a compartment (or category) field, as defined in <xref
        target="FIPS188"/> and <xref target="RFC5570"/>. As MAC systems
        evolved, other MAC models gained in popularity. For example,
        SELinux, a Flux Advanced Security Kernel (FLASK) implementation,
        has security labels represented as colon-separated ASCII strings
        composed of values for identity, role, and type. The security
        labels are often referred to as security contexts.</t>

        <t>Traffic Selector (TS) payloads specify the selection criteria
        for packets that will be forwarded over the newly set up IPsec SA as enforced
        by the Security Policy Database (SPD, see <xref target="RFC4301"/>). This
        document updates the Traffic Selector negotiation specified in
        Section 2.9 of <xref target="RFC7296"/>.</t>

        <t> This document specifies a new Traffic Selector Type
        TS_SECLABEL for IKEv2 that can be used to negotiate security
        labels as additional selectors for the Security Policy Database
        (SPD) to further restrict the type of traffic allowed to be sent
        and received over the IPsec SA.</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="Traffic Selector clarification">
        <t>The negotiation of Traffic Selectors is specified in Section 2.9 of <xref
        target="RFC7296"/> where it defines two TS
        Types (TS_IPV4_ADDR_RANGE and TS_IPV6_ADDR_RANGE). The Traffic
        Selector payload format is specified in Section 3.13 of <xref target="RFC7296"/>.
        However, the term Traffic Selector is used to denote the traffic
        selector payloads and individual traffic selectors of that payload. Sometimes
        the exact meaning can only be learned from context or if the
        item is written in plural ("Traffic Selectors" or "TSs"). This
        section clarifies these terms as follows:</t>

        <t>A Traffic Selector (no acronym) is one selector for traffic
        of a specific Traffic Selector Type (TS_TYPE).  For example a
        Traffic Selector of TS_TYPE TS_IPV4_ADDR_RANGE for UDP traffic in
        the IP network 198.51.100.0/24 covering all ports, is denoted as
        (17, 0, 198.51.100.0-198.51.100.255)</t>

        <t>A Traffic Selector payload (TS) is a set of one or more Traffic Selectors
        of the same or different TS_TYPEs, but MUST include at least
        one TS_TYPE of TS_IPV4_ADDR_RANGE or TS_IPV6_ADDR_RANGE. For example, the above
        Traffic Selector by itself in a TS payload is denoted as
        TS((17, 0, 198.51.100.0-198.51.100.255))</t>

      </section>

      <section title="Traffic Selector update">
        <t>The negotiation of Traffic Selectors is specified in Section 2.9 of <xref
        target="RFC7296"/> and states that the TSi/TSr payloads MUST contain at least one
        Traffic Selector type. This document updates the text to mean that the TSi/TSr
        payloads MUST contain at least one Traffic Selector of type TS_IPV4_ADDR_RANGE
        or TS_IPV6_ADDR_RANGE, as other Traffic Selector types can be defined that are
        complimentary to these Traffic Selector Types and cannot be selected on their
        own without TS_IPV4_ADDR_RANGE or TS_IPV6_ADDR_RANGE. The below defined
        TS_SECLABEL Traffic Selector Type is an example of this.</t>
      </section>

      </section>

      <section title="TS_SECLABEL Traffic Selector Type">
      <t>This document defines a new TS Type, TS_SECLABEL that contains a single new opaque Security Label.</t>

      <section title="TS_SECLABEL payload format">
        <figure align="center" anchor="tstype_seclabel" title="Labeled IPsec Traffic Selector">
            <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
   +---------------+---------------+-------------------------------+
   |   TS Type     |    Reserved   |       Selector Length         |
   +---------------+---------------+-------------------------------+
   |                                                               |
   ~                         Security Label*                       ~
   |                                                               |
   +---------------------------------------------------------------+
            ]]></artwork>
        </figure>

    <t>*Note: All fields other than TS Type and Selector Length depend on
   the TS Type. The fields shown is for TS Type TS_SECLABEL, the
   selector this document defines.

   <list style="symbols">
   <t>TS Type (one octet) - Set to [TBD] for TS_SECLABEL,</t>

   <t>Selector Length (2 octets, unsigned integer) - Specifies the
      length of this Traffic Selector substructure including the header.</t>

   <t>Security Label - An opaque byte stream of at least one octet.</t>
   </list>
   </t>
   </section>

      <section title="TS_SECLABEL properties">
      <t>The TS_SECLABEL Traffic Selector Type does not support narrowing or
      wildcards. It MUST be used as an exact match value.</t>

      <t>If the TS_SECLABEL is present in a TSi/TSr, at least one Traffic
      Selector of type TS_IPV4_ADDR_RANGE or TS_IPV6_ADDR_RANGE MUST also
      be present in that TSi/TSr.</t>

      <t>The Security Label contents are opaque to the IKE implementation.
      That is, the IKE implementation might not have any knowledge of the
      meaning of this selector, other than as a type and opaque value to pass
      to the SPD.</t>

      <t>A zero length Security Label MUST NOT be used. If a received
      TS payload contains a TS_TYPE of TS_SECLABEL with a zero length
      Security Label, that specific Traffic Selector MUST be ignored. If
      no other Traffic Selector of TS_TYPE TS_SECLABEL can be selected,
      a TS_UNACCEPTABLE Error Notify message MUST be returned. A zero
      length Security Label MUST NOT be interpreted as a wildcard
      security label.</t>
   
      <t>If multiple Security Labels are allowed for a given IP protocol,
      start and end address/port match, multiple TS_SECLABEL can be included
      in a TS payload. </t>
   
      <t>If the Security Label traffic selector is optional from a
      configuration point of view, the initiator will have to choose
      which TS payload to attempt first. If it includes the Security
      Label and receives a TS_UNACCEPTABLE, it can attempt a new Child
      SA negotiation without that Security Label.</t>

      <t>A responder that selected a TS with TS_SECLABEL MUST use the
      Security Label for all selector operations on the resulting IPsec
      SA. It MUST NOT select a TS_set with a TS_SECLABEL without using
      the specified Security Label, even if it deems the Security Label
      optional, as the initiator TS_set with TS_SECLABEL means the
      initiator mandates using that Security Label.</t>

   </section>
   </section>

    
   <section title="Traffic Selector negotiation">
      <t> This document updates the <xref target="RFC7296"/> specification
      as follows:</t>

      <t>Each TS payload (TSi and TSr) MUST contain at least one TS_TYPE
      of TS_IPV4_ADDR_RANGE or TS_IPV6_ADDR_RANGE.</t>

      <t>Each TS payload (TSi or TSr) MAY contain one or more other TS_TYPEs,
      such as TS_SECLABEL.</t>

      <t>A responder MUST create its TS response by selecting one of each
      TS_TYPE present in the offered TS by the initiator. If it cannot
      select one of each TS_TYPE, it MUST return a TS_UNACCEPTABLE Error Notify
      payload.</t>

      <t>If a specific TS_TYPE (other than TS_IPV4_ADDR_RANGE or
      TS_IPV6_ADDR_RANGE which are mandatory) is deemed optional,
      the initiator SHOULD first try to negotiate the Child SA with
      the TS payload including the optional TS_TYPE. Upon receiving
      TS_UNACCEPTABLE, it SHOULD attempt a new Child SA negotiation using
      the same TS but without the optional TS_TYPE.</t>

      <t>Some TS_TYPE's support narrowing, where the responder is allowed
      to select a subset of the original TS. Narrowing MUST NOT result
      in an empty selector for that TS_TYPE.</t>

   <section title="Example TS negotiation">

      <t>An initiator could send:</t>

        <figure align="center" anchor="tstype_example_i" title="initiator TS payloads example">
            <artwork align="left"><![CDATA[

      TSi = ((17,0,192.0.2.0-192.0.2.255),
             (0,0,198.51.0-198.51.255),
             TS_SECLABEL1, TS_SECLABEL2)
            
      TSr = ((17,0,203.0.113.0-203.0.113.255),
             (0,0,203.0.113.0-203.0.113.255),
             TS_SECLABEL1, TS_SECLABEL2)

            ]]></artwork>
        </figure>
       <t>The responder could answer with the following  example:</t>
        
        <figure align="center" anchor="tstype_example_r" title="responder TS payloads example">
            <artwork align="left"><![CDATA[

      TSi = ((0,0,198.51.0-198.51.255),
             TS_SECLABEL1)
            
      TSr = (((0,0,203.0.113.0-203.0.113.255),
             TS_SECLABEL1)

            ]]></artwork>
        </figure>

   </section>

   <section title="Considerations for using multiple TS_TYPEs in a TS">
     <t>It would be unlikely that the traffic for TSi and TSr would have
     a different Security Label, but this specification does allow this to
     be specified. If the initiator does not support this, and wants
     to prevent the responder from picking different labels for the
     TSi / TSr payloads, it should attempt a Child SA negotiation
     with only the first Security Label first, and upon failure retry a new
     Child SA negotiation with only the second Security Label.</t>

     <t>If different IP ranges can only use different specific Security
     Labels, than these should be negotiated in two different Child SA
     negotiations. If in the example above, the initiator only allows
     192.0.2.0/24 with TS_SECLABEL1, and 198.51.0/24 with TS_SECLABEL2,
     than it MUST NOT combine these two ranges and security labels
     into one Child SA negotiation.</t>

     <t>The mechanism of narrowing of Traffic Selectors with
     TS_IPV4_ADDR_RANGE and TS_IPV6_ADDR_RANGE does not apply to
     TS_SECLABEL as the Security Label itself is not interpreted and
     cannot itself be narrowed. It MUST be matched exactly. Rekey of
     an IPsec SA MUST only use identical Traffic Selectors, which means
     the same TS Type and selectors MUST be used. This guarantees that a
     Security Label once negotiated, remains part of the IPsec SA after
     a rekey.</t>
     </section>
     </section>

   <section anchor="Security" title="Security Considerations">
      <t>It is assumed that the Security Label can be matched by the IKE
       implementation to its own configured value, even if the IKE
       implementation itself cannot interpret the Security Label value.</t>
      <t>A packet that matches an SPD entry for all components except the
       Security Label would be treated as "not matching". If no other SPD
       entries match, the (mis-labeled) traffic might end up being transmitted
       in the clear. It is presumed that other Mandatory Access Control methods
       are in place to prevent mis-labeled traffic from reaching the IPsec
       subsystem, or that the IPsec subsystem itself would install a REJECT/DISCARD
       rule in the SPD to prevent unlabeled traffic otherwise matching
       a labeled security SPD rule from being transmitted without IPsec protection.
      </t>
   </section>
   
       <section anchor="IANA" title="IANA Considerations">
        <t>This document defines two new entries in the IKEv2 Traffic Selector Types registry:</t>
           <figure align="center" anchor="iana_requests">
               <artwork align="left"><![CDATA[
   Value   TS Type                      Reference
   -----   ---------------------------  -----------------
   TBD     TS_SECLABEL   [this document]
               ]]></artwork>
           </figure>
       </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://lists.libreswan.org/mailman/listinfo/swan-dev/</t>
        <t hangText="Description: ">
           A Proof of Concept branch is available for interop testing.</t>
        <t hangText="Level of maturity: ">Alpha</t>
        <t hangText="Coverage: ">
            Implements the entire draft using SElinux based labels</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 title="Acknowledgements" anchor="acknowledgements">
   <t>A large part of the introduction text was taken verbatim from
   <xref target="draft-jml-ipsec-ikev2-security-label"/> whose authors
   are J Latten, D. Quigley and J. Lu.</t>
   </section>
   
  </middle>

  <back>

    <references title="Normative References">
     &RFC2119;
     &RFC7296;
     &RFC8174;
    </references>

    <references title="Informative References">
      &RFC4301;
      &RFC5570;
      &RFC6982;
      &RFC7942;

     <reference anchor="FIPS188">
        <front>
          <title>National Institute of Standards and Technology, "Standard Security Label for Information Transfer"
          </title>
          <author initials="" surname="" fullname="National Institute of Standards and Technology">
            <organization>NIST</organization>
          </author>

          <date year="1994" month="September"/>
        </front>
        <seriesInfo name="Federal Information Processing Standard (FIPS)" value="Publication 188"/>
        <format type="HTML" target="https://csrc.nist.gov/publications/detail/fips/188/archive/1994-09-06"/>
      </reference>

   <reference anchor='draft-jml-ipsec-ikev2-security-label'>
      <front>
      <title>Security Label Extension to IKE</title>
      <author initials='J' surname='Latten' fullname='J. Latten'>
      <organization>IBM</organization>
      </author>
      <author initials='D' surname='Quigley' fullname='D. Quigley'>
      </author>
      <author initials='J' surname='Lu' fullname='J.Lu'>
      <organization>Oracle</organization>
      </author>
      <date month='January' day='28' year='2011' />
      <abstract><t>
       This document describes extensions to the Internet Key Exchange
       Protocol Version 2 RFC5996 to support Mandatory Access Control
       (MAC) security labels used on deployed systems.
       </t></abstract>
      </front>
      <seriesInfo name='Internet-Draft' value='draft-wouters-edns-tcp-keeaplive' />
      <format type='TXT' 
            target='http://www.ietf.org/internet-drafts/draft-wouters-edns-tcp-keeaplive-00.txt' />
   </reference>

    </references>
  </back>
</rfc>
