<?xml version="1.0" encoding="US-ASCII"?>
<?rfc linefile="1:/tmp/CGI11956.1"?>
<?rfc linefile="1:/tmp/CGI11956.1"?>
<?rfc toc="yes"?>
<!-- generate a table of contents -->
<?rfc symrefs="yes"?>
<!-- use anchors instead of numbers for references -->
<?rfc sortrefs="yes" ?>
<!-- alphabetize the references -->
<?rfc compact="yes" ?>
<!-- conserve vertical whitespace -->
<?rfc subcompact="no" ?>
<!-- but keep a blank line between list items -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc4067 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4067.xml">
<!ENTITY rfc4251 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4251.xml">
<!ENTITY rfc4301 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4301.xml">
<!ENTITY rfc5996 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5996.xml">
]>

<rfc category="std"
     docName="draft-plmrs-ipsecme-ipsec-ikev2-context-definition-00"
     ipr="trust200902">
  <front>
    <title abbrev="IKEv2 and IPsec Context Definition for Cluster Management">IKEv2/IPsec Context Definition</title>
    <author fullname="Daniel Palomares" initials="D." surname="Palomares (Ed)">
      <organization>Orange</organization>
      <address>
        <postal>
          <street>38 rue du General Leclerc</street>
          <city>92794 Issy-les-Moulineaux Cedex 9</city>
          <country>France</country>
        </postal>
        <phone>+33 1 45 29 51 16</phone>
        <email>daniel.palomares@orange.com</email>
      </address>
    </author>

    <author fullname="Daniel Migault" initials="D." surname="Migault (Ed)">
      <organization>Orange</organization>
      <address>
        <postal>
          <street>38 rue du General Leclerc</street>
          <city>92794 Issy-les-Moulineaux Cedex 9</city>
          <country>France</country>
        </postal>
        <phone>+33 1 45 29 60 52</phone>
        <facsimile/>
        <email>daniel.migault@orange.com</email>
        <uri/>
      </address>
    </author>

    <!--
    <date month="December" year="2013"/>-->
    <date/>
    <area>INTERNET</area>

    <workgroup>IPSECME</workgroup>
   
    <abstract>
    <t>IPsec/IKEv2 cluster are constituted of multiple nodes accessed via a single address by the end user. The traffic is then split between the nodes via specific IP load balancing policies. Once a session is assigned to a given node, IPsec makes it difficult to assign the session to another node. This makes management operations and transparent high availability for end users, difficult to perform within the cluster.</t>
    <t>This document describes the contexts for IKEv2 and IPsec that MUST be transfered between two nodes so a session can be restored. This makes possible to tranfer an IPsec session transparently to the end user.</t>
    </abstract>
 
  </front>

  <middle>
    <section title="Requirements notation">
    <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 title="Introduction">
    <t>Large clusters may take advantage of the multiple nodes to enhance the peer's Quality of Service by performing among others:</t>
    <t>
    <list hangIndent="3" style="hanging">
        <t hangText="1)">Fail-over with high availability.</t>
        <t hangText="2)">Load balancing among cluster members.</t>
        <t hangText="3)">Scalability for overloaded IPsec platforms.</t>
        <t hangText="4)">Compatibility for IKEv2/IPsec context transfers among different constructors.</t>
    </list>
    </t>

    <t>This document addresses transfer of an IPsec session between physically or virtually different nodes within an IKEv2/IPsec cluster. More specifically, the document describes the parameters that SHOULD be transmitted between the IPsec/IKEv2 nodes, so that IKEv2 and IPsec session can be restored on the other node.</t>

    <t>Currently IPsec based services can hardly benefit from these features as IPsec Security Associations are bound to a single node and cannot be shared among different cluster members.</t>

    <t>This draft describes the parameters that MUST be transferred in order to keep an IKEv2/IPsec session alive in conformance with the Security Architecture for the Internet Protocol <xref target="RFC4301"/> and the Internet Key Exchange (IKEv2) Protocol <xref target="RFC5996"/>.</t>

    <t>This includes information such as the cryptographic material, the algorithms and the IP addresses, among others parameters. </t>                       

    <t>Note that IKEv2 and IPsec session do not need to be on the same node as IKEv2 and IPsec context are different. Note also that we do not specify in this document how the IKEv2 or IPsec context are transferred between one node to the other. This can be performed via a simple UDP session that MAY be IPsec protected, a SCP session <xref target="RFC4251"/> or using the context transfer protocol <xref target="RFC4067"/>.</t>
    </section>

    <section title="Terminology">
    <t>This document uses the following terminology:</t>
    <t>IKE_SA context: the set of parameters composing a single IKE Security Association. A bidirectional communication will need a pair of IKE_SAs, for incoming and outgoing IKE exchanges.</t>
    <t>IPsec_SA Context: the set of parameters composing a single IPsec Security Association. A bidirectional communication will need a pair of IPsec_SAs for incoming and outgoing traffic. </t> 
    <t>ESP: acronym for Encapsulation Security Payload. This header is part of the IPsec Security Architecture to provide origin authenticity, integrity and confidentiality protection of packets.</t>
    </section>
    
    <section title="IKEv2 Session parameters">
    <t>Considering IKEv2/IPsec sessions as bidirectional, we provide a list of parameters needed to create the IKE_SAs, which are usually stored in the user-land:</t>
    <t>
    <list hangIndent="3" style="hanging">
        <t hangText="1)">Version of IKE: in this draft we only consider version 2.</t>
        <t hangText="2)">The initiator flag and the responder flag for the IKE_SAs.</t>
        <t hangText="3)">Local host address and remote host address (IPv4 or IPv6).</t>  
        <t hangText="4)">The IKE_SA's SPI of both initiator and responder.</t>
        <t hangText="5)">The initiator nonce , responder nonce and diffie-hellman secret.</t>
        <t hangText="6)">The [SA] proposal including: encryption algorithm, length of the encryption key, integrity algorithm, length of the integrity key and the pseudo random function (prf) to generate the SKEYSEED.</t>
        <t hangText="7)">The extensions and condition of the IKE_SA (NAT, EAP, MOBIKE...).</t>
        <t hangText="8)">The IDs of the initiator and responder (ID_IPV4_ADDR, ID_IPV6_ADDR, ID_FQDN, ID_RFC822_ADDR, ID_DER_ASN1_DN, ID_DER_ASN1_GN or ID_KEY_ID).</t>
    </list>
    </t>
    </section>
    
    <section title="IPsec Session parameters">

    <t>Once the IKE_SAs are established for securing further IKEv2 exchanges, a pair of IPsec_SAs are negotiated in order to secure the traffic flow between nodes. The parameters of an IPsec_SA are usually stored within the kernel-land and user-land. The following is a list of the parameters needed to build an IPsec_SA:</t>
    <t>
    <list hangIndent="3" style="hanging">
        <t hangText="1)">Local host and remote host addresses (IPv4 or IPv6).</t>
        <t hangText="2)">The inbound and outbound IPsec_SA Security Parameter Indexes (SPIs).</t>
        <t hangText="3)">The sequence number counter.</t>
        <t hangText="4)">The sequence number overflow flag.</t>
        <t hangText="5)">The anti-replay window and the sequence number values.</t>  
        <t hangText="6)">IPsec mode: transport or tunnel mode.</t>
        <t hangText="7)">The IPsec protocol ESP and/or AH, their encryption/integrity algorithms and the key lengths.</t>
        <t hangText="8)">The SA Lifetime: a time interval or byte count after which an SA must be replaced with a new SA (and new SPI).</t>
        <t hangText="9)">Path MTU: maximum size of an IPsec packet that can be transmitted without fragmentation.</t>
        <t hangText="10)">Upperspec: upper-layer protocol to be used.</t>
        <t hangText="11)">Source IP address and ports of the protected traffic.</t>
        <t hangText="12)">Destination IP address and ports of the protected traffic.</t>        
    </list>
    </t>
    </section>
    
    <section title="IANA Considerations">
    <t> There are no IANA consideration for this document.</t>
    </section>


    <section title="Security Considerations">
    <t>Transferring an IPsec context between different SG involves sending sensitive information through the network. These pieces of information MUST be sent to an authenticated node via a secure channel.</t> 
    </section>

    <section title="Acknowledgment">
    <t>IPsec cluster management is a joint work between Orange, Universite Pierre et Marie Curie / LIP6 and Institut Telecom / Telcom SudParis.</t>
    <t>We would like to thank Maryline Laurent and Tobias Guggemos for their advises.</t> 
    </section>
  </middle>

  <back>
    <references title="Normative References">
        &rfc2119; <!--Key words for use in RFCs to Indicate Requirement Levels-->
        &rfc4251; <!--The Secure Shell (SSH) Protocol Architecture-->
        &rfc4301; <!--Security Architecture for the Internet Protocol-->
        &rfc5996; <!--Internet Key Exchange Protocol Version 2 (IKEv2)-->
    </references>
    <references title="Informative References">
        &rfc4067; <!--Context Transfer Protocol (CXTP)-->        
    </references>

<section title="ANNEX A: Data structure example"> 
      
    <t>Example of an IKEv2 data structure:</t>
    <figure>
        <artwork><![CDATA[
  typedef struct _IKEV2CONTEXT
            {
                 bool *initiator;
                 u_int32_t *ike_spi_i;
                 u_int32_t *ike_spi_r;
                 char *my_host;
                 char *other_host;
                 u_int16_t *enc_alg_ike;
                 u_int16_t *enc_alg_ike_len;
                 u_int16_t *int_alg_ike;
                 u_int16_t *prf_alg;
                 char *nonce_i;
                 char *nonce_r;
                 char *dh_secret
        } IKEV2CONTEXT;
        ]]></artwork>
      </figure>
      
      
    <t>Example of an IPsec session data structure:</t>
    <figure>
        <artwork><![CDATA[
  typedef struct _IPSECCONTEXT
            {
                 bool *initiator;
                 char *my_host;
                 char *other_host;
                 u_int8_t ipsec_mode;
                 u_int16_t *encr_alg_child;
                 u_int16_t *enc_alg_len_child;
                 u_int16_t *int_alg_child;
                 u_int32_t *enc_key_i;
                 u_int32_t *int_key_i;
                 u_int32_t *enc_key_o;
                 u_int32_t *int_key_o;
                 char *child_seq_i;
                 char *child_bit_i;
                 char *child_seq_o;
                 char *child_bit_o;
                 char *child_spi_i;
                 char *child_spi_o;
                 u_int16_t *ts_l_fromport;
                 u_int16_t *ts_l_toport;
                 u_int8_t *ts_l_type;
                 u_int8_t *ts_l_proto;
                 char *ts_l_fromaddress;
                 char *ts_l_toaddress;
                 u_int16_t *ts_r_fromport;
                 u_int16_t *ts_r_toport;
                 u_int8_t *ts_r_type;
                 u_int8_t *ts_r_proto;
                 char *ts_r_fromaddress;
                 char *ts_r_toaddress;
        } IPSECCONTEXT;
        ]]></artwork>
      </figure>
    </section>

    <section title="Document Change Log">
      <t>[RFC Editor: This section is to be removed before publication]</t>
      <t>-00: First version published.</t>
    </section>
  </back>
</rfc>
