RFC 7075

Realm-Based Redirection In Diameter

๐Ÿ“… published November 2013, from ietf

Realm-Based Redirection In Diameter ๐ŸŽ€

okay bestie, this one is RFC 7075 and it's a Standards Track doc from November 2013 ๐Ÿฆ‹. It's written by T. Tsou and R. Hao, with T. Taylor as editor (Ed.) ๐Ÿ’…. Tsou and Taylor are at Huawei Technologies, Hao is at Comcast Cable, and the ISSN is 2070-1721 โœจ. It updates RFC 6733 (Updates: 6733) ๐ŸŒธ.

Abstract โœจ

so the Diameter protocol has this redirection thing ๐Ÿ’… where an application-independent "redirect agent" can point messages somewhere else. sometimes an operator wants to send messages to a whole alternate domain without listing out individual hosts ๐Ÿ™ˆ. this doc specifies an application-specific mechanism that lets a Diameter server or proxy (a node) do that redirect when the Straightforward-Naming Authority Pointer (S-NAPTR) is not being used for dynamic peer discovery ๐Ÿ”ฅ. the node doing this is called a "Realm-based Redirect Server" ๐Ÿ‘‘.

this memo updates Sections 6.13 and 6.14 of RFC 6733 with respect to the usage of the Redirect-Host-Usage and Redirect-Max-Cache-Time Attribute-Value Pairs (AVPs) ๐Ÿ’–.

Status of This Memo ๐ŸŒˆ

this is an Internet Standards Track document โญ.

it's a product of the Internet Engineering Task Force (IETF) ๐Ÿซถ. it represents the consensus of the IETF community, it got public review, and the Internet Engineering Steering Group (IESG) approved it for publication ๐Ÿ‘‘. if you want more info on Internet Standards, check Section 2 of RFC 5741 ๐Ÿงš.

for the current status, any errata, and how to send feedback, go to http://www.rfc-editor.org/info/rfc7075 ๐Ÿ“.

Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved ๐Ÿฆ‹.

this document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they're in effect on the date of publication ๐Ÿ“œ. please read these carefully, because they explain your rights and restrictions with respect to this document ๐Ÿ™. any Code Components pulled out of this document have to include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, as described in the Simplified BSD License โœจ.

Table of Contents ๐Ÿ“š

1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
  1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   3
2.  Support of Realm-Based Redirection Within Applications  . . .   4
3.  Realm-Based Redirection . . . . . . . . . . . . . . . . . . .   5
  3.1.  Configuration of the Realm-Based Redirect Server  . . . .   5
  3.2.  Behavior of Diameter Nodes  . . . . . . . . . . . . . . .   6
    3.2.1.  Behavior at the Realm-Based Redirect Server . . . . .   6
    3.2.2.  Proxy Behavior  . . . . . . . . . . . . . . . . . . .   6
    3.2.3.  Client Behavior . . . . . . . . . . . . . . . . . . .   7
  3.3.  The Redirect-Realm AVP  . . . . . . . . . . . . . . . . .   7
  3.4.  DIAMETER_REALM_REDIRECT_INDICATION Protocol Error Code  .   7
4.  Security Considerations . . . . . . . . . . . . . . . . . . .   8
5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   8
6.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .   9
7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   9
  7.1.  Normative References  . . . . . . . . . . . . . . . . . .   9
  7.2.  Informative References  . . . . . . . . . . . . . . . . .   9

1. Introduction ๐Ÿงš

the Diameter base protocol [RFC6733] has a basic redirection service that a redirect agent provides ๐Ÿ’–. the redirect indication that comes back from the redirect agent is described in Section 6.1.8 and Sections 6.12 through 6.14 of [RFC6733] ๐Ÿ“–. it hands the message sender one or more individual hosts as the destination of the redirected message ๐ŸŒธ.

but here's the tea ๐Ÿซ–. imagine an operator who offered a specific service and now doesn't want to anymore ๐Ÿ˜ญ. they've set up an alternative domain to provide the service instead ๐Ÿฆ‹. to make the switch smooth, the original operator keeps a redirect server around to tell the message sender which alternative domain the request should be sent to ๐Ÿ’…. the thing is, the original operator shouldn't have to configure that redirect server with a list of hosts to contact in the alternative operator's domain ๐Ÿ™ˆ. the original operator should just be able to give redirect indications for the domain as a whole ๐Ÿ‘‘.

1.1. Terminology ๐ŸŽ€

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] โœจ.

in this spec, "realm-based redirection" means a mode of operation where a realm, instead of an individual host, is returned as the redirect indication ๐Ÿฆ‹.

"Realm-based Redirect Server" is the Diameter node (Diameter server or proxy) that returns the realm-based redirection ๐Ÿ‘‘. its behavior is a slight tweak on the basic redirect agent behavior from Section 6.1.8 of [RFC6733] ๐Ÿ’œ.

this document uses a bunch of terms the same way [RFC6733] does: "Diameter client", "Diameter node", "Diameter peer", "Diameter server", "proxy", "realm" or "domain", "redirect agent", and "session" (as defined in Section 1.2), plus "application", which is defined implicitly by Sections 1.3.4, 2.3, and 2.4 ๐ŸŒˆ.

2. Support of Realm-Based Redirection Within Applications ๐Ÿ’…

the DNS-based dynamic peer discovery mechanism in the Diameter base protocol [RFC6733] gives you a simple way to do realm-based redirection using the S-NAPTR DDDS application [RFC3958] ๐Ÿงš. when S-NAPTR is used for peer discovery, you can redirect Diameter requests from the original realm to a new realm by updating the existing NAPTR resource records (RRs) for the original realm like this ๐Ÿฆ‹: the NAPTR RR for the desired application(s) and supported application protocol(s) provided by the new realm has an empty FLAG field, and the REPLACEMENT field holds the new realm to use for the next DNS lookup ๐Ÿ“. the new realm can be arbitrary ๐ŸŒธ. the restriction in [RFC6733] that the NAPTR replacement field match the domain of the original query does not apply for realm-based redirect purposes ๐Ÿ™ˆ.

however, using DNS-based dynamic peer discovery is optional for Diameter implementations ๐Ÿซถ. for deployments that don't use S-NAPTR peer discovery, support for realm-based redirection needs to be specified as part of the functionality a Diameter application supports ๐Ÿ“œ. that way, support of the Diameter application (found during the capabilities exchange phase defined in the Diameter base protocol [RFC6733]) implicitly indicates support for the realm-based redirection mechanism โœจ. a new application specification can bring in the mechanism specified here by making it mandatory to implement for the application and referencing this specification normatively ๐Ÿ‘‘.

the big deal: if realm-based redirection is an application-specific behavior, a basic redirect agent from [RFC6733] can't do it. it MUST be performed instead by an application-aware Diameter node (Diameter server or proxy), which this doc calls a "Realm-based Redirect Server" ๐Ÿ”ฅ.

an application can say whether realm-based redirection works only on complete sessions that start with the initial message, or on every message within the application, even if earlier messages in the same session weren't redirected ๐Ÿ’–. this distinction only matters when realm-based redirection is first kicked off ๐Ÿงš. in the first case, existing sessions won't get disrupted when realm-based redirection gets deployed ๐ŸŒˆ. in the second case, existing sessions will be disrupted if they're stateful ๐Ÿ˜ญ.

3. Realm-Based Redirection ๐Ÿฆ‹

this section specifies an extension to the Diameter base protocol [RFC6733] to get realm-based redirection working ๐Ÿ’…. the pieces of this solution are:

  • a new result code, DIAMETER_REALM_REDIRECT_INDICATION (3011) ๐ŸŒธ;
  • a new attribute-value pair (AVP), Redirect-Realm (620) ๐Ÿ’–; and
  • associated behavior at Diameter nodes that implement this specification ๐Ÿ‘‘.

this behavior includes the optional use of the Redirect-Host-Usage and Redirect-Max-Cache-Time AVPs โœจ. in this doc, these AVPs apply to the peer discovered by a node acting on the redirect server's response, which is an extension of their normal usage as described in Sections 6.13 and 6.14 of [RFC6733] ๐ŸŽ€.

Section 3.2.2 and Section 3.2.3 describe how a proxy or client may update its routing table for the application and initial realm after it selects a peer in the new realm following realm-based redirection ๐Ÿงš. heads up, though: the proxy or client will then automatically route later requests for that application to the new realm (except maybe requests within sessions already established with the initial realm) until the cached routing entry expires ๐Ÿ™ˆ. keep this in mind if the rerouting is meant to be temporary โณ.

3.1. Configuration of the Realm-Based Redirect Server ๐ŸŒˆ

a Diameter node (Diameter server or proxy) acting as a Realm-based Redirect Server MUST be configured as follows to run realm-based redirection ๐Ÿ”ฅ:

  • configured with an application that incorporates realm-based redirection ๐Ÿ’…;
  • the Local Action field of the routing table described in Section 2.7 of [RFC6733] is set to LOCAL ๐Ÿฆ‹;
  • an application-specific field is set to indicate that the required local action is to perform realm-based redirection ๐Ÿ“;
  • an associated application-specific field is configured with the identities of one or more realms to which the request should be redirected ๐Ÿ‘‘.

3.2. Behavior of Diameter Nodes ๐Ÿ’–

3.2.1. Behavior at the Realm-Based Redirect Server

okay so bestie, remember how Section 2 talked about this? ๐ŸŽ€ An application can say realm-based redirection only kicks in for complete sessions starting from the initial message (so established sessions don't get disrupted ๐Ÿซถ), OR it can apply to every single message in the app, even if earlier messages in the same session weren't redirected ๐Ÿ‘€.

If a Realm-based Redirect Server set up the way Section 3.1 describes gets a request that realm-based redirection applies to, it MUST reply with an answer message that has the 'E' bit set ๐Ÿ”ฅ, and it MUST keep the Hop-by-Hop Identifier in the header. It MUST also include the Result-Code AVP set to DIAMETER_REALM_REDIRECT_INDICATION ๐Ÿ’…, and it MUST include the alternate realm identifier(s) it was configured with, each one in its own Redirect-Realm AVP instance โœจ.

The Realm-based Redirect Server MAY include a copy of the Redirect-Host-Usage AVP ๐Ÿงš, and if it does, that AVP SHOULD be set to REALM_AND_APPLICATION. If this AVP gets added, the Redirect-Max-Cache-Time AVP MUST also be included ๐ŸŒธ. Heads up that these AVPs apply to the peer discovered by a node acting on the server's response (more on that in the next section) ๐Ÿ‘€. This is a bit of an extension of how they normally work, as described in Sections 6.13 and 6.14 of [RFC6733] ๐Ÿ’œ.

Realm-based redirection MAY be applied even if a Destination-Host AVP is present in the request, depending on the operator-based policy. ๐Ÿ™ˆ

3.2.2. Proxy Behavior

A proxy that follows this spec and gets an answer message with the Result-Code AVP set to DIAMETER_REALM_REDIRECT_INDICATION MUST try to reroute the original request to a server in a realm named by a Redirect-Realm AVP instance in that answer ๐Ÿฆ‹. If that fails, it MUST forward the indication toward the client ๐Ÿ’–. To reroute, it MUST do the following:

  1. Pick one specific realm from the ones listed in the Redirect-Realm AVP instances in the answer message ๐ŸŒˆ.
  2. If that worked, find and set up a route to a peer in the realm given by the Redirect-Realm AVP, using the normal discovery steps in Section 5.2 of [RFC6733] ๐Ÿ”.
  3. If that worked too: A. Update its cache of routing entries for the realm and application the original request was aimed at, taking into account the Redirect-Host-Usage and Redirect-Max-Cache-Time AVPs if they're in the answer ๐Ÿ—‚๏ธ. B. Remove the Destination-Host (if present) and Destination-Realm AVPs from the original request, then add a new Destination-Realm AVP containing the realm picked in the first step ๐ŸŽ€. C. Forward the modified request ๐Ÿš€.
  4. If either step 2 or step 3 fails and the original answer had more realms, pick another Redirect-Realm AVP instance from that answer and repeat steps 2-3 for the realm it names ๐Ÿ˜ญ.

3.2.3. Client Behavior

A client that follows this spec MUST be ready to get either an answer message with a Result-Code AVP set to DIAMETER_REALM_REDIRECT_INDICATION, OR, as a result of proxy action, some other result from a realm that's different from the one it sent the original request to ๐Ÿซ . When it gets DIAMETER_REALM_REDIRECT_INDICATION, the client SHOULD follow the same steps the previous section lays out for a proxy ๐Ÿ’…. The goal is to update its routing table AND get service for the original request ๐Ÿ”ฅ.


3.3. The Redirect-Realm AVP

The Redirect-Realm AVP (620) is of type DiameterIdentity. It specifies a realm where a node that receives a redirect indication containing the result code value DIAMETER_REALM_REDIRECT_INDICATION and the Redirect-Realm AVP SHOULD route the original request ๐Ÿงš.

3.4. DIAMETER_REALM_REDIRECT_INDICATION Protocol Error Code

The DIAMETER_REALM_REDIRECT_INDICATION (3011) Protocol error code means a server figured out that the request, inside an application that supports realm-based redirection, couldn't be handled locally ๐Ÿ™…โ€โ™€๏ธ. The initiator of the request SHOULD send it directly to a peer in a realm that's been named in the response ๐ŸŽฏ. When this code is set, the Redirect-Realm AVP MUST be present ๐Ÿ’œ.


4. Security Considerations โš ๏ธ

The general recommendations in Section 13 of the Diameter base protocol [RFC6733] apply here ๐Ÿ”. The specific security recommendations for the realm-based redirection defined in this document are below ๐Ÿ‘‡.

Realm-based redirection changes the business relationship between organizations ๐Ÿข. Before redirecting a request toward a realm that's different from the initial realm, the client or proxy MUST make sure the authorization checks have been done at each connection along the path toward the realm named in the realm-based redirect indication ๐Ÿšง. Details on setting up the Diameter authorization path are in Section 2.9 of [RFC6733] ๐Ÿ“œ. Section 13 of [RFC6733] gives recommendations on how to authenticate and secure each peer-to-peer connection (using TLS, DTLS, or IPsec) along the way, which allows the necessary hop-by-hop authorization checks ๐Ÿ”’.

Even though the administrative domains are assumed to be secure, a compromised Diameter node acting as a Realm-based Redirect Server could redirect a huge number of Diameter requests toward a victim domain, which would then get flooded with unwanted Diameter requests ๐Ÿ˜ฑ๐Ÿšจ. Secure Diameter peer-to-peer connections and authorization checks are still the discouraged option for this attack, since they'd let a potential victim domain figure out where the attack is coming from ๐Ÿ•ต๏ธโ€โ™€๏ธ. That alone, though, doesn't stop the DoS attack ๐Ÿ’€.

Because realm-based redirection in this document means the Destination-Realm AVP in a client-initiated request can be changed by a Diameter proxy on the path between client and server, any cryptographic algorithm that uses the Destination-Realm AVP as input to the calculation done by the client and server would be broken by this form of redirection ๐Ÿ’”. Application specifications that rely on such cryptographic algorithms SHOULD NOT incorporate this realm-based redirection ๐Ÿ™…โ€โ™€๏ธ.


5. IANA Considerations ๐Ÿ—‚๏ธ

This specification allocates a new AVP code, Redirect-Realm (620), in the "AVP Codes" registry under "Authentication, Authorization, and Accounting (AAA) Parameters" ๐ŸŽ€.

This specification allocates a new Result-Code value, DIAMETER_REALM_REDIRECT_INDICATION (3011), in the "Result-Code AVP Values (code 268) - Protocol Errors" registry under "Authentication, Authorization, and Accounting (AAA) Parameters" โœจ.


6. Acknowledgements ๐Ÿซถ

Glen Zorn, Sebastien Decugis, Wolfgang Steigerwald, Mark Jones, Victor Fajardo, Jouni Korhonen, Avi Lior, and Lionel Morand contributed comments that helped shape this document ๐Ÿ’–. As shepherd, Lionel added a second set of comments that polished the document before it went to the IESG ๐Ÿ’…. Benoit Claise picked up extra points that were quickly resolved with Lionel's help ๐ŸŒธ. During IETF Last Call Review, Enrico Marocco caught some important editorial corrections ๐Ÿ“. Stefan Winter contributed text on using S-NAPTR as an alternative method of realm-based redirection already specified in [RFC6733] ๐Ÿงญ. Derek Atkins did a review on behalf of the Security Directorate ๐Ÿ”. Lionel noted one more correction ๐Ÿ™Œ.

Finally, this document benefited from comments and discussion raised by IESG members Stewart Bryant, Stephen Farrell, Barry Leiba, Pete Resnick, Jari Arkko, and Sean Turner during IESG review ๐Ÿ‘‘.

The authors are so grateful to Lionel Morand for his active role as document shepherd. At each stage he worked to summarize and resolve comments, which made the editor's role easy. Thank you, Lionel ๐Ÿฅน๐Ÿซถ.


7. References ๐Ÿ“š

7.1. Normative References

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

[RFC6733] Fajardo, V., Arkko, J., Loughney, J., and G. Zorn, "Diameter Base Protocol", RFC 6733, October 2012.

7.2. Informative References

[RFC3958] Daigle, L. and A. Newton, "Domain-Based Application Service Location Using SRV RRs and the Dynamic Delegation Discovery Service (DDDS)", RFC 3958, January 2005.


Authors' Addresses ๐Ÿ“ฎ

Tina Tsou Huawei Technologies (USA) 2330 Central Expressway Santa Clara, CA 95050 USA

Phone: +1 408 330 4424 EMail: Tina.Tsou.Zouting@huawei.com URI: http://tinatsou.weebly.com/contact.html

Ruibing Hao Comcast Cable One Comcast Center Philadelphia, PA 19103 USA

Phone: +1 215 286 3991(O) EMail: Ruibing_Hao@cable.comcast.com

Tom Taylor (editor) Huawei Technologies Ottawa Canada

EMail: tom.taylor.stds@gmail.com

๐Ÿ“ฆ where this page comes from