RFC 5361
A Document Format for Requesting Consent
RFC 5361: A Document Format for Requesting Consent π
Network Working Group πΈ Request for Comments: 5361 β¨ Category: Standards Track π Date: October 2008 π Author: G. Camarillo (Ericsson) π¦
The title block doesn't list any RFC that this one obsoletes or updates, so this is a brand new spec with no history to untangle. Main character energy π
Status of This Memo
Okay so this is an Internet standards track protocol for the Internet community π It's open for discussion and suggestions for improvements, bestie π«Ά If you want the official standardization state and status, check the current edition of "Internet Official Protocol Standards" (STD 1) π And yes, distribution of this memo is unlimited π
Abstract
So this doc defines an Extensible Markup Language (XML) format for a permission document used to request consent π A relay uses a permission document written in this format to ask a specific recipient for permission to perform a particular routing translation π¦ It's giving "may I, pretty please" energy π₯Ί
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Definitions and Terminology . . . . . . . . . . . . . . . . . 2
3. Permission Document Structure . . . . . . . . . . . . . . . . 3
3.1. Conditions . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1.1. Recipient Condition . . . . . . . . . . . . . . . . . 3
3.1.2. Identity Condition . . . . . . . . . . . . . . . . . . 4
3.1.3. Target Condition . . . . . . . . . . . . . . . . . . . 6
3.1.4. Validity Condition . . . . . . . . . . . . . . . . . . 7
3.1.5. Sphere Condition . . . . . . . . . . . . . . . . . . . 7
3.2. Actions . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2.1. Translation Handling . . . . . . . . . . . . . . . . . 7
4. Example Document . . . . . . . . . . . . . . . . . . . . . . . 7
5. XML Schema . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6. Extensibility . . . . . . . . . . . . . . . . . . . . . . . . 10
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
7.1. XML Namespace Registration . . . . . . . . . . . . . . . . 11
7.2. XML Schema Registration . . . . . . . . . . . . . . . . . 11
8. Security Considerations . . . . . . . . . . . . . . . . . . . 12
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12
10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12
10.1. Normative References . . . . . . . . . . . . . . . . . . . 12
10.2. Informative References . . . . . . . . . . . . . . . . . . 13
1. Introduction π·
Here's the tea β The consent-based communications framework for the Session Initiation Protocol (SIP) [RFC5360] realizes it needs a format for creating permission documents π SIP [RFC3261] relays are the ones who use these docs to ask for permission to do translations π A relay is any SIP server, whether it's a proxy, a B2BUA (Back-to-Back User Agent), or some hybrid of those. It takes in a request, translates the Request-URI into one or more next-hop URIs, and then sends the request along to them π
The format for permission documents in this spec is based on Common Policy [RFC4745], which is an XML document format for expressing privacy preferences π It's giving "I built on what already works" π
2. Definitions and 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]. π§
This doc uses the terms already defined in [RFC5360], and they're repeated here so you don't have to flip back and forth π¦ Figure 1 of [RFC5360] shows how target and recipient URIs relate in a translation operation, so go peek at it if you want the full picture πΌοΈ
Recipient URI: π This is the Request-URI of an outgoing request sent by an entity (like a user agent or a proxy). Sending that request might have been the result of a translation operation π
Relay: π This is any SIP server (a proxy, a B2BUA, or some hybrid) that gets a request, translates its Request-URI into one or more next-hop URIs (aka recipient URIs), and delivers the request to those URIs β¨
Target URI: π― This is the Request-URI of an incoming request that shows up at a relay which is about to perform a translation operation π«Ά
Translation logic: π§© The logic that defines a translation operation at a relay. It includes the translation's target and recipient URIs π
Translation operation: π This is when a relay takes the Request-URI of an incoming request (the target URI) and turns it into one or more URIs (the recipient URIs) that become the Request-URIs of one or more outgoing requests π
3. Permission Document Structure π
A permission document is an XML document that follows the schema defined in [RFC4745] πͺ These docs inherit the MIME type of common policy documents, which is application/auth-policy+xml π As [RFC4745] explains, this type of document has three parts: conditions, actions, and transformations π§
This section defines the new conditions and actions that this spec brings in. It doesn't define any new transformation, so no new glam there π
3.1. Conditions π§
The conditions in a permission document are a set of expressions, and each one evaluates to either TRUE or FALSE π As [RFC4745] discusses, a permission document applies to a translation only if all the expressions in its conditions part evaluate to TRUE π
3.1.1. Recipient Condition π¬
The recipient condition gets matched against the recipient URI of a translation π Recipient conditions can use the same elements and attributes as identity conditions π
When a relay does a translation, it matches the recipient condition of the permission document that was used to request permission for that translation against the destination URI of the outgoing request π When a relay receives a request that grants or denies permissions (for example, a SIP PUBLISH request as described in [RFC5360]), it matches the recipient condition of the permission document used to request permission against the identity of the entity granting or denying permissions, which is the sender of the PUBLISH request π If there's a match, the recipient condition evaluates to TRUE. If not, it evaluates to FALSE π«
Only authenticated identities can be matched, so this section lays out the acceptable means of authentication π These are in line with the ones described in Section 5.6.1 of [RFC5360] π«Ά
The id attribute in the <one> and <except> elements MUST contain a scheme when these elements appear in a permission document. π¨ This one's a must, no cap π
When used with SIP, a recipient granting or denying a relay permissions is considered authenticated if one of the following techniques is used π§Ύ
- SIP Identity [RFC4474], as described in Section 5.6.1.1 of [RFC5360]. For PUBLISH requests authenticated with the SIP Identity mechanism, the identity of the sender of the PUBLISH request is equal to the SIP URI in the From header field of the request, assuming the signature in the Identity header field has been validated β¨
- P-Asserted-Identity [RFC3325] (which can only be used in closed network environments), as described in Section 5.6.1.2 of [RFC5360]. For PUBLISH requests authenticated with the P-Asserted-Identity mechanism, the identity of the sender of the PUBLISH request is equal to the
P-Asserted-Identityheader field of the request πͺͺ - Return Routability Test, as described in Section 5.6.1.3 of [RFC5360]. It can be used for SIP PUBLISH and HTTP GET requests. No authentication is expected to be used with return routability tests, so no identity matching procedures are defined for them π
- SIP digest, as described in Section 5.6.1.4 of [RFC5360]. The identity of the sender is set equal to the SIP Address of Record (AOR) for the user who authenticated themselves ποΈ
3.1.2. Identity Condition πͺ
The identity condition, which is defined in [RFC4745], gets matched against the URI of the sender of the request that's used as input for a translation π
When a relay performs a translation, it matches the identity condition against the identity of the sender of the incoming request. If they match, the identity condition evaluates to TRUE. Otherwise, it evaluates to FALSE π«§
Only authenticated identities can be matched, so the following subsections cover acceptable means of authentication, the procedure for representing the sender's identity as a URI, and the procedure for converting an identifier of the form user@domain (found in the id attribute of the <one> and <except> elements) into a URI π§ββοΈ
3.1.2.1. Acceptable Means of Authentication π‘οΈ
When used with SIP, a request sent by a sender counts as authenticated if one of the following techniques is used π
- SIP Digest: The relay authenticates the sender using SIP digest authentication [RFC2617]. However, if the anonymous authentication described on page 194 of [RFC3261] is used, the sender is not considered authenticated π ββοΈ
- Asserted Identity: If a request contains a
P-Asserted-IDheader field [RFC3325] and the request is coming from a trusted element, the sender is considered authenticated π₯° - Cryptographically Verified Identity: If a request contains an Identity header field as defined in [RFC4474], and it validates the From header field of the request, the request is considered to be authenticated. Note that this is true even if the request contained a From header field of the form
sip:anonymous@example.com. As long as the signature verifies that the request legitimately came from this identity, it counts as authenticated ππ«Ά
3.1.2.2. Computing a URI for the Sender β¨
okay so this is where we figure out who is actually sending the request π For requests authenticated with SIP Digest, the sender's identity is set equal to the SIP Address of Record (AOR) of the user who authenticated. Picture this "user record" in a database π
SIP AOR: sip:alice@example.com
digest username: ali
digest password: f779ajvvh8a6s6
digest realm: example.com
If the relay gets a request and challenges it with the realm set to "example.com", and the next request has an Authorization header field with a username of "ali" and a digest response generated with the password "f779ajvvh8a6s6", the identity used in matching operations is "sip:alice@example.com" π¦
For requests authenticated using [RFC3325], the sender's identity is the SIP URI in the P-Asserted-ID header field. If there are multiple P-Asserted-ID values (there can be one sip URI and one tel URI [RFC3966]), then each one gets used for the comparisons outlined in [RFC4745]. If any of them match a <one> or <except> element, that counts as a match πΈ
For requests authenticated using the SIP Identity mechanism [RFC4474], the sender's identity is the SIP URI in the From header field of the request, as long as the signature in the Identity header field has been validated π₯
SIP also allows anonymous requests, and these get a little messy, ngl π If a request is anonymous because the digest challenge/response used the "anonymous" username, it's considered unauthenticated and will NOT match the <identity> condition. If a request is anonymous because it has a Privacy header field [RFC3323] but still has a P-Asserted-ID header field, the identity in P-Asserted-ID is still used in the authorization computations. The anonymity has no impact on identity processing, periodt π
However, if the request traversed a trust boundary and both the P-Asserted-ID header field and the Privacy header field were removed, the request is considered unauthenticated when it arrives at the relay, so it does not match the <sender> condition.
And finally, if a request had a validated Identity header field and the From header field contained a URI of the form sip:anonymous@example.com, then the sender is considered authenticated with an identity of sip:anonymous@example.com. If that identity was placed into a <one> or <except> element, there will be a match π
3.1.2.3. Computing a SIP URI from the id Attribute π¦
If the <one> or <except> condition does not contain a scheme, converting the value of the 'id' attribute to a SIP URI is done trivially. If the characters in the 'id' attribute are valid for the user and hostpart components of a SIP URI, then 'sip:' gets appended to the contents of the 'id' attribute, and the result is the SIP URI β¨
If the characters are NOT valid for those components, conversion isn't possible, so the identity condition evaluates to FALSE. This happens, for example, when the user portion of the 'id' attribute contains UTF-8 characters π
3.1.3. Target Condition π§
The target condition is matched against the target URI of a translation. It can contain the same elements and attributes as identity conditions π
When performing a translation, the relay matches the target condition against the destination of the incoming request, which is typically contained in the Request-URI. If they match, the target condition evaluates to TRUE. Otherwise it evaluates to FALSE π
3.1.4. Validity Condition β
The <validity> element is not applicable to this document. Each <permission> element has an infinite lifetime and can be revoked using an independent mechanism, as described in Section 5.8 of [RFC5360]. In any case, as discussed in Section 4.1 of [RFC5360], permissions are only valid as long as the context where they were granted is valid π«Ά
If present, <validity> elements MUST be ignored. Bestie, do not let these sneak through π₯
3.1.5. Sphere Condition πΈ
The <sphere> element is not applicable to this document and therefore is not used. If present, <sphere> elements MUST be ignored π
3.2. Actions π
The actions in a permission document give URIs to grant or deny permission to perform the translation described in the document π¦
Note that the <trans-handling> element is not an action, as defined in Common Policy [RFC4745], but rather an informational element. Therefore, the conflict resolution mechanism does not apply to it.
Each policy rule contains at least two <trans-handling> elements: one element with a URI to grant and another with a URI to deny permission π
3.2.1. Translation Handling π
The <trans-handling> element provides URIs for a recipient to grant or deny the relay permission to perform a translation. The defined values are:
- deny: this action tells the relay not to perform the translation.
- grant: this action tells the server to perform the translation.
The 'perm-uri' attribute in the <trans-handling> element provides a URI to grant or deny permission to perform a translation β¨
4. Example Document π§
In this example, a client adds 'sip:bob@example.org' to the translation whose target URI is 'sip:alices-friends@example.com' π The relay handling the translation generates the following permission document to ask for permission to relay requests sent to 'sip:alices-friends@example.com' to 'sip:bob@example.org'. The target URI is 'sip:alices-friends@example.com', and the recipient URI is 'sip:bob@example.org'. The sender's identity does not play a role here, so the permission document does not put any restriction on potential senders π
+--------+ +--------------------------------+ Permission
| | | | Request
| Client | | Relay | with
| | | sip:alices-friends@example.com | Permission
+--------+ | | Document
| |+-------+ |-------------+
| ||Transl.| | |
|Manipulation ||Logic | | |
+------------>|+-------+ | |
Add +--------------------------------+ |
sip:bob@example.org V
+---------------------+
| |
| Recipient |
| sip:bob@example.org |
| |
+---------------------+
<?xml version="1.0" encoding="UTF-8"?>
<cp:ruleset
xmlns="urn:ietf:params:xml:ns:consent-rules"
xmlns:cp="urn:ietf:params:xml:ns:common-policy">
<cp:rule id="f1">
<cp:conditions>
<cp:identity>
<cp:many/>
</cp:identity>
<recipient>
<cp:one id="sip:bob@example.org"/>
</recipient>
<target>
<cp:one id="sip:alices-friends@example.com"/>
</target>
</cp:conditions>
<cp:actions>
<trans-handling
perm-uri="sips:grant-1awdch5Fasddfce34@example.com"
>grant</trans-handling>
<trans-handling
perm-uri="https://example.com/grant-1awdch5Fasddfce34"
>grant</trans-handling>
<trans-handling
perm-uri="sips:deny-23rCsdfgvdT5sdfgye@example.com"
>deny</trans-handling>
<trans-handling
perm-uri="https://example.com/deny-23rCsdfgvdT5sdfgye"
>deny</trans-handling>
</cp:actions>
<cp:transformations/>
</cp:rule>
</cp:ruleset>
5. XML Schema π
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
targetNamespace="urn:ietf:params:xml:ns:consent-rules"
xmlns:cr="urn:ietf:params:xml:ns:consent-rules"
xmlns:cp="urn:ietf:params:xml:ns:common-policy"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<!-- Conditions -->
<xs:element name="recipient" type="cp:identityType"/>
<xs:element name="target" type="cp:identityType"/>
<!-- Actions -->
<xs:simpleType name="trans-values">
<xs:restriction base="xs:string">
<xs:enumeration value="deny"/>
<xs:enumeration value="grant"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="trans-handling">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="trans-values">
<xs:attribute name="perm-uri" type="xs:anyURI"
use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>
6. Extensibility πΈ
This specification defines elements that do not have extension points in the "urn:ietf:params:xml:ns:consent-rules" namespace. Instance documents that use these element definitions SHOULD be schema valid π«Ά Applications processing instance documents with content they don't understand MUST ignore that content. IETF extension documents of this specification MAY reuse the "urn:ietf:params:xml:ns:consent-rules" namespace to define new elements π§
7. IANA Considerations π
This section registers a new XML namespace and a new XML schema per the procedures in [RFC3688] β¨
7.1. XML Namespace Registration π
URI: urn:ietf:params:xml:ns:consent-rules
Registrant Contact: IETF SIPPING working group <sipping@ietf.org>, Gonzalo Camarillo <Gonzalo.Camarillo@ericsson.com>
XML:
BEGIN
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type"
content="text/html;charset=iso-8859-1"/>
<title>Consent Rules Namespace</title>
</head>
<body>
<h1>Namespace for Permission Documents</h1>
<h2>urn:ietf:params:xml:ns:consent-rules</h2>
<p>See <a href="http://www.rfc-editor.org/rfc/rfc5361.txt">RFC 5361
</a>.</p>
</body>
</html>
END
7.2. XML Schema Registration π
URI: urn:ietf:params:xml:schema:consent-rules
Registrant Contact: IETF SIPPING working group <sipping@ietf.org>, Gonzalo Camarillo <Gonzalo.Camarillo@ericsson.com>
XML: The XML schema to be registered is contained in Section 5 π
8. Security Considerations π₯
RFC 5360 [RFC5360] discusses security-related issues, such as how to authenticate SIP and HTTP requests granting permissions and how to transport permission documents between relays and recipients, that are directly related to this specification. Bestie, this is the stuff that keeps the whole thing safe, so go read it π«Ά
9. Acknowledgements π
Okay bestie, huge shoutout to the people who helped make this doc happen π«Ά Jonathan Rosenberg dropped useful ideas on this document π‘. Hannes Tschofenig helped line it up with common policy π. Ben Campbell and Mary Barnes did a thorough review of the whole thing π, and Lakshminath Dondeti left useful comments too π .
10. References π
10.1. Normative References
These are the references this spec leans on hardest, so bookmark them π
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,
Leach, P., Luotonen, A., and L. Stewart, "HTTP
Authentication: Basic and Digest Access Authentication",
RFC 2617, June 1999.
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
A., Peterson, J., Sparks, R., Handley, M., and E.
Schooler, "SIP: Session Initiation Protocol", RFC 3261,
June 2002.
[RFC3323] Peterson, J., "A Privacy Mechanism for the Session
Initiation Protocol (SIP)", RFC 3323, November 2002.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
January 2004.
[RFC4474] Peterson, J. and C. Jennings, "Enhancements for
Authenticated Identity Management in the Session
Initiation Protocol (SIP)", RFC 4474, August 2006.
[RFC4745] Schulzrinne, H., Tschofenig, H., Morris, J., Cuellar, J.,
Polk, J., and J. Rosenberg, "Common Policy: A Document
Format for Expressing Privacy Preferences", RFC 4745,
February 2007.
[RFC5360] Rosenberg, J., Camarillo, G., and D. Willis, "A Framework
for Consent-Based Communications in the Session Initiation
Protocol (SIP)", RFC 5360, October 2008.
10.2. Informative References
These ones are just helpful background reading πΈ
[RFC3966] Schulzrinne, H., "The tel URI for Telephone Numbers",
RFC 3966, December 2004.
[RFC3325] Jennings, C., Peterson, J., and M. Watson, "Private
Extensions to the Session Initiation Protocol (SIP) for
Asserted Identity within Trusted Networks", RFC 3325,
November 2002.
Author's Address π§
Gonzalo Camarillo is the author, and here's where to find him π¬
Gonzalo Camarillo
Ericsson
Hirsalantie 11
Jorvas 02420
Finland
EMail: Gonzalo.Camarillo@ericsson.com
Full Copyright Statement βοΈ
Copyright (C) The IETF Trust (2008). That's the legal bit, so here it is in full, no cutting corners π
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property π¦
The IETF doesn't take a side on whether any Intellectual Property Rights or other rights that someone might claim over the tech in this document are valid or how far they reach π€·ββοΈ. It also doesn't say whether any license under those rights is available, and it hasn't done any independent digging to find such rights. If you want the procedures for rights in RFC documents, check out BCP 78 and BCP 79 π.
Copies of IPR disclosures made to the IETF Secretariat, plus any assurances of licenses to be made available, or the results of an attempt to get a general license or permission for implementers or users to use these proprietary rights, can be found through the IETF online IPR repository at http://www.ietf.org/ipr π.
The IETF also invites anyone interested to flag any copyrights, patents, patent applications, or other proprietary rights that might cover technology needed to implement this standard. Send that info to the IETF at ietf-ipr@ietf.org π¨ thank you for being a responsible bestie! π
π¦ where this page comes from
- ietf: rfc5361 2008-10
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms