<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="no"?>
<?rfc iprnotified="no" ?>
<?rfc strict="no" ?>
<?rfc compact="no" ?>
<?rfc subcompact="no" ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3588 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3588.xml">
<!ENTITY RFC4005 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4005.xml">
]>
<rfc category="info" docName="draft-jones-diameter-group-signaling-00.txt" ipr="trust200902">
  <front>
    <title abbrev="Diameter Group Signaling">Diameter Group Signaling</title>

    <author fullname="Mark Jones" initials="M" surname="Jones">
      <organization>Bridgewater Systems</organization>
      <address>
        <email>mark@azu.ca</email>
      </address>
    </author>

    <date year="2011"/>
    <area>Internet</area>
    <workgroup>DIME</workgroup>
    <keyword>Internet-Draft</keyword>
    <keyword>AAA</keyword>
    <keyword>Diameter</keyword>
    <abstract>
      <t>In large network deployments, a single Diameter peer can 
      support over a million concurrent Diameter sessions. Recent use 
      cases have revealed the need for Diameter peers to apply the 
      same operation to a large group of Diameter sessions 
      concurrently. The Diameter base protocol commands operate on a
      single session so these use cases could result in many thousands
      of command exchanges in order to enforce the same operation on 
      each session in the group. In order to reduce signaling, it would 
      be desirable to enable bulk operations on all (or part of) the 
      sessions managed by a Diameter peer using a single or a few 
      command exchanges. This document specifies the Diameter protocol 
      extensions to achieve this signaling optimization.</t>
    </abstract>
  </front>

  <middle>
    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section anchor="introduction" title="Introduction">

      <t>In large network deployments, a single Diameter peer can 
      support over a million concurrent Diameter sessions. Recent use 
      cases have revealed the need for Diameter peers to apply the 
      same operation to a large group of Diameter sessions 
      concurrently. For example, a policy decision point may need to
      modify the authorized quality of service for all active users 
      having the same type of subscription. The Diameter base protocol 
      commands operate on a single session so these use cases could 
      result in many thousands of command exchanges in order to enforce 
      the same operation on each session in the group. In order to reduce 
      signaling, it would be desirable to enable bulk operations on all 
      (or part of) the sessions managed by a Diameter peer using a single or 
      a few command exchanges.</t>
      
      <t>This document describes a mechanism for grouping Diameter 
      sessions and performing re-authentication, re-authorization, 
      termination and abortion of groups of sessions. This document 
      does not define a new Diameter application. Instead it defines 
      mechanisms, commands and AVPs that may be used by any Diameter
      application that requires management of groups of sessions.</t>
      
    </section>

    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section title="Terminology">
    
          <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 RFC 2119 <xref target="RFC2119"/>.
        </t>
        
        <t>This document uses terminology defined <xref target="RFC3588"/>.</t>
        
    </section>
    
    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section title="Grouping User Sessions">
    
        <t>Either Diameter peer may assign a session to a group. Diameter AAA 
        applications typically assign client and server roles to the Diameter 
        peers. In this document, a Diameter client is a node at the edge of the 
        network that performs access control. A Diameter server is a node that 
        performs authentication and/or authorization of the user.</t>

        <section title="Group assignment at session initiation">
              
        <t>To assign a session to a group at session initiation, a Diameter 
        client sends a service specific auth request, e.g. NASREQ AAR 
        <xref target="RFC4005"/>,
        containing one or more client-assigned group identifiers. Assuming the 
        user is successfully authenticated and/or authorized, the Diameter 
        server responds with service-specific auth response, e.g. NASREQ AAA 
        <xref target="RFC4005"/>, 
        containing both the client-assigned group identifiers and the 
        server-assigned group identifiers.</t>
          
      </section>    
            
      <section title="Mid-session group assignment modifications">
      
        <t>Either Diameter peer may modify the group membership of an active 
        Diameter session. A Diameter client MAY remove the group(s) assigned to
        the active session by the Diameter server and vice versa.</t>
        <t>Editor's Note: It is FFS whether this document should define a 
        default permission model limiting removal of a session from a group.
        For example, the server MUST NOT remove a session from a group assigned
        by the client.</t> 
          
        <section title="Client-initiated group assignment changes">
          <t>To update the assigned groups mid-session, a Diameter client sends
          a service specific re-authorization request containing the 
          updated list of group identifiers. Assuming the user is successfully 
          authenticated and/or authorized, the Diameter server responds with 
          a service-specific auth response containing the updated 
          list of group identifiers received in the request.</t>
         </section>
      
        <section title="Server-initiated group assignment changes">
          <t>To update the assigned groups mid-session, a Diameter server sends 
          a Re-authorization Request (RAR) message requesting re-authorization 
          and the client responds with a Re-authorization Answer (RAA) message. 
          The Diameter client sends a service specific re-authorization request 
          containing the current list of group identifiers and the 
          Diameter server responds with a service-specific auth response
          containing the updated list of group identifiers.</t>
        </section>
      </section>
      
    </section>
    
    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section title="Protocol Description">

      <section title="Session Management">
      
        <section title="Authorization Session State Machine">
        
   <t>Section 8.1 in <xref target="RFC3588"/> defines a set of finite state
   machines, representing the life cycle of Diameter sessions, and which MUST 
   be observed by all Diameter implementations that make use of the 
   authentication and/or authorization portion of a Diameter application. 
   This section defines the additional state transitions related to the 
   processing of the new commands which may impact multiple sessions.</t>

   <t>The group membership is session state and therefore only those
   state machines from <xref target="RFC3588"/> in which the server is 
   maintaining session state are relevant in this document.  
   As in <xref target="RFC3588"/>, the term Service-Specific below refers to a 
   message defined in a Diameter application (e.g., Mobile IPv4, NASREQ).</t>

   <t>The following state machine is observed by a client when state is
   maintained on the server. State transitions which are unmodified 
   from <xref target="RFC3588"/> are not repeated here.</t>

          <t>
            <figure>
              <artwork><![CDATA[
                           CLIENT, STATEFUL
   State     Event                          Action       New State
   ---------------------------------------------------------------
   Idle      Client or Device Requests      Send         Pending
             access                         service
                                            specific
                                            auth req
                                            optionally
                                            including
                                            groups

   Open      BASR received with             Send BASA    Discon
             Session-Group-Action           with
             = ALL_GROUPS,                  Result-Code
             session is assigned to         = SUCCESS,
             received group(s) and          Send BSTR.
             client will comply with        
             request to end the session  
 
   Open      BASR received with             Send BASA    Discon
             Session-Group-Action           with
             = PER_GROUPS,                  Result-Code
             session is assigned to         = SUCCESS,
             received group(s) and          Send BSTR
             client will comply with        per group
             request to end the session  
 
   Open      BASR received with             Send BASA    Discon
             Session-Group-Action           with
             = PER_SESSION,                 Result-Code
             session is assigned to         = SUCCESS,
             received group(s) and          Send STR
             client will comply with        per session
             request to end the session
                                            
   Open      BASR received,                 Send BASA    Open
             client will not comply with    with
             request to end all session     Result-Code
             in received group(s)           != SUCCESS
                                            
   Discon    BSTA Received                  Discon.      Idle
                                            user/device

   Open      BRAR received with             Send BRAA,   Pending
             Session-Group-Action           Send 
             = ALL_GROUPS,                  service
             session is assigned to         specific
             received group(s) and          group
             client will perform            re-auth req
             subsequent re-auth

   Open      BRAR received with             Send BRAA,   Pending
             Session-Group-Action           Send 
             = PER_GROUP,                   service
             session is assigned to         specific
             received group(s) and          group
             client will perform            re-auth req
             subsequent re-auth             per group

   Open      BRAR received with             Send BRAA,   Pending
             Session-Group-Action           Send 
             = PER_SESSION,                 service
             session is assigned to         specific
             received group(s) and          re-auth req
             client will perform            per session
             subsequent re-auth

   Open      BRAR received and client will  Send BRAA    Idle
             not perform subsequent         with
             re-auth                        Result-Code
                                            != SUCCESS,
                                            Discon.
                                            user/device

   Pending   Successful service-specific    Provide      Open
             group re-authorization answer  service
             received.
             
   Pending   Failed service-specific        Discon.      Idle
             group re-authorization answer  user/device
             received.             
             
]]></artwork>
            </figure>
          </t>
   <t>The following state machine is observed by a server when it is
   maintaining state for the session. State transitions which are unmodified 
   from <xref target="RFC3588"/> are not repeated here.</t>
          <t>
            <figure>
              <artwork><![CDATA[
                             SERVER, STATEFUL
   State     Event                          Action       New State
   ---------------------------------------------------------------

   Idle      Service-specific authorization Send         Open
             request received, and user     successful
             is authorized                  service
                                            specific
                                            answer
                                            optionally 
                                            including
                                            groups
                                            
   Open      Server wants to terminate      Send BASR    Discon   
             group(s)

   Discon    BASA received                  Cleanup      Idle
   
   Any       BSTR received                  Send BSTA,   Idle 
                                            Cleanup

   Open      Server wants to reauth         Send BRAR    Pending
             group(s)

   Pending   BRAA received with Result-Code Update       Open
             = SUCCESS                      session(s)

   Pending   BRAA received with Result-Code Cleanup      Idle
             != SUCCESS                     session(s) 

   Open      Service-specific group         Send         Open
             re-authoization request        successful
             received and user is           service           
             authorized                     specific
                                            group
                                            re-auth
                                            answer

   Open      Service-specific group         Send         Idle
             re-authorization request       failed
             received and user is           service           
             not authorized                 specific
                                            group
                                            re-auth
                                            answer,
                                            cleanup
                                           
]]></artwork>
            </figure>
          </t>       
        
        </section>

        <section title="Server Initiated Group Re-auth">
          <t>TODO: rules/restrictions governing group re-auth</t>
        </section>

        <section title="Session Group Termination">
          <t>TODO: rules/restrictions governing session group termination</t>
        </section>
                
        <section title="Aborting a Group of Sessions">
          <t>TODO: rules/restrictions governing aborting groups of session</t>
        </section>
        
    </section>
    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section anchor="commands" title="Commands">

        <t>This specification extends the existing RAR, RAA, STR, STA,
        ASR and ASA command ABNFs.
        </t>

        <section title="Group-Re-Auth-Request">
          <t>   
   The Group-Re-Auth-Request (GRAR), indicated by the Command-Code set to TBD and the message flags' 'R' bit set, may be sent by any server to the
   access device that is providing session service, to request that
   one or more groups of users be re-authenticated and/or re-authorized.
          </t>
          <t>
            <figure>
              <artwork><![CDATA[
      <GRAR>  ::= < Diameter Header: TBD, REQ, PXY >
                * { Session-Group-Id }
                  { Origin-Host }
                  { Origin-Realm }
                  { Destination-Realm }
                  { Destination-Host }
                  { Auth-Application-Id }
                  { Re-Auth-Request-Type }
                  [ User-Name ]
                  [ Origin-State-Id ]
                * [ Proxy-Info ]
                * [ Route-Record ]
                  [ Session-Group-Action ]
                * [ AVP ]
]]></artwork>
            </figure>
          </t>
        </section>

        <section title="Group-Re-Auth-Answer">
   <t>The Group-Re-Auth-Answer (GRAA), indicated by the Command-Code set to TBD
   and the message flags' 'R' bit clear, is sent in response to the GRAR.
   The Result-Code AVP MUST be present, and indicates the disposition of
   the request.</t>

   <t>[Editor's Note: Move these detailed behaviour requirements to earlier
   section?]</t>

   <t>A successful GRAA message MUST be followed by an application-specific
   authentication and/or authorization message. The Group-Action AVP in the 
   Group-Re-Auth-Request indicates whether a single exchange, per-group or per-session is required.</t>
   
   <t>If the peer receiving the GRAR has no active sessions which are assigned to the 
   groups listed in the Session-Group-Id AVPs, it MUST return a GRAA with the
   Result-Code set to TBD.</t>

   <t>The Session-Group-Id AVPs in the GRAA indicate the groups for which the 
   GRAR receiver has active sessions assigned to those groups.
   </t>
          <t>
            <figure>
              <artwork><![CDATA[
      <GRAA>  ::= < Diameter Header: TBD, PXY >
                * { Session-Group-Id }
                  { Result-Code }
                  { Origin-Host }
                  { Origin-Realm }
                  [ User-Name ]
                  [ Origin-State-Id ]
                  [ Error-Message ]
                  [ Error-Reporting-Host ]
                * [ Failed-AVP ]
                * [ Redirect-Host ]
                  [ Redirect-Host-Usage ]
                  [ Redirect-Host-Cache-Time ]
                * [ Proxy-Info ]
                * [ AVP ]   
]]></artwork>
            </figure>
          </t>   
        </section>

        <section title="Group-Session-Termination-Request">
        
   <t>The Group-Session-Termination-Request (GSTR), indicated by the Command-Code
   set to TBD and the Command Flags' 'R' bit set, is sent by the access
   device to inform the Diameter Server that one or more groups of authenticated
   and/or authorized sessions are being terminated.</t>

          <t>
            <figure>
              <artwork><![CDATA[
      <GSTR>  ::= < Diameter Header: TBD, REQ, PXY >
                * { Session-Group-Id }
                  { Origin-Host }
                  { Origin-Realm }
                  { Destination-Realm }
                  { Auth-Application-Id }
                  { Termination-Cause }
                  [ User-Name ]
                  [ Destination-Host ]
                * [ Class ]
                  [ Origin-State-Id ]
                * [ Proxy-Info ]
                * [ Route-Record ]
                * [ AVP ]        
]]></artwork>
            </figure>
          </t>

        </section>
        
        <section title="Group-Session-Termination-Answer">
        
   <t>The Group-Session-Termination-Answer (GSTA), indicated by the Command-Code
   set to TBD and the message flags' 'R' bit clear, is sent by the
   Diameter Server to acknowledge the notification that one or more groups of
   session have been terminated.  The Result-Code AVP MUST be present, and MAY
   contain an indication that an error occurred while servicing the GSTR.</t>

   <t>Upon sending or receipt of the GSTA, the Diameter Server MUST release
   all resources for all sessions belonging to the groups indicated by the 
   Session-Group-Id AVP.  Any intermediate server in the Proxy-Chain MAY also release any resources, if necessary.</t>

          <t>
            <figure>
              <artwork><![CDATA[
      <GSTA>  ::= < Diameter Header: TBD, PXY >
                * { Session-Group-Id }
                  { Result-Code }
                  { Origin-Host }
                  { Origin-Realm }
                  [ User-Name ]
                * [ Class ]
                  [ Error-Message ]
                  [ Error-Reporting-Host ]
                * [ Failed-AVP ]
                  [ Origin-State-Id ]
                * [ Redirect-Host ]
                  [ Redirect-Host-Usage ]
                  [ Redirect-Max-Cache-Time ]
                * [ Proxy-Info ]
                * [ AVP ]
]]></artwork>
            </figure>
          </t>
        </section>
        
        <section title="Group-Abort-Session-Request">
   <t>The Group-Abort-Session-Request (GASR), indicated by the Command-Code set to
   TBD and the message flags' 'R' bit set, may be sent by any server to
   the access device that is providing session service, to request that
   the sessions identified by the Session-Group-Id be stopped.</t>
   
          <t>
            <figure>
              <artwork><![CDATA[
      <GASR>  ::= < Diameter Header: TBD, REQ, PXY >
                * { Session-Group-Id }
                  { Origin-Host }
                  { Origin-Realm }
                  { Destination-Realm }
                  { Destination-Host }
                  { Auth-Application-Id }
                  [ User-Name ]
                  [ Origin-State-Id ]
                * [ Proxy-Info ]
                * [ Route-Record ]
                  [ Group-Action ]
                * [ AVP ]
]]></artwork>
            </figure>
          </t>
               </section>
        
        <section title="Group-Abort-Session-Answer">
   <t>The Group-Abort-Session-Answer (GASA), indicated by the Command-Code set to
   TBD and the message flags' 'R' bit clear, is sent in response to the
   GASR.  The Result-Code AVP MUST be present, and indicates the
   disposition of the request.</t>

   <t>If the sessions identified by Session-Group-Id in the GASR were successfully
   terminated, Result-Code is set to DIAMETER_SUCCESS.  If the session
   is not currently active, Result-Code is set to
   DIAMETER_UNKNOWN_SESSION_ID.  If the access device does not stop the
   session for any other reason, Result-Code is set to
   DIAMETER_UNABLE_TO_COMPLY.</t>
   
   <t>[Editor's Note: Move these detailed behaviour requirements to earlier
   section.]</t>

   <t>A successful GASA message MUST be followed by one or more STR or GSTR to the authorizing server. The Group-Action AVP in the 
   Group-Abort-Session-Request indicates whether a GSTR per group of sessions, a GSTR per group or an STR per session is required.</t>
   
   <t>If the peer receiving the GASR has no active sessions which are assigned the 
   groups listed in the Session-Group-Id AVPs, it MUST return a GASA with the
   Result-Code set to TBD.</t>

   <t>The Session-Group-Id AVPs in the GASA indicate the groups for which the 
   GASR receiver has active sessions assigned to those groups.
   </t>
          <t>
            <figure>
              <artwork><![CDATA[
      <GASA>  ::= < Diameter Header: TBD, PXY >
                * { Session-Group-Id }
                  { Result-Code }
                  { Origin-Host }
                  { Origin-Realm }
                  [ User-Name ]
                  [ Origin-State-Id ]
                  [ Error-Message ]
                  [ Error-Reporting-Host ]
                * [ Failed-AVP ]
                * [ Redirect-Host ]
                  [ Redirect-Host-Usage ]
                  [ Redirect-Max-Cache-Time ]
                * [ Proxy-Info ]
                * [ AVP ]
]]></artwork>
            </figure>
          </t>
               </section>
        
      </section>
    </section>
    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section anchor="avps" title="AVPs">
      <t>
        <figure title="AVPs for the Diameter Group Signaling">
          <artwork><![CDATA[
                                        +--------------------+
                                        |   AVP Flag rules   |
                                        +----+---+------+----+
                      AVP               |    |   |SHOULD|MUST|
 Attribute Name       Code  Value Type  |MUST|MAY| NOT  | NOT|
+---------------------------------------+----+---+------+----+
|Session-Group-Id     TBD   OctetString |    | P |      | V  |
|Session-Group-Action TBD   Enumerated  |    | P |      | V  |
+---------------------------------------+----+---+------+----+
]]></artwork>
        </figure>
      </t>
      <section title="Session-Group-Id AVP">
      </section>
      <section title="Session-Group-Action AVP">
        <t>The Session-Group-Action AVP (AVP Code TBD) is of type Enumerated and specifies how the peer SHOULD issue follow up exchanges in response to a command which impacts mulitple sessions. The following values are supported:</t>
        <t><list style="hanging">
        <t hangText="ALL_GROUPS (0)"> <vspace/>
      Follow up exchanges should be performed with a single message exchange 
      for all impacted groups.
        </t>
        <t hangText="PER_GROUP (1)"><vspace/>
      Follow up exchanges should be performed with a message exchange for 
      each impacted group.
        </t>     
        <t hangText="PER_SESSION (2)"><vspace/>
      Follow up exchanges should be performed with a message exchange for 
      each impacted session.
        </t>     
        </list>
        </t>      
      </section>
    </section>
    <!-- ////////////////////////////////////////////////////////////////////////////////// -->
    
    <section anchor="result" title="Result-Code AVP Values">
      <t>This section defines new Result-Code <xref target="RFC3588"/> values that MUST be supported
        by all Diameter implementations that conform to this specification.</t>

      <t>[Editor's Note: Group specific error values may need to be added here.]</t>
      
    </section>

    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section title="IANA Considerations">
    
     <t>This section contains the namespaces that have either been created in 
     this specification or had their values assigned to existing namespaces 
     managed by IANA.</t>
    
      <section title="Command Codes">
        <t> This specification requires IANA to register the following new 
        Commands from the Command Code namespace defined in 
        <xref target="RFC3588"/>.
          <list style="symbols">
            <t>Group-Re-Auth-Request/Answer</t>
            <t>Group-Session-Termination-Request/Answer</t>
            <t>Group-Abort-Session-Request/Answer</t>
          </list>
          The commands are defined in <xref target="commands"/>.
        </t>
      </section>
      
      <section title="AVP Codes">
        <t> This specification requires IANA to register the following new AVPs 
        from the AVP Code namespace defined in <xref target="RFC3588"/>.
          <list style="symbols">
            <t>Session-Group-Id</t>
            <t>Session-Group-Action</t>
          </list>
          The AVPs are defined in <xref target="avps"/>.
        </t>
      </section>

    </section>
    
    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section title="Security Considerations">
      <t>TODO</t>
    </section>

    <section title="Acknowledgments">
    </section>

    <!-- ////////////////////////////////////////////////////////////////////////////////// -->
  </middle>

  <!-- ////////////////////////////////////////////////////////////////////////////////// -->

  <back>
    <references title="Normative References">
      &RFC2119; &RFC3588; &RFC4005;
    </references>
  </back>
</rfc>
