NETWORK WORKING GROUP                                        N. Williams
Internet-Draft                                                       Sun
Intended status: Standards Track                           M. Richardson
Expires: October 3, 2007                                             SSW
                                                              April 2007


     Better-Than-Nothing-Security: An Unauthenticated Mode of IPsec
                      draft-ietf-btns-core-03.txt

Status of this Memo

   By submitting this Internet-Draft, each author represents that any
   applicable patent or other IPR claims of which he or she is aware
   have been or will be disclosed, and any of which he or she becomes
   aware will be disclosed, in accordance with Section 6 of BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on October 3, 2007.

Copyright Notice

   Copyright (C) The IETF Trust (2007).













Williams & Richardson    Expires October 3, 2007                [Page 1]


Internet-Draft                 BTNS IPsec                     April 2007


Abstract

   This document specifies how to use the Internet Key Exchange (IKE)
   protocols, such as IKEv1 and IKEv2, to setup "unauthenticated"
   security associations (SAs) for use with the IPsec Encapsulating
   Security Payload (ESP) and the IPsec Authentication Header (AH).  No
   IKE extensions are needed, but Peer Authorization Database (PAD) and
   Security Policy Database (SPD) extensions are specified.
   Unauthenticated IPsec is herein referred to by its popular acronym,
   "BTNS" (Better Than Nothing Security).


Table of Contents

   1.    Introduction . . . . . . . . . . . . . . . . . . . . . . . .  3
   1.1.  Conventions used in this document  . . . . . . . . . . . . .  3
   2.    BTNS . . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
   3.    Usage Scenarios  . . . . . . . . . . . . . . . . . . . . . .  6
   3.1.  Example #1: sgA  . . . . . . . . . . . . . . . . . . . . . .  6
   3.2.  Example #2: Q  . . . . . . . . . . . . . . . . . . . . . . .  8
   3.3.  Example #3: C  . . . . . . . . . . . . . . . . . . . . . . .  9
   3.4.  Miscaellaneous examples  . . . . . . . . . . . . . . . . . .  9
   4.    Security Considerations  . . . . . . . . . . . . . . . . . . 10
   4.1.  Connection-Latching and Channel Binding  . . . . . . . . . . 10
   4.2.  Leap-of-Faith (LoF) for BTNS . . . . . . . . . . . . . . . . 10
   5.    IANA Considerations  . . . . . . . . . . . . . . . . . . . . 12
   6.    References . . . . . . . . . . . . . . . . . . . . . . . . . 13
   6.1.  Normative References . . . . . . . . . . . . . . . . . . . . 13
   6.2.  Informative References . . . . . . . . . . . . . . . . . . . 13
         Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 14
         Intellectual Property and Copyright Statements . . . . . . . 15




















Williams & Richardson    Expires October 3, 2007                [Page 2]


Internet-Draft                 BTNS IPsec                     April 2007


1.  Introduction

   Here we describe how to establish unauthenticated IPsec SAs using
   IKEv1 [RFC2408] [RFC2409] or IKEv2 [RFC4306] and unauthenticated
   public keys.  No new on-the-wire protocol elements are added to IKE
   or IKEv2.

   The [RFC4301] processing model is assumed.

   This document does not define an opportunistic BTNS mode of IPsec
   whereby nodes may fallback on unprotected IP when their peers do not
   support IKE or IKEv2, nor does it describe "leap-of-faith" modes, or
   "connection latching."

   See [I-D.ietf-btns-prob-and-applic] for the applicability and uses of
   BTNS.

1.1.  Conventions used in this document

   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 [RFC2119].





























Williams & Richardson    Expires October 3, 2007                [Page 3]


Internet-Draft                 BTNS IPsec                     April 2007


2.  BTNS

   The IPsec processing model, IKE and IKEv2 are hereby modified as
   follows:

   o  A new ID type is added, 'PUBLICKEY'; IDs of this type have public
      keys as values.  This ID type is not used on the wire.

   o  A BTNS-specific PAD entry.  This entry is intended to be the last
      entry in the PAD when BTNS is enabled.  A peer that matches no
      other PAD entries is to be "authenticated" by verifying that the
      signature in its AUTH (or SIG) payload in the IKEv2 (or v1)
      exchange with the public key from the peer's CERT payload.  The
      peer's ID MUST then be coerced to be of 'PUBLICKEY' type with the
      peer's public key as its value.

   o  A new flag for SPD entries: 'BTNS_OK'.  Traffic to/from peers that
      match the BTNS PAD entry will only match SPD entries that have the
      BTNS_OK flag set.  The SPD may be searched by address or by ID (of
      type PUBLICKEY, of course, for BTNS peers), as per the IPsec
      processing model [RFC4301]; searching by ID in this case requires
      creation of SPD entries that are bound to public key values (this
      could be used to build "leap-of-faith" behaviour, for example).

   Nodes MUST reject IKE_SA proposals from peers that match non-BTNS PAD
   entries but fail to authenticate properly.

   Nodes wishing to be treated as BTNS nodes by their peers SHOULD use
   bare RSA key CERT payloads and MAY use certificates known not to have
   been pre-shared with their peers or outside their trust anchors
   (e.g., self-signed certificates).  RSA keys for use in BTNS may be
   generated at any time, but "connection latching"
   [I-D.ietf-btns-connection-latching] requires that they remain
   constant between IKE exchanges setting up SAs for latched
   connections.

   To preserve standard IPsec access control semantics BTNS responders
   MUST NOT allow BTNS peers to assert addresses which could be asserted
   by non-BTNS peers.  This can be achieved by processing the PAD in
   order both, when peers authenticate and when BTNS peers negotiate
   child SAs -- in the first case the PAD is searched for a matching PAD
   entry as usual, and in the second it is searched to make sure that
   BTNS peers' asserted child SA traffic selectors do not conflict with
   non-BTNS PAD entries.  Note that in general, if there are multiple
   PAD entries with wildcard matching on peer ID then all but the last
   one should constrain the traffic selectors for matching peers.

   Note that nodes may unwittingly match peers' BTNS PAD entries and be



Williams & Richardson    Expires October 3, 2007                [Page 4]


Internet-Draft                 BTNS IPsec                     April 2007


   authenticated as BTNS nodes.  This may be used in specifying the
   "latching" of traffic flows to peer IDs
   [I-D.ietf-btns-connection-latching].
















































Williams & Richardson    Expires October 3, 2007                [Page 5]


Internet-Draft                 BTNS IPsec                     April 2007


3.  Usage Scenarios

   In order to explain the above rules a number of scenarios will be
   postulated.  The goal here is to demonstrate that the above rules are
   both sufficient and required.

   To explain the scenarios a reference diagram describing a canonical
   network will be used.  It is as follows:

                             [Q]  [R]
        AS1                   .    .              AS2
     [A]----+----[SG-A].......+....+.......[SG-B]-------[B]
                              ......               \
                              ..PI..                ----[btns-B]
                              ......
                 [btns-C].....+....+.......[btns-D]

                    Figure 1: Reference Network Diagram

   In this diagram, there are six end-nodes: A, B, C and D. Two of the
   systems are security gateways: SG-A, SG-B, protecting networks on
   which [A] and [B] reside.  There is a node [Q] which is IPsec and
   BTNS capable, and node [R] is a simple node, with no IPsec or BTNS
   capability.  Nodes [C] and [D] are BTNS capable.  We will examine
   interactions between the BTNS enabled nodes, and the IPsec enabled
   nodes.

   Nodes C and Q have a fixed addresses.  Node D non-fixed addresses.

   PI is the Public Internet ("The Wild").

3.1.  Example #1: sgA

   The machine that we will care about will be [SG-A], a firewall device
   of some kind which we wish to configure to respond to BTNS
   connections from [C]

   SG-A has the following "VPN" PAD and SPD entries:


                                Child SA
         Rule Remote ID        IDs allowed  SPD Search by
         ---- ---------        -----------  -------------
          1   <B's ID>         <B's network>  by-IP
          2   <Q's ID>         <Q's host>     by-IP
          3   PUBLICKEY:any         ANY       by-IP

   The last entry is the BTNS entry.



Williams & Richardson    Expires October 3, 2007                [Page 6]


Internet-Draft                 BTNS IPsec                     April 2007


                         Figure 2: SG-A PAD table

   Here <ANY> is any address that is not part of A's network, and is not
   claimed by any other entry.  Note that sgA's PAD entry has one and
   only one wildcard PAD entry: the BTNS catch-all PAD entry, so, as
   described in Section 2.

   <Child SA IDs allowed> and <SPD Search by> are from [RFC4301] section
   4.4.3


         Rule Local Remote Next Layer BTNS  Action
               addr  addr   Protocol   ok
         ---- ----- ------ ---------- ----  -----------------------
          1   A       R       ANY      N/A  BYPASS
          2   A       Q       ANY      no   PROTECT(ESP,tunnel,AES,
                                                        SHA256)
          3   A       B-net   ANY      no   PROTECT(ESP,tunnel,AES,
                                                        SHA256)
          4   A       ANY     ANY      yes  PROTECT(ESP,transport,
                                                        integr+conf)

                         Figure 3: SG-A SPD table

   The processing by sgA of various peers then is as follows:

   o  Q does not match PAD entry #1, but does match PAD entry #2; PAD
      processing stops, then the SPD is searched by Q's ID to find entry
      #2; CHILD SAs are then allowed that have sgA's and Q's addresses
      as the end-point addresses.

   o  sgB matches PAD entry #1; PAD processing stops, then the SPD is
      searched by sgB's ID to find SPD entry #3; CHILD SAs are then
      allowed that have sgA's address and any addresses from B's network
      as the end-point addresses.

   o  R does not initiate any IKE_SAs; its traffic to A is bypassed by
      SPD entry #1.

   o  C does not match PAD entries #1 or #2, but does match entry #3,
      the BTNS wildcard PAD entry; the SPD is searched by C's address
      and SPD entry #4 is matched.  CHILD SAs are then allowed that have
      sgA's address and C's address as the end-point addresses provided
      that C's address is neither Q's nor any of B's (see Section 2).

   o  Rogue BTNS nodes attempting to assert Q's or B's addresses will
      either match the PAD entries for Q or B and fail to authenticate
      as Q or B, in which case they are rejected, or they will match PAD



Williams & Richardson    Expires October 3, 2007                [Page 7]


Internet-Draft                 BTNS IPsec                     April 2007


      entry #3 but will not be allowed to create CHILD SAs with Q's or
      B's addresses as traffic selectors.

   o  Rogue BTNS nodes attempting to assert C's address are allowed.
      Protection for C requires additional bindings of C's specific BTNS
      ID (that is, its public key) to its traffic flows through
      connection-latching and channel binding, or leap-of-faith, none of
      which are described here.

3.2.  Example #2: Q

   Q is either a BITS or native IPsec implementation; if it is a native
   implementation it may have IPsec-aware applications, specifically
   NFSv4 (TCP port 2049).

   In any case, Q wants to communicate with A generally, and with BTNS
   peers for NFSv4 only.  It's PAD and SPD are configured as follows:


                                Child SA
         Rule Remote ID        IDs allowed  SPD Search by
         ---- ---------        -----------  -------------
          1   <A's ID>         <A's address>  by-IP
          2   PUBLICKEY:any    ANY            by-IP

   The last entry is the BTNS entry.

                           Figure 4: Q PAD table


         Rule Local Remote Next Layer BTNS  Action
               addr  addr   Protocol   ok
         ---- ----- ------ ---------- ----  -----------------------
          1     Q     A       ANY      no   PROTECT(ESP,tunnel,AES,
                                                        SHA256)
          2     Q     ANY     ANY      yes  PROTECT(ESP,transport,
                      and                               integr+conf)
                      port
                      2049

                         Figure 5: SG-A SPD table

   The same analysis shown above in Section 3.1 applies here with
   respect to sgA, C and rogue peers, except that C is allowed only
   access to the NFSv4 service on Q. Additionally sgB is treated as a
   BTNS peer as it is not known to Q, and therefore any host behind sgB
   can access the NFSv4 service on Q (and, because Q has no formal
   relationship with sgB, rogues can impersonate B).



Williams & Richardson    Expires October 3, 2007                [Page 8]


Internet-Draft                 BTNS IPsec                     April 2007


3.3.  Example #3: C

   C only supports BTNS and wants to use BTNS to protect NFSv4 traffic.
   It's PAD and SPD are configured as follows:


                                Child SA
         Rule Remote ID        IDs allowed  SPD Search by
         ---- ---------        -----------  -------------
          1   PUBLICKEY:any    ANY          by-IP

   The last entry is the BTNS entry.

                           Figure 6: Q PAD table


         Rule Local Remote Next Layer BTNS  Action
               addr  addr   Protocol   ok
         ---- ----- ------ ---------- ----  -----------------------
          1     C    ANY      ANY      yes  PROTECT(ESP,transport,
                     and                                integr+conf)
                     port
                     2049

          2     C    ANY      ANY      N/A  BYPASS

                         Figure 7: SG-A SPD table

3.4.  Miscaellaneous examples

   If sgA were not BTNS-capable then it would not have PAD and SPD
   entries #3 and #4, respectively.  Then C would be rejected as usual
   under the standard IPsec model [RFC4301].

   Similarly, if Q were not BTNS-capable then it would not have PAD and
   SPD entries #2.  Then C would be rejected as usual under the standard
   IPsec model [RFC4301].














Williams & Richardson    Expires October 3, 2007                [Page 9]


Internet-Draft                 BTNS IPsec                     April 2007


4.  Security Considerations

   Unauthenticated security association negotiation is subject to MITM
   attacks and should be used with care.  Where security infrastructures
   are lacking this may indeed be better than nothing.

   Use with applications that bind authentication at higher network
   layers to secure channels at lower layers may provide one secure way
   to use unauthenticated IPsec, but this is not specified herein.

   Use of multiple wildcard PAD entries can be problematic.  Where it is
   important that addresses and node identities be tightly bound it is
   important that such PAD entries limit the addresses that matching
   peers can assert for their CHILD SAs to non-overlapping address
   spaces.  In practice this may be difficult to configure; if it is not
   feasible to configure systems in this way then either BTNS should not
   be used or BTNS PAD entries should constrain matching peers only to
   using services for which authentication is not normally necessary or
   where IPsec-aware/connection-latching applications are used.

4.1.  Connection-Latching and Channel Binding

   BTNS is subject to MITM attacks.  One way to protect against MITM
   attacks subsequent to initial communications is to use "connection
   latching" [I-D.ietf-btns-connection-latching], whereby ULPs cooperate
   with IPsec in native IPsec implementations to bind individual packet
   flows to sequences of SAs whose end-point IDs (public keys, in the
   case of BTNS end-points) and other characteristics (e.g., quality of
   protection) must all be the same.

   MITMs can be detected by using application-layer authentication
   frameworks and/or mechanisms, such as the GSS-API [RFC2743], with
   channel binding [I-D.williams-on-channel-binding], where the channels
   to be bound to application-layer authentication are latched
   connections and where the channel bindings data strongly identify the
   end-points of the latched connection (e.g., the public keys of the
   end-points).

4.2.  Leap-of-Faith (LoF) for BTNS

   "Leap of faith" is the term generally used for the habit of accepting
   that a given key identifies a peer that one wanted to talk to without
   strong evidence for that proposition.  Specifically this is a common
   mode of operation for Secure Shell [RFC4251] clients where, when a
   server is encountered for the first time the client may ask the user
   whether to accept the server's public key as its identity and, if so,
   records the server's name (as given by the user) and public key in a
   database.



Williams & Richardson    Expires October 3, 2007               [Page 10]


Internet-Draft                 BTNS IPsec                     April 2007


   Leap of Faith can work in a similar way for BTNS nodes, but it is
   currently still being designed and specified by the IETF BTNS WG.

















































Williams & Richardson    Expires October 3, 2007               [Page 11]


Internet-Draft                 BTNS IPsec                     April 2007


5.  IANA Considerations

   This document has no IANA considerations, neither seeking to create
   new registrations nor new registries.  (The new ID type is not used
   on the wire, therefore it need not be assigned a number from the IANA
   IKEv2 Identification Payload ID Types registry.)













































Williams & Richardson    Expires October 3, 2007               [Page 12]


Internet-Draft                 BTNS IPsec                     April 2007


6.  References

6.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC4301]  Kent, S. and K. Seo, "Security Architecture for the
              Internet Protocol", RFC 4301, December 2005.

6.2.  Informative References

   [I-D.ietf-btns-connection-latching]
              Williams, N., "IPsec Channels: Connection Latching",
              draft-ietf-btns-connection-latching-00 (work in progress),
              February 2006.

   [I-D.ietf-btns-prob-and-applic]
              Touch, J., "Problem and Applicability Statement for Better
              Than Nothing Security  (BTNS)",
              draft-ietf-btns-prob-and-applic-05 (work in progress),
              February 2007.

   [I-D.williams-on-channel-binding]
              Williams, N., "On the Use of Channel Bindings to Secure
              Channels", draft-williams-on-channel-binding-00 (work in
              progress), August 2006.

   [RFC2408]  Maughan, D., Schneider, M., and M. Schertler, "Internet
              Security Association and Key Management Protocol
              (ISAKMP)", RFC 2408, November 1998.

   [RFC2409]  Harkins, D. and D. Carrel, "The Internet Key Exchange
              (IKE)", RFC 2409, November 1998.

   [RFC2743]  Linn, J., "Generic Security Service Application Program
              Interface Version 2, Update 1", RFC 2743, January 2000.

   [RFC4251]  Ylonen, T. and C. Lonvick, "The Secure Shell (SSH)
              Protocol Architecture", RFC 4251, January 2006.

   [RFC4306]  Kaufman, C., "Internet Key Exchange (IKEv2) Protocol",
              RFC 4306, December 2005.








Williams & Richardson    Expires October 3, 2007               [Page 13]


Internet-Draft                 BTNS IPsec                     April 2007


Authors' Addresses

   Nicolas Williams
   Sun Microsystems
   5300 Riata Trace Ct
   Austin, TX  78727
   US

   Email: Nicolas.Williams@sun.com


   Michael C. Richardson
   Sandelman Software Works
   470 Dawson Avenue
   Ottawa, ON  K1Z 5V7
   CA

   Email: mcr@sandelman.ottawa.on.ca
   URI:   http://www.sandelman.ottawa.on.ca/
































Williams & Richardson    Expires October 3, 2007               [Page 14]


Internet-Draft                 BTNS IPsec                     April 2007


Full Copyright Statement

   Copyright (C) The IETF Trust (2007).

   This document is subject to the rights, licenses and restrictions
   contained in BCP 78, and except as set forth therein, the authors
   retain all their rights.

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
   THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
   THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


Intellectual Property

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.


Acknowledgment

   Funding for the RFC Editor function is provided by the IETF
   Administrative Support Activity (IASA).





Williams & Richardson    Expires October 3, 2007               [Page 15]