<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'> 
<!ENTITY RFC2234 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2234.xml'>     
<!ENTITY RFC3588 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3588.xml'>     
<!ENTITY RFC4005 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4005.xml'> 
<!ENTITY RFC4072 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4072.xml'> 
<!ENTITY RFC3748 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3748.xml'> 
<!ENTITY RFC4282 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4282.xml'> 
<!ENTITY RFC4283 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4283.xml'> 
<!ENTITY RFC2486 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2486.xml'> 
<!ENTITY RFC2865 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2865.xml'> 
<!ENTITY RFC5113 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5113.xml'> 
<!ENTITY TS23234 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml5/reference.3GPP.23.234.xml'>
<!ENTITY TS24234 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml5/reference.3GPP.24.234.xml'>
<!ENTITY TS23003 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml5/reference.3GPP.23.003.xml'>
<!ENTITY TS29273 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml5/reference.3GPP.29.273.xml'>
]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="no" ?>
<?rfc compact="yes" ?><?rfc subcompact="yes" ?>
<rfc ipr="trust200902"
     category="std"
     docName="draft-ietf-dime-nai-routing-02.txt"
     updates="3588, 3588bis"
     >
  <front>
    <title abbrev="Diameter Realm Routing Clarifications">Diameter User-Name
    and Realm Based Request Routing Clarifications</title>

    <author role="editor" initials="J" surname="Korhonen" fullname="Jouni Korhonen">
      <organization>Nokia Siemens Networks</organization>
         <address>
                <postal>
                    <street>Linnoitustie 6</street>
                    <city>Espoo</city>
                    <code>FIN-02600</code>
                    <country>Finland</country>
                </postal>
                <email>jouni.nospam@gmail.com</email>
            </address>
    </author>

    <author initials="M" surname="Jones" fullname="Mark Jones">
      <organization>Bridgewater Systems</organization>
      <address>
        <postal>
          <street>303 Terry Fox Drive</street>
          <city>Ottawa,</city>
          <code>Ontario  K2K 3J1</code>
          <country>Canada</country>
        </postal>
        <email>Mark.Jones@bridgewatersystems.com</email>
      </address>
    </author>

    <author initials="L" surname="Morand" fullname="Lionel Morand">
      <organization>Orange Labs</organization>
      <address>
        <postal>
          <street>38-40 rue du general Leclerc</street>
          <city>Issy-moulineaux Cedex 9,</city>
          <code>92794</code>
          <country>France</country>
        </postal>
        <email>Lionel.morand@orange-ftgroup.com</email>
      </address>
    </author>

    <author initials="T" surname="Tsou" fullname="Tina Tsou">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street>R&D Center, Huawei Technologies Co., Ltd</street>
          <city>Bantian,</city>
          <code>Shenzhen</code>
          <country>P.R. China</country>
        </postal>
        <email>tena@huawei.com</email>
      </address>
    </author>


    <date year="2009"/>
    <area>Operations and Management</area>
    <workgroup>Diameter Maintenance and Extensions (DIME)</workgroup>
    <keyword>Internet-Draft</keyword>
    <keyword>Diameter</keyword>
    <keyword>NAI Docoration</keyword>
    <keyword>Routing</keyword>
    <abstract>
    <!--t>
    This specification clarifies the Diameter realm based request
    routing. We focus on the case where a Network Access Identifier in the
    User-Name AVP  contains
    more than one realm. This particular case is possible when the
    Network Access Identifier decoration is used to force a routing of
    request messages through a predefined list of
    realms. However, the specific handling of Decorated NAI by Diameter
    Agents for Diameter request routing is not clearly described in the
    RFC 3588 Diameter Base Protocol.
    </t-->

      <t>This specification defines the behavior required of Diameter agents to
         route requests when the User-Name Attribute Value Pair contains a
         Network Access Identifier formatted with multiple realms. These
         multi-realm or "Decorated" Network Access Identifiers
         are used in order to force the routing of request messages through a 
         predefined list of mediating realms.
      </t>
    </abstract>
    </front>

    <middle>
    <!-- ====================================================================== -->

    <section anchor="introduction" title="Introduction">
      <t>This specification defines the behavior required of Diameter agents to
         route requests when the User-Name Attribute Value Pair (AVP) contains
         a Network Access 
         Identifier (NAI) formatted with multiple realms (hereafter referred to
         as Decorated NAI).
         Decorated NAIs are used in order to force the routing of request
         messages through a predefined list of mediating realms. This
         specification does not define a new Diameter application but instead
         defines behaviour that would be common across all Diameter applications
         which require request routing based on Decorated NAI.
      </t>

      <t>At the time of publication of the Diameter Base
         Protocol <xref target="RFC3588"/>, the NAI definition was based on
         <xref target="RFC2486"/> in which a NAI could only contain a 
         single realm. The NAI definition has since been updated in
         <xref target="RFC4282"/> to define Decorated NAIs that contain
         multiple realms. However, RFC 4282 does not define how the Decorated
         NAIs should be handled by Diameter agents so this 
         specification was written to capture those requirements.
      </t>
    </section>   <!-- introduction -->

    <!-- ========================================================= -->

    <section anchor="terms" title="Terminology and Abbreviations">
      <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>

      <t><list style="hanging">

        <t hangText="Network Access Identifier (NAI):">
           <vspace blankLines="1"/>The Network Access Identifier (NAI)
           is the user identity submitted by
           the client during access authentication.  In roaming, the
           purpose of the NAI is to identify the user as well as
           to assist in the routing of the authentication request.
           <vspace blankLines="1"/>
        </t>

        <t hangText="Decorated NAI:">
           <vspace blankLines="1"/>A NAI containing multiple realms used to
           specify a source route and formatted according to Section 2.7 in
           RFC 4282.
           <vspace blankLines="1"/>
        </t>

        <t hangText="Network Access Provider (NAP):">
           <vspace blankLines="1"/>A business entity that provides
           network access infrastructure to one or more realms. A NAP
           infrastructure constitutes of one or more NASes. 
           <vspace blankLines="1"/>
        </t>

        <t hangText="Network Access Server (NAS):">
           <vspace blankLines="1"/>The device that peers connect to in order to obtain access to the
           network.
        <vspace blankLines="1"/>
        </t>

      </list></t> 
    </section> <!-- terminology -->
 
    <!-- ====================================================================== -->

    <section title="Problem Overview">
      <t>The Diameter Base Protocol RFC 3588 Section 6.1
         defines the request routing in detail. This specification
         concerns only those cases where a Destination-Realm AVP is
         included in a request message.  A Diameter peer originating
         a request message MAY retrieve the realm information from the
         User-Name AVP and use that realm to populate the Destination-Realm
         AVP. In that case, the User-Name AVP is in form of a NAI including
         the realm part.
      </t>
      <t>Decorated NAIs are used to force routing of messages
         through a predefined list  of realms and in that way e.g., force
         certain inter-realm roaming arrangements, see Section 2.7. of
         RFC 4282. For example, a terminal
         (e.g. a mobile host) may learn based on some application or
         implementation  specific manner that its network access
         authentication signaling must traverse through certain realms
         in order to reach the home realm. In this case the terminal
         would decorate its NAI during the network access
         authentication with the list of intermediating realms 
         and the home realm. As a result, the network access server
         (NAS) and intermediating Diameter agents would make sure that
         all subsequent request messages traverse through the desired
         realms as long as the request messages contain the User-Name
         AVP with a Decorated NAI.
      </t>

      <t>NAI decoration has previously been used in RADIUS <xref target="RFC2865"/>
         based roaming networks using RFC 2486 NAIs in a proprietary
         manner. There is a 
         need to replicate the same NAI based routing enforcement
         functionality also in Diameter based roaming networks.
         There are also publicly available specifications (e.g., see
         <xref target="3GPP.23.234"/>, <xref target="3GPP.24.234"/>,
         <xref target="3GPP.23.003"/>, <xref target="3GPP.29.273"/> and
         <xref target="WiMAX"/>) that assume NAI decoration
         based request routing enforcement is fully supported by RFC
         3588. The same assumption is carried over to NASREQ <xref
         target="RFC4005"/> and EAP <xref target="RFC4072"/> Diameter
         applications. 
      </t>
      <t><xref target="realms"/> illustrates an example deployment scenario
         where Decorated NAIs would be used to force a certain route through
         desired realms. A roaming terminal (e.g. a mobile host) discovers a
         number of Network Access Providers (NAP): NAP A and NAP B.
         None of the NAPs are able to provide direct connectivity to roaming
         terminals home realm (i.e. Realm-H). However, the roaming terminal
         learns, somehow, that NAP B is able to provide connectivity to the
         Realm-H through the Realm-X (i.e. the visited realm from the roaming
         terminal point of view). During the network access authentication, the
         roaming terminal would decorate its NAI as 
         Realm-H!username@Realm-X. The roaming terminal has also an alternative
         route to its home realm through NAP A, Realm-Z and Realm-X. If the
         roaming terminal were to choose to use NAP A, then it would decorate
         its NAI as Realm-X!Realm-H!username@Realm-Z. Diameter agents should now
         be able to route the request message through desired realms using
         the Decorated NAI originally found in the User-Name AVP.
      </t>
      <t>
      <figure anchor="realms" title="Example roaming scenario with
       intermediating realms. The mobile host authenticates to
       the home realm through one or more visited realms.">
       <artwork><![CDATA[
      .--.                 .--.                   .--.
    _(.   `)             _(.   `)               _(.   `)
  _(Visited`)_         _(Visited`)_           _(  Home `)_
 (   Realm-Z  `)<---->(   Realm-X  `)<------>(   Realm-H  `)
( `  .       )  )    ( `  .       )  )      ( `  .       )  )
 `--(_______)--'      `--(_______)--'        `--(_______)--'
       |                 __ /     
       |               /            
      .--.          .--.         
    _(    `.      _(    `.   
   (  NAP A )    (  NAP B )  
  ( `  .  )  )  ( `  .  )  ) 
   `--(___.-'    `--(___.-'  
                  )
         (  (   )
           (  |
              +-+     
              |M|
              +-+
      ]]></artwork>
      </figure>
      </t>
      <t>NAI decoration is not limited to the network access
         authentication and authorization procedures. It can be used
         with any Diameter application whose commands are proxiable
         and include the User-Name AVP with a NAI. Generally, the NAI decoration
         can be used to force a certain route for all request messages at
         a realm granularity. 
      </t>

      <t>As a problem summary we have two main issues:
      </t>
      <t>
         <list style="symbols">
         <t>Updating both Destination-Realm and User-Name AVPs based on the Decorated
            NAI extracted from the User-Name AVP. The update would be
            done by intermediating Diameter agents that participate to
            realm based request routing. Specifically, this would
            concern Diameter proxies. 
            <vspace blankLines="1"/>
         </t>

         <t>How Diameter agents could implement the handling of the NAI
            decoration based routing enforcement in a way that is
            still backwards compatible with RFC 3588.
         </t>
      </list>
      </t>
      <t><xref target="RFC5113"/> Section 2.3. also discusses
         NAI decoration related issues with EAP <xref target="RFC3748"/>
         in general.
      </t>
    </section>
  
  
    <!-- ====================================================================== -->

    <section title="Solution Overview">
      <t>This specification defines a solution for Diameter realm
         based request routing with routing enforcement using the
         User-Name AVP NAI decoration. Diameter proxy agent
         implementations can claim compliance using the solution
         described in this specification. 
      </t>

      <section title="Interpretation of Decorated NAIs">
        <t>Implementations compliant to this specification MUST have an
           uniform way of interpreting decorated NAIs. That is, in the
           case of decoration, the character '!' is used to separate
           realms in the list of decorated realms in the NAI (as shown
           in examples in <xref target="RFC4282"/>).
        </t>
      </section>

      <section title="Ensuring Backwards Compatibility">
      <t>Implementations compliant to this specification MUST define a new
         Diameter application. This requirement is set to guarantee backwards
         compatibility with existing Diameter implementations, applications
         and deployments. Diameter agents not compliant with this
         specification will not advertise support for these new applications
         that implement the enhanced routing solution based on Decorated NAIs
         and will therefore be bypassed.
      </t>
      </section>

      <section title="Enhanced Request Routing Solution" anchor="enhanced">

      <t>When a Diameter client originates a request message, the
         Destination-Realm AVP is populated with the realm part of the
         NAI available in the User-Name AVP (realm given after the '@'
         character of the NAI). The NAI in the User-Name AVP may or may
         not be decorated.
      </t>

      <t>When a
         Diameter agent receives a request message containing the
         Destination-Realm AVP with a realm that the agent is configured to
         process locally (and in the case of proxies the Diameter
         application is locally supported), it MUST do the following
         further processing before handling the message locally: 
      </t>
      <t><list style="symbols">
         <t>If the User-Name AVP is available in the request message,
            then the Diameter agent MUST inspect whether the User-Name
            AVP contains a Decorated NAI. If the NAI is not decorated
            then the Diameter agent proceeds with a normal RFC 3588
            message processing.
            <vspace blankLines="1"/>
         </t>
         <t>If the User-Name AVP contains a Decorated NAI, then the
            Diameter agent MUST process the NAI as defined in RFC 4282
            and update the value of the User-Name AVP
            accordingly. Furthermore, the Diameter agent MUST update
            the Destination-Realm AVP to match the new realm in the
            User-Name AVP. 
            <vspace blankLines="1"/>
         </t>
         <t>The request message is then sent to the next hop
            using the normal request routing rules as defined in RFC
            3588. 
         </t>
      </list></t>
      <t><xref target="example"/> illustrates an example of a roaming terminal originated
         signaling with the home realm (Realm-H) through a NAP and two
         intermediating realms (Realm-Z, Realm-X) before reaching
         the home realm (Realm-H). The example shows how the User-Name
         AVP and the Destination-Realm AVP change at each realm before
         reaching the final destination. If the signaling were
         originated from the NAS/NAP only, then the step 1) can be omitted.
      </t>
        <figure anchor="example" title="The roaming terminal decides
        that the Diameter messages must be routed via Realm-Z,
        Realm- X and Realm-H."><artwork><![CDATA[
1) Roaming Terminal -> NAS/NAP
       Identity/NAI = realm-X!realm-H!username@realm-Z

2) NAS/NAP -> Realm-Z
       User-Name = realm-X!realm-H!username@realm-Z
       Destination-Realm = realm-Z

3) Realm-Z -> realm-X
       User-Name = realm-H!username@realm-X
       Destination-Realm = realm-X

4) Realm-X -> Realm-H
       User-Name = username@realm-H
       Destination-Realm = realm-H
          ]]></artwork></figure>

      </section>
    </section>

    <!-- ====================================================================== -->
      <!-- ====================================================================== -->

    <section title="IANA Considerations">
        <t>This specification has no actions to IANA.
        </t>
    </section>

    <!-- ====================================================================== -->

    <section title="Security Considerations">
      <t>A malicious node initiating (or indirectly causing
         initiation of) a Diameter
         request may purposely create malformed list of realms in the
         NAI. This may cause the routing of requests through realms
         that would normally have nothing to do with the initiated
         Diameter message exchange. Furthermore, a malformed list of
         realms may contain non-existing realms causing the routing of
         Diameter messages that cannot ultimately be routed
         anywhere. However, the request message might get routed
         several hops before such non-existent realms are discovered
         and thus creating unnecessary overhead to the routing system
         in general.
      </t>
      <t>The NAI decoration is used in AAA infrastructures where the
         Diameter messages are transported between the NAS and the
         Diameter server via one or more AAA brokers or Diameter
         proxies.  In this case the NAS to the Diameter server AAA
         communication rely on the security properties of the
         intermediate AAA brokers and Diameter proxies.
      </t>
    </section>

    <!-- ====================================================================== -->

    <section title="Acknowledgements">
      <t>The authors would like to thank Victor Fajardo, Stefan
         Winter and Avi Lior for their detailed comments on this document.
      </t>
      <t>Jouni Korhonen would like to thank TEKES WISEciti project for
         providing funding to work on this document while he was at
         TeliaSonera's employ.
      </t>
    </section>


    <!-- ====================================================================== -->

    </middle>

    <!-- ====================================================================== -->

    <back>
    <references title="Normative References">
      &RFC2119;
      &RFC3588;
      &RFC4282;
    </references>

    <references title="Informative References">
      &RFC2486;
      &TS23234;
      &TS24234;
      &TS23003;
      &TS29273;
      &RFC2865;
      &RFC4005;
      &RFC4072;
      &RFC5113;
      &RFC3748;

      <reference anchor="WiMAX">
        <front>
          <title>WiMAX Forum Network Architecture (Stage 2:
                 Architecture Tenets, Reference Model and Reference Points)
          </title>
          <author>
            <organization>WiMAX Forum</organization>
          </author>
          <date year="2008" month="January" day="11"/>
        </front>
        <seriesInfo name="Release 1" value="Version 1.2"/>
        <format type="ZIP" target="http://www.wimaxforum.org/documents/documents/WiMAX_Forum_Network_Architecture_Stage_2-3_Rel_1v1.2.zip"/>
      </reference>
    </references>
    </back>
</rfc>
