rfc-8506

Diameter Credit-Control Application

L. Bertz (Editor), D. Dolson (Editor), Y. Lifshitz (Editor)
date2019-03 streamIETF areaops wgdime statusPROPOSED STANDARD pages130 canonicalhttps://www.rfc-editor.org/rfc/rfc8506 doi10.17487/RFC8506
This document specifies a Diameter application that can be used to implement real-time credit-control for a variety of end-user services such as network access, Session Initiation Protocol (SIP) services, messaging services, and download services. The Diameter Credit- Control application as defined in this document obsoletes RFC 4006, and it must be supported by all new Diameter Credit-Control application implementations.

obsoletes

Extracted elements (32)

design-rationale §5.1.2

The credit pool concept (Section 5.1.2) was introduced to avoid credit fragmentation (many small parallel reservations on the same account) and to fix the over-reservation problem of the basic single-quota tariff time change mechanism; multipliers translate per-service units into a shared abstract pool, allowing a single reservation to cover multiple services.

diameter

design-rationale §5.2

Two first-interrogation approaches are defined (post-authorization CCR vs. credit-control AVPs embedded in AA-Request) because some environments (3GPP, SIP) decouple authentication from service requests, making a separate CCR more appropriate, while NAS environments benefit from combining them for protocol efficiency.

diameter

interoperability-note §11

Section 11 defines a RADIUS/Diameter credit-control interworking model in which a Diameter/RADIUS gateway translates between RADIUS accounting attributes and Diameter credit-control AVPs, enabling prepaid services for RADIUS-based Service Elements.

diameter, radius

normative-requirement §5.1 MUST

All sub-sessions MUST be closed separately before the main session is closed so that units per sub-session may be reported; absence of CC-Sub-Session-Id implies no sub-sessions are in use.

diameter

normative-requirement §5.4 MUST

At final interrogation (CC-Request-Type=TERMINATION_REQUEST), the credit-control server MUST refund the reserved credit not used to the end user's account and deduct the used monetary amount from the account.

diameter

normative-requirement §1.3 MUST

Diameter nodes conforming to this specification MUST advertise support by including the value 4 in the Auth-Application-Id of the Capabilities-Exchange-Request and Capabilities-Exchange-Answer commands.

diameter

normative-requirement §5.1 MUST NOT

Each credit-control session MUST have a globally unique Session-Id as defined in RFC 6733, and this Session-Id MUST NOT be changed during the lifetime of a credit-control session.

diameter

normative-requirement §5.1.1 MUST

If a client does not support the tariff change mechanism and receives a CCA carrying the Tariff-Time-Change AVP, it MUST terminate the credit-control session with Termination-Cause set to DIAMETER_BAD_ANSWER.

diameter

normative-requirement §4.1.3 MUST NOT

If a rating input is incorrect in the CCR or the server does not support the requested service context, the CCA MUST contain the error code DIAMETER_RATING_FAILED and MUST include one or more Failed-AVP AVPs; a client receiving DIAMETER_RATING_FAILED MUST NOT send similar requests in the future.

diameter

normative-requirement §5.1 MUST

If the credit-control client performs credit reservation before granting service to the end user, it MUST use several interrogations toward the credit-control server (session-based credit-control), and in this case the credit-control server MUST maintain the credit-control session state.

diameter

normative-requirement §5.1.2 MUST

Re-authorization of a credit pool is triggered when C1*M1 + C2*M2 + ... + Cn*Mn >= S, where Cx is used resources for service x and Mx is the corresponding multiplier; this formula governs pooled-quota exhaustion across multiple services.

diameter

normative-requirement §5.1.2 MUST

The credit-control client MUST indicate support for independent credit-control of multiple services by including the Multiple-Services-Indicator AVP in the first interrogation; a server not supporting this feature MUST treat the Multiple-Services-Indicator AVP and any received Multiple-Services-Credit-Control AVPs as invalid.

diameter

normative-requirement §4.1.2 MUST

The Service-Context-Id AVP MUST be included at the command level of a Credit-Control-Request to identify the service-specific document that applies to the request.

diameter

normative-requirement §5.3 MUST

When all granted service units for a unit type are spent or the Validity-Time expires, the Diameter Credit-Control client MUST send a new Credit-Control-Request (CC-Request-Type=UPDATE_REQUEST) to the credit-control server.

diameter

normative-requirement §5.2 MUST

When session-based credit-control is required, the first interrogation (CC-Request-Type=INITIAL_REQUEST) MUST be sent before the Diameter Credit-Control client allows any service events for the end user.

diameter

normative-requirement §5.1.1 MUST

When the Diameter Credit-Control client reports used units and a tariff change has occurred, it MUST separately itemize units used before and after the tariff change; units that straddle the boundary and cannot be distinguished MUST be itemized in a third category.

diameter

privacy-consideration §15.2

Data minimization principles apply: credit-control clients SHOULD include only the subscription identifiers and equipment information required for rating, and SHOULD NOT send more granular service usage data than the credit-control server needs.

diameter, privacy

privacy-consideration §15.1

Several AVPs in CCR messages are privacy-sensitive, including Subscription-Id (MSISDN, IMSI, NAI), User-Equipment-Info (IMEI, MAC, EUI64), and service-specific rating AVPs; implementations SHOULD minimize the set of identifiers included and MUST protect them in transit using the Diameter security mechanisms.

diameter, privacy

protocol-element §8.3

The CC-Request-Type AVP (Enumerated) conveys the interrogation type: INITIAL_REQUEST (1), UPDATE_REQUEST (2), TERMINATION_REQUEST (3), and EVENT_REQUEST (4) for one-time events.

diameter

protocol-element §3.2

The Credit-Control-Answer (CCA) command uses Command Code 272 with the 'R' bit cleared, and includes mandatory AVPs: Session-Id, Result-Code, Origin-Host, Origin-Realm, Auth-Application-Id, CC-Request-Type, and CC-Request-Number.

diameter

protocol-element §8.14

The Credit-Control-Failure-Handling (CCFH) AVP and Direct-Debiting-Failure-Handling (DDFH) AVP allow service providers to specify per-policy behavior (TERMINATE, CONTINUE, or RETRY_AND_TERMINATE) when credit-control messages cannot reach the server.

diameter

protocol-element §3.1

The Credit-Control-Request (CCR) command uses Command Code 272 with the 'R' bit set, carries Auth-Application-Id=4, and includes mandatory AVPs: Session-Id, Origin-Host, Origin-Realm, Destination-Realm, Auth-Application-Id, Service-Context-Id, CC-Request-Type, and CC-Request-Number.

diameter

protocol-element §8.34

The Final-Unit-Indication AVP signals to the credit-control client that the granted units are the final ones; it carries a Final-Unit-Action AVP (TERMINATE, REDIRECT, or RESTRICT_ACCESS) defining what to do when the final units are consumed.

diameter

protocol-element §8.16

The Multiple-Services-Credit-Control AVP enables independent credit-control of multiple services within a single (sub-)session; it carries Requested-Service-Unit, Granted-Service-Unit, Used-Service-Unit, Service-Identifier, Rating-Group, Validity-Time, Final-Unit-Indication, and G-S-U-Pool-Reference sub-AVPs.

diameter

protocol-element §8.42

The Service-Context-Id AVP (UTF8String) uniquely identifies the service-specific document applicable to the CCR; the specific service is further identified by the combination of Service-Context-Id with Service-Identifier or Rating-Group.

diameter

registry §12.1

IANA assigned Application-Id value 4 to the Diameter Credit-Control application, updating the 'Diameter Application IDs' registry.

diameter, registry

registry §12.2

IANA assigned Command Code 272 to both Credit-Control-Request (CCR) and Credit-Control-Answer (CCA), updating the 'Diameter Command Codes' registry.

diameter, registry

registry §12.4

New Result-Code values are registered: transient failure DIAMETER_END_USER_SERVICE_DENIED (4010), DIAMETER_CREDIT_CONTROL_NOT_APPLICABLE (4011), DIAMETER_CREDIT_LIMIT_REACHED (4012); permanent failures DIAMETER_USER_UNKNOWN (5030), DIAMETER_RATING_FAILED (5031).

diameter, registry

registry §12.3

This document allocates numerous new AVP Codes in the 'Diameter AVP Codes' registry, including CC-Request-Type (416), Granted-Service-Unit (431), Used-Service-Unit (446), Multiple-Services-Credit-Control (456), Final-Unit-Indication (430), and many others defined in Section 8.

diameter, registry

security-consideration §14.2

Application-level redirects (Final-Unit-Action=REDIRECT) carry a risk of abuse, where a compromised credit-control server could redirect end users to malicious hosts; the redirect address returned in Final-Unit-Indication SHOULD be validated against a configured policy before use.

diameter, security

security-consideration §14.1

When Diameter redirect agents are used in the credit-control path, a malicious redirect agent could direct the credit-control client to a rogue server; implementations SHOULD use TLS/DTLS or IPsec to authenticate and protect connections to redirect agents and the servers they recommend.

diameter, security

state-machine §7

Section 7 defines the credit-control application state machines. Key states include Idle, PendingI (awaiting initial answer), Open (session active), PendingU (awaiting update answer), PendingT (awaiting termination answer), and PendingE (one-time event pending); transitions are triggered by CCR/CCA exchanges, timer expiry (Tx, Tcc), and failure events.

diameter