| TOC |
|
This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work in progress.”
The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html.
This Internet-Draft will expire on August 30, 2009.
Copyright (c) 2009 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 in effect on the date of publication of this document (http://trustee.ietf.org/license-info). Please review these documents carefully, as they describe your rights and restrictions with respect to this document.
This document defines a shorthand notation for device capabilities data that is advertised using the format specified in RFC 3840. The approach taken here is to define (1) a method for transforming any existing SIP capability into a Uniform Resource Name (URN) located in a new branch of the IETF URN tree, (2) an algorithm for canonical ordering, concatenation, and hashing of the URN-transformed capabilities, and (3) a header field for communicating the resulting hash.
1.
Introduction
2.
URN Transformation
3.
Generation Algorithm
4.
Definition of the Caps Header Field
5.
Processing
6.
Example
7.
IANA Considerations
7.1.
Caps Header Field
7.2.
URN Namespace Name for SIP Capabilities
8.
Security Considerations
9.
References
9.1.
Normative References
9.2.
Informative References
§
Authors' Addresses
| TOC |
Entities that implement the Session Initiation Protocol [SIP] (Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, “SIP: Session Initiation Protocol,” June 2002.) can provide information about their capabilities using the SIP OPTIONS method as well as the format defined in [RFC3840] (Rosenberg, J., Schulzrinne, H., and P. Kyzivat, “Indicating User Agent Capabilities in the Session Initiation Protocol (SIP),” August 2004.). Because full capabilities information can become verbose and is frequently duplicated across entities (e.g., user agents that deploy identical software versions), there is value in defining a "shorthand" notation for capabilities data. This document defines such a shorthand notation. The approach taken here is to define the following:
To help ensure interoperability, this shorthand notation is compatible with the shorthand notation currently used by Extensible Messaging and Presence Protocol [XMPP] (Saint-Andre, P., Ed., “Extensible Messaging and Presence Protocol (XMPP): Core,” October 2004.) technologies and defined in [XEP‑0115] (Hildebrand, J., Saint-Andre, P., Tronçon, R., and J. Konieczny, “Entity Capabilities,” February 2008.).
Note: The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 (Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” March 1997.) [TERMS].
| TOC |
The caps-generation algorithm requires consistent input formats, preferably Uniform Resource Names (URNs) or Uniform Resource Identifiers (URIs). We propose a new branch of the IETF URN tree for input to the caps-generation algorithm, where each SIP feature shall be of the following form:
urn:ietf:params:xml:ns:sip-feature:[tag]:[value]
Each feature tag shall be constructed according to the rules in [RFC3840] (Rosenberg, J., Schulzrinne, H., and P. Kyzivat, “Indicating User Agent Capabilities in the Session Initiation Protocol (SIP),” August 2004.).
Each feature value shall be constructed according to the rules in [RFC3840] (Rosenberg, J., Schulzrinne, H., and P. Kyzivat, “Indicating User Agent Capabilities in the Session Initiation Protocol (SIP),” August 2004.), with the following exceptions:
As an example, consider the feature predicate shown in [RFC3840] (Rosenberg, J., Schulzrinne, H., and P. Kyzivat, “Indicating User Agent Capabilities in the Session Initiation Protocol (SIP),” August 2004.):
(& (sip.mobility=fixed) (| (! (sip.events=presence)) (sip.events=message-summary)) (| (language=en) (language=de)) (sip.description="PC") (sip.newparam=TRUE) (rangeparam=-4..5125/1000))
That feature predicate would be converted to the following URNs:
urn:ietf:params:xml:ns:sip-feature:mobility:fixed urn:ietf:params:xml:ns:sip-feature:events:presence urn:ietf:params:xml:ns:sip-feature:events:message-summary urn:ietf:params:xml:ns:sip-feature:language:en urn:ietf:params:xml:ns:sip-feature:language:de urn:ietf:params:xml:ns:sip-feature:description:PC urn:ietf:params:xml:ns:sip-feature:+sip.newparam urn:ietf:params:xml:ns:sip-feature:+rangeparam:-4:+5.125
| TOC |
The value of the caps hash MUST be generated according to the following method.
Note: All sorting operations MUST be performed using "i;octet" collation as specified in Section 9.3 of [RFC4790] (Newman, C., Duerst, M., and A. Gulbrandsen, “Internet Application Protocol Collation Registry,” March 2007.).
| TOC |
The following is the augmented Backus-Naur Form (BNF) [RFC5234] (Crocker, D. and P. Overell, “Augmented BNF for Syntax Specifications: ABNF,” January 2008.) syntax of the Caps header field. The hash-func element is defined in [RFC4572] (Lennox, J., “Connection-Oriented Media Transport over the Transport Layer Security (TLS) Protocol in the Session Description Protocol (SDP),” July 2006.).
caps = hash-func " " ver ver = 1*(hash-out) hash-out = ALPHA / DIGIT / "/" / "+" / "="
| TOC |
When an entity receives a Caps header, it SHOULD proceed as follows.
| TOC |
Consider a user agent that advertises an Accept-Language header value of "en", a User-Agent header value of "SIP Communicator 1.0", and capabilities of sip.mobility=fixed, sip.events=presence, sip.events=message-summary, language=en, sip.description="PC", sip.newparam=TRUE, and rangeparam=-4..5125/1000.
The output string "S" would be as follows (line breaks are not significant):
client/sip/en/SIP Communicator 1.0< urn:ietf:params:xml:ns:sip-feature:mobility:fixed< urn:ietf:params:xml:ns:sip-feature:events:presence< urn:ietf:params:xml:ns:sip-feature:events:message-summary< urn:ietf:params:xml:ns:sip-feature:language:en< urn:ietf:params:xml:ns:sip-feature:description:PC< urn:ietf:params:xml:ns:sip-feature:+sip.newparam< urn:ietf:params:xml:ns:sip-feature:+rangeparam:-4:+5.125<
When hashed in accordance with SHA-1, the output string would then result in the following verification string.
x6Ra/0PZmzlFToQ7z6rPBTJ1QRA=
The resulting Caps header value would then be as follows.
Caps: sha-1 x6Ra/0PZmzlFToQ7z6rPBTJ1QRA=
This Caps header could be included in any outbound SIP response or notification that an entity generates, such as a SIP 200 OK or (as shown in the following example) a presence notification.
NOTIFY sip:192.0.2.2 SIP/2.0
Via: SIP/2.0/TCP x2s.example.com;branch=z9hG4bKna998sk
From: <sip:juliet@example.com>;tag=gh19
To: <sip:romeo@example.net>;tag=yt66
Call-ID: j4s0h4vny@example.com
Event: presence
Subscription-State: active;expires=599
Max-Forwards: 70
CSeq: 157 NOTIFY
Contact: <sip:sipgate.example.com;transport=tcp>
User-Agent: SIP Communicator 1.0
Caps: sha-1 x6Ra/0PZmzlFToQ7z6rPBTJ1QRA=
Content-Type: application/pidf+xml
Content-Length: 192
<?xml version='1.0' encoding='UTF-8'?>
<presence xmlns='urn:ietf:params:xml:ns:pidf'
entity='pres:juliet@example.com'>
<tuple id='balcony'>
<status>
<basic>open</basic>
</status>
</tuple>
</presence>
As described, an entity that receives a SIP message with a Caps header can then send an OPTIONS request to the generating entity.
OPTIONS sip:juliet@example.com SIP/2.0 Via: SIP/2.0/TCP x2s.example.net;branch=z9hG4bKna998sk From: <sip:romeo@example.net>;tag=ffd2 To: <sip:juliet@example.com> Call-ID: l04th3s1p@example.net Max-Forwards: 70 CSeq: 63104 OPTIONS Contact: <sip:sip.example.net;transport=tcp> Accept: application/sdp Content-Length: 0
The generating entity would then reply.
SIP/2.0 200 OK
Via: SIP/2.0/TCP foo.example.com;branch=z9hG4bKna998sk
;received=192.0.2.4
From: <sip:juliet@example.com>;tag=gh19
To: <sip:romeo@example.net>;tag=ffd2
Call-ID: l04th3s1p@example.net
CSeq: 63104 OPTIONS
Contact: <sip:juliet@example.com>
;mobility="fixed";events="!presence,message-summary"
;language="en";description="<PC>";+sip.newparam
;+rangeparam="#-4:+5.125"
User-Agent: SIP Communicator 1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
Accept: application/sdp
Accept-Encoding: gzip
Accept-Language: en
Caps: sha-1 x6Ra/0PZmzlFToQ7z6rPBTJ1QRA=
The processing entity would then construct a capabilities hash from the capabilities communicated by the generating entity and check that the hashes match.
| TOC |
| TOC |
IANA shall add the following new SIP header field to the Header Fields subregistry under the SIP Parameters registry.
- Header Name:
- Caps
- Compact Form:
- (none)
- Reference:
- <THIS DOCUMENT>
| TOC |
A URN sub-namespace for transformed capabitlies is defined as follows. (This namespace name adheres to the format defined in [XML‑REG] (Mealling, M., “The IETF XML Registry,” January 2004.).)
- URI:
- urn:ietf:params:xml:ns:sip-feature
- Specification:
- <THIS DOCUMENT>
- Description:
- This is the XML namespace name for transformations of SIP capabilities, where the tag name and value for each capability is of the form "urn:ietf:params:xml:ns:sip-feature:[tag]:[value]".
- Registrant Contact:
- IETF, SIP Working Group, <sip@ietf.org>
| TOC |
Absent signing of the full SIP message (including headers), both the Caps header and the OPTIONS reply could be modified in transit.
| TOC |
| TOC |
| TOC |
| [XEP-0115] | Hildebrand, J., Saint-Andre, P., Tronçon, R., and J. Konieczny, “Entity Capabilities,” XSF XEP 0115, February 2008. |
| [XML-REG] | Mealling, M., “The IETF XML Registry,” BCP 81, RFC 3688, January 2004 (TXT). |
| [XMPP] | Saint-Andre, P., Ed., “Extensible Messaging and Presence Protocol (XMPP): Core,” RFC 3920, October 2004 (TXT, HTML, XML). |
| TOC |
| Joe Hildebrand | |
| Cisco | |
| Email: | jhildebr@cisco.com |
| Peter Saint-Andre | |
| Cisco | |
| Email: | psaintan@cisco.com |