Diameter nodes
SHOULD NOT perform group operations with peer nodes unless the node has advertised support for session grouping and group operations.
Newly defined Diameter applications may intrinsically support Diameter session grouping and group operations. In these cases, there is no need of a specific discovery mechanism for the support of session grouping capability besides the discovery of the Application Id assigned to the application advertised during the capability exchange phase described in
Section 5.3 of
RFC 6733.
System-specific and deployment-specific means, as well as out-of-band mechanisms for capability discovery, can be used to announce nodes' support for session grouping and session group operations. In such case, the optional Session-Group-Capability-Vector AVP, as described in
Section 4.1.2, can be omitted in Diameter messages being exchanged between nodes.
If no other mechanism for capability discovery is deployed to enable Diameter nodes to learn about nodes' capability to support session grouping and group commands for a given application, a Diameter node
SHOULD append the Session-Group-Capability-Vector AVP to any Diameter application messages exchanged with the other Diameter nodes to announce its capability to support session grouping and session group operations for the advertised application. Implementations following the specification as per this document
MUST set the BASE_SESSION_GROUP_CAPABILITY flag of the Session-Group-Capability-Vector AVP.
When a Diameter node receives at least one Session-Group-Capability-Vector AVP from a node with the BASE_SESSION_GROUP_CAPABILITY flag set, the receiving Diameter node discovers the supported session grouping capability of the sending Diameter node for the advertised application and
MUST cache this information for the lifetime of the routing table entry associated with the peer identity / Application Id pair (see
Section 2.7 of
RFC 6733).
This specification does not limit the number of session groups to which a single session is assigned. It is left to the implementation of an application to determine such limitations. If an application facilitates a session to belong to multiple session groups, the application
MUST maintain consistency of associated application session states for these multiple session groups.
Either Diameter node (client or server) can initiate the assignment of a session to a single or multiple session groups. Modification of a group by removing or adding a single or multiple user sessions can be initiated and performed mid-session by either Diameter node responsible for the session assignment to this group. Although Diameter is a peer-to-peer protocol, Diameter Authentication, Authorization, and Accounting (AAA) applications typically assign the role of a "Diameter client" to the Diameter node initiating the Diameter session and the role of "Diameter server" to the node authorizing the Diameter session. This specification does not restrict group creation, assignment, or deletion actions to a specific role. In the following sections, "Diameter node" is used to refer to either role.
Section 5 describes particularities about session grouping and performing group commands when relay agents or proxies are deployed.
Any Diameter node that has advertised support of session grouping and group operations
MUST store and maintain the group assignment as part of the session's state. A list of all known session groups is locally maintained on each node, with each group pointing to individual sessions being assigned to the group. Each Diameter node
MUST also keep a record about sessions that it has assigned to a session group.
To assign a session to a group at session initiation, a Diameter client sends a service-specific request, e.g., Network Access Server Requirements (NASREQ) AA-Request [
RFC 7155], containing one or more session group identifiers. Each of these groups
MUST be identified by a unique Session-Group-Id contained in a separate Session-Group-Info AVP, as specified in
Section 7.
The client may choose one or multiple session groups from a list of existing session groups. Alternatively, the client may decide to create a new group to which the session is assigned and identify itself in the <DiameterIdentity> portion of the Session-Group-Id AVP, as per
Section 7.3. For all assignments of a session to an active session group made by the client or the server, the SESSION_GROUP_STATUS flag in the Session-Group-Info AVP, which identifies the session group,
MUST be set. A set SESSION_GROUP_STATUS flag indicates that the identified session group has just been created or is still active.
The client
MUST set the SESSION_GROUP_ALLOCATION_ACTION flag of the Session-Group-Control-Vector AVP in each appended Session-Group-Info AVP to indicate that the session contained in the request should be assigned to the identified session group.
The client may also indicate in the request that it supports assignment of the session to one or more groups by the server. In such case, the client
MUST include the Session-Group-Info AVP in the request, including the Session-Group-Control-Vector AVP with the SESSION_GROUP_ALLOCATION_ACTION flag set but no Session-Group-Id AVP.
If the Diameter server receives a command request from a Diameter client and the command includes at least one Session-Group-Info AVP with the SESSION_GROUP_ALLOCATION_ACTION flag in the Session-Group-Control-Vector AVP set, the server can accept or reject the request for group assignment. Reasons for rejection may be, e.g., lack of resources for managing additional groups. When rejected, the session
MUST NOT be assigned to any session group.
If the Diameter server accepts the client's request for a group assignment, the server
MUST assign the new session to each (one or more) of the identified session groups when present in the Session- Group-Info AVP. If one or multiple identified session groups are not already stored by the server, the server
MUST store the one or more newly identified groups to its local list of known session groups. When sending the response to the client, e.g., a service-specific authorization response, as per NASREQ AA-Answer [
RFC 7155], the server
MUST include all Session-Group-Info AVPs received in the client's request.
In addition to the one or multiple session groups identified in the client's request, the server may decide to assign the new session to one or multiple additional groups. In such case, the server
MUST add to the response the additional Session-Group-Info AVPs, each identifying a session group to which the new session is assigned by the server. Each of the Session-Group-Info AVPs added by the server
MUST have the SESSION_GROUP_ALLOCATION_ACTION flag set in the Session-Group-Control-Vector AVP.
If the Diameter server rejects the client's request for a group assignment, the server sends the response to the client, e.g., a service-specific authorization response, as per NASREQ AA-Answer [
RFC 7155], and
MUST include all Session-Group-Info AVPs received in the client's request (if any) while clearing the SESSION_GROUP_ALLOCATION_ACTION flag of the Session-Group-Control-Vector AVP. The server
MAY still accept the client's request for the identified session to proceed despite rejecting the group assignment. The response sent to the client will then indicate success in the result code. In this case, the session is treated as a single session without assignment to any session group by the Diameter nodes.
If the assignment of the session to one or some of the multiple identified session groups fails, the session group assignment is treated as a failure. In such case, the session is treated as a single session without assignment to any session group by the Diameter nodes. The server sends the response to the client and
MAY include those Session-Group-Info AVPs for which the group assignment failed. The SESSION_GROUP_ALLOCATION_ACTION flag of included Session-Group-Info AVPs
MUST be cleared.
If the Diameter server receives a command request from a Diameter client and the command includes a Session-Group-Info AVP that does not include a Session-Group-Id AVP, the server
MAY decide to assign the session to one or multiple session groups. For each session group to which the server assigns the new session, the server includes a Session-Group-Info AVP with the Session-Group-Id AVP, identifying a session group in the response sent to the client. Each of the Session-Group-Info AVPs included by the server
MUST have the SESSION_GROUP_ALLOCATION_ACTION flag of the Session-Group-Control-Vector AVP set.
If the Diameter server receives a command request from a Diameter client and the command does not contain any Session-Group-Info AVPs, the server
MUST NOT assign the new session to any session group but treat the request the same as for a single session. The server
MUST NOT return any Session-Group-Info AVP in the command response.
If the Diameter client receives a response to its previously issued request from the server and the response includes at least one Session-Group-Info AVP with the SESSION_GROUP_ALLOCATION_ACTION flag of the associated Session-Group-Control-Vector AVP set, the client
MUST add the new session to all session groups as identified in one or multiple Session-Group-Info AVPs. If the Diameter client fails to add the session to one or more session groups as identified in one or multiple Session-Group-Info AVPs, the client
MUST terminate the session. The client
MAY send a subsequent request for session initiation to the server without requesting the assignment of the session to a session group.
If the Diameter client receives a response to its previously issued request from the server and one or more Session-Group-Info AVPs have the SESSION_GROUP_ALLOCATION_ACTION flag of the associated Session-Group-Control-Vector AVP cleared, the client
MUST terminate the assignment of the session to one or multiple groups. If the response from the server indicates success in the result code but only the assignment of the session to a session group has been rejected by the server, the client treats the session as a single session without group assignment.
If a Diameter client sends a request for session initiation containing one or more Session-Group-Info AVPs but the response from the Diameter server does not contain a Session-Group-Info AVP, the Diameter client
MUST proceed as if the request was processed without group assignments. The Diameter client
MUST NOT retry to request group assignment for this session but
MAY try to request group assignment for other new sessions.
When a Diameter client decides to remove a session from a particular session group, the client sends a service-specific re-authorization request to the server and adds one Session-Group-Info AVP to the request for each session group from which the client wants to remove the session. The session that is to be removed from a group is identified in the Session-Id AVP of the command request. The SESSION_GROUP_ALLOCATION_ACTION flag of the Session-Group-Control-Vector AVP in each Session-Group-Info AVP
MUST be cleared to indicate removal of the session from the session group identified in the associated Session-Group-Id AVP.
When a Diameter client decides to remove a session from all session groups to which the session has been previously assigned, the client sends a service-specific re-authorization request to the server and adds a single Session-Group-Info AVP to the request that has the SESSION_GROUP_ALLOCATION_ACTION flag cleared and the Session-Group-Id AVP omitted. The Session-Id AVP in the re-authorization request identifies the session that is to be removed from all groups to which it had been previously assigned.
If the Diameter server receives a request from the client that has at least one Session-Group-Info AVP appended with the SESSION_GROUP_ALLOCATION_ACTION flag cleared, the server
MUST remove the session from the session group identified in the associated Session-Group-Id AVP. If the request includes at least one Session-Group-Info AVP with the SESSION_GROUP_ALLOCATION_ACTION flag cleared and no Session-Id AVP present, the server
MUST remove the session from all session groups to which the session has been previously assigned. The server
MUST include in its response to the requesting client all Session-Group-Id AVPs received in the request.
When the Diameter server decides to remove a session from one or multiple particular session groups or from all session groups to which the session has been assigned beforehand, the server sends a Re-Auth-Request (RAR) or a service-specific server-initiated request to the client, indicating the session in the Session-Id AVP of the request. The client sends a Re-Auth-Answer (RAA) or a service-specific answer to respond to the server's request. The client subsequently sends a service-specific re-authorization request containing one or multiple Session-Group-Info AVPs, each indicating a session group to which the session had been previously assigned. To indicate removal of the indicated session from one or multiple session groups, the server sends a service-specific authorization response to the client, containing a list of Session-Group-Info AVPs with the SESSION_GROUP_ALLOCATION_ACTION flag cleared and the Session-Group-Id AVP identifying the session group from which the session should be removed. The server
MAY include with the service-specific authorization response a list of Session-Group-Info AVPs with the SESSION_GROUP_ALLOCATION_ACTION flag set and the Session-Group-Id AVP identifying session groups to which the session remains subscribed. If the server decides to remove the identified session from all session groups to which the session has been previously assigned, the server includes in the service-specific authorization response at least one Session-Group-Info AVP with the SESSION_GROUP_ALLOCATION_ACTION flag cleared and Session-Group-Id AVP absent.
Either Diameter node (client or server) can modify the group membership of an active Diameter session according to the specified permission considerations.
To update an assigned group mid-session, a Diameter client sends a service-specific re-authorization request to the server, containing one or multiple Session-Group-Info AVPs with the SESSION_GROUP_ALLOCATION_ACTION flag set and the Session-Group-Id AVP present, identifying the session group to which the session should be assigned. With the same message, the client
MAY send one or multiple Session-Group-Info AVPs with the SESSION_GROUP_ALLOCATION_ACTION flag cleared and the Session-Group-Id AVP identifying the session group from which the identified session is to be removed. To remove the session from all previously assigned session groups, the client includes at least one Session-Group-Info AVP with the SESSION_GROUP_ALLOCATION_ACTION flag cleared and no Session-Group-Id AVP present. When the server received the service-specific re-authorization request, it
MUST update its locally maintained view of the session groups for the identified session according to the appended Session-Group-Info AVPs. The server sends a service-specific authorization response to the client containing one or multiple Session-Group-Info AVPs with the SESSION_GROUP_ALLOCATION_ACTION flag set and the Session-Group-Id AVP identifying the new session group to which the identified session has been assigned.
When a Diameter server decides to update assigned groups mid-session, it sends a Re-Auth-Request (RAR) message or a service-specific request to the client identifying the session for which the session group lists are to be updated. The client responds with a Re-Auth-Answer (RAA) message or a service-specific answer. The client subsequently sends a service-specific re-authorization request containing one or multiple Session-Group-Info AVPs with the SESSION_GROUP_ALLOCATION_ACTION flag set and the Session-Group-Id AVP identifying the session group to which the session had been previously assigned. The server responds with a service-specific authorization response and includes one or multiple Session-Group-Info AVPs with the SESSION_GROUP_ALLOCATION_ACTION flag set and the Session-Group-Id AVP identifying the session group to which the identified session is to be assigned. With the same response message, the server
MAY send one or multiple Session-Group-Info AVPs with the SESSION_GROUP_ALLOCATION_ACTION flag cleared and the Session-Group-Id AVP identifying the session groups from which the identified session is to be removed. When a server wants to remove the session from all previously assigned session groups, it sends at least one Session- Group-Info AVP with the response having the SESSION_GROUP_ALLOCATION_ACTION flag cleared and no Session-Group-Id AVP present.
To explicitly delete a session group and release the associated Session-Group-Id value, the owner of a session group appends a single Session-Group-Info AVP with the SESSION_GROUP_STATUS flag cleared and the Session-Group-Id AVP identifying the session group that is to be deleted. The SESSION_GROUP_ALLOCATION_ACTION flag of the associated Session-Group-Control-Vector AVP
MUST be cleared.
A session group is implicitly deleted and its identifier is released after the last session has been removed from this session group.
Either Diameter node (client or server) can request the recipient of a request to process an associated command for all sessions assigned to one or multiple groups by identifying these groups in the request. The sender of the request appends for each group to which the command applies a Session-Group-Info AVP including the Session-Group-Id AVP to identify the associated session group. Both the SESSION_GROUP_ALLOCATION_ACTION flag and the SESSION_GROUP_STATUS flag
MUST be set.
If the Command Code Format (CCF) of the request mandates a Session-Id AVP, the Session-Id AVP
MUST identify one of the single sessions that is assigned to at least one of the groups being identified in the appended Session-Group-Id AVPs.
The sender of the request
MUST indicate to the receiver how multiple resulting transactions associated with a group command are to be treated by appending a single instance of a Group-Response-Action AVP. For example, when a server sends a Re-Auth-Request (RAR) or a service-specific server-initiated request to the client, it indicates to the client to follow the request according to one of three possible procedures. When the server sets the Group-Response-Action AVP to ALL_GROUPS (1), the client sends a single RAR message for all identified groups. When the server sets the Group-Response-Action AVP to PER_GROUP (2), the client sends a single RAR message for each identified group individually. When the server sets the Group-Response-Action AVP to PER_SESSION (3), the client follows up with a single RAR message per impacted session. If a session is included in more than one of the identified session groups, the client sends only one RAR message for that session.
If the sender sends a request including the Group-Response-Action AVP set to ALL_GROUPS (1) or PER_GROUP (2), it has to expect some delay before receiving one or more corresponding answers, as the answers will only be sent back when the request is processed for all the sessions or all the sessions of a session group. If the processing of the request is delay sensitive, the sender
SHOULD NOT set the Group-Response-Action AVP to ALL_GROUPS (1) or PER_GROUP (2). If the answer can be sent before the complete process of the request for all the sessions or if the request timeout timer is high enough, the sender
MAY set the Group-Response-Action AVP to ALL_GROUPS (1) or PER_GROUP (2).
If the sender wants the receiver of the request to process the associated command for a single session, the sender does not append any group identifier; it identifies only the relevant session in the Session-Id AVP.
A Diameter node receiving a request to process a command for a group of sessions identifies the relevant groups according to the included Session-Group-Id AVP in the Session-Group-Info AVP and processes the group command according to the included Group-Response-Action AVP. If the received request identifies multiple groups in multiple, included Session-Group-Id AVPs, the receiver
SHOULD process the associated command for each of these groups. If a session has been assigned to more than one of the identified groups, the receiver
MUST process the associated command only once per session.
When a Diameter node receives a request to process a command for one or more session groups and the result of processing the command is an error that applies to all sessions in the identified groups, an associated protocol error
MUST be returned to the source of the request. In such case, the sender of the request
MUST fall back to single-session processing and the session groups, which have been identified in the group command,
MUST be deleted according to the procedure described in
Section 4.3.
When a Diameter node receives a request to process a command for one or more session groups and the result of processing the command succeeds for some sessions identified in one or multiple session groups but fails for one or more sessions, the Result-Code AVP in the response message
SHOULD indicate DIAMETER_LIMITED_SUCCESS, as per
Section 7.1.2 of
RFC 6733.
In the case of limited success, the sessions for which the processing of the group command failed
MUST be identified by including their Session-Id AVP in the Failed-AVP AVP, as per
Section 7.5 of
RFC 6733. The sender of the request
MUST fall back to single-session operation for each of the identified sessions for which the group command failed. In addition, each of these sessions
MUST be removed from all session groups to which the group command applied. To remove sessions from a session group, the Diameter client performs the procedure described in
Section 4.2.2.
Either Diameter node can fall back to single-session operation by ignoring and omitting the optional group-session-specific AVPs. Fallback to single-session operation is performed by processing the Diameter command solely for the session identified in the mandatory Session-Id AVP. In such case, the response to the group command
MUST NOT include any group identifier but only the Session-Id identifying the session for which the command has been processed.