Internet Engineering Task Force P. Dawes Internet-Draft Vodafone Group Intended status: Standards Track October 18, 2013 Expires: April 21, 2014 Requirements for Marking SIP Messages to be Logged draft-dawes-dispatch-logme-reqs-03 Abstract SIP networks use signalling monitoring tools to diagnose user reported problem and for regression testing if network or client software is upgraded. As networks grow and become interconnected, including connection via transit networks, it becomes impractical to predict the path that SIP signalling will take between clients, and therefore impractical to monitor SIP signalling end-to-end. This draft describes requirements for adding an indicator to the SIP protocol which can be used to mark signalling as of interest to logging. Such marking will typically be applied as part of network testing controlled by the network operator and not used in regular client signalling. However, such marking can be carried end-to-end including the SIP terminals, even if a session originates and terminates in different networks. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. 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." This Internet-Draft will expire on April 21, 2014. Dawes Expires April 21, 2014 [Page 1] Internet-Draft log me marker October 2013 Copyright Notice 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) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 3 3. Motivating Scenario . . . . . . . . . . . . . . . . . . . . . 3 4. Skeleton Diagnostic Procedure . . . . . . . . . . . . . . . . 4 5. Requirements for a Log Me Marker . . . . . . . . . . . . . . 5 6. Security Considerations . . . . . . . . . . . . . . . . . . . 6 6.1. Trust Domain . . . . . . . . . . . . . . . . . . . . . . 6 6.2. Security Threats . . . . . . . . . . . . . . . . . . . . 6 6.2.1. Log-me marking . . . . . . . . . . . . . . . . . . . 6 6.2.2. Debug server address . . . . . . . . . . . . . . . . 7 6.2.3. Sending logged information . . . . . . . . . . . . . 7 7. Potential Solutions . . . . . . . . . . . . . . . . . . . . . 7 7.1. Functionality Common to all Solutions . . . . . . . . . . 7 7.1.1. Starting and Stopping log-me marking . . . . . . . . 7 7.1.1.1. General . . . . . . . . . . . . . . . . . . . . . 7 7.1.1.2. Configuration for log-me marking . . . . . . . . 7 7.1.1.3. Maintaining State . . . . . . . . . . . . . . . . 8 7.1.2. Sending logs to a debug server . . . . . . . . . . . 10 7.1.2.1. Server address . . . . . . . . . . . . . . . . . 10 7.1.2.2. Protecting logs . . . . . . . . . . . . . . . . . 10 7.2. Solution A: LogMe header field . . . . . . . . . . . . . 10 7.2.1. Introduction . . . . . . . . . . . . . . . . . . . . 10 7.2.2. Server Procedures . . . . . . . . . . . . . . . . . . 10 7.2.2.1. General . . . . . . . . . . . . . . . . . . . . . 10 7.2.2.2. Sending logged information to a debug server . . 10 7.2.3. Client Procedures . . . . . . . . . . . . . . . . . . 10 7.2.3.1. General . . . . . . . . . . . . . . . . . . . . . 11 7.2.4. Identifying test cases . . . . . . . . . . . . . . . 11 7.2.5. Collecting logged information at a debug server . . . 11 7.2.6. Examples . . . . . . . . . . . . . . . . . . . . . . 11 7.3. Solution B: New Value for purpose header field parameter Dawes Expires April 21, 2014 [Page 2] Internet-Draft log me marker October 2013 in Call-Info: . . . . . . . . . . . . . . . . . . . . . . 12 7.4. Solution C: New 'debug' header field parameter to be used in Session-ID header field . . . . . . . . . . . . . . . 13 7.5. Comparison of Potential Solutions . . . . . . . . . . . . 13 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 8.1. Normative References . . . . . . . . . . . . . . . . . . 14 8.2. Informative References . . . . . . . . . . . . . . . . . 14 Appendix A. Additional Stuff . . . . . . . . . . . . . . . . . . 15 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 15 1. Introduction If users experience problems with setting up sessions using SIP, their service provider needs to find out why by examining the SIP signalling. Also, if network or client software or hardware is upgraded regression testing is needed. Such diagnostics apply to a small proportion of network traffic and can apply end-to-end, even if signalling crosses several networks possibly belonging to several different network operators. It may not be possible to predict the path through those networks in advance, therefore a mechanism is needed to mark a session as being of interest to enable SIP entities along the signalling path to provide diagnostic logging. This draft describes the requirements for such a 'log me' marker for SIP signalling. 2. Requirements Language 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 RFC 2119 [RFC2119]. 3. Motivating Scenario Signalling for SIP session setup can cross several networks, and these networks may not have common ownership and also may be in differrent countries. If a single operator wishes to perform regression testing or fault diagnosis end-to-end, the separate ownership of networks that carry the signalling and the explosion in the number of possible signalling paths through SIP entities from the originating to the terminating user make it impractical to pre- configure logging of an end-to-end SIP signalling of a session of interest. The figure below shows an example of a signalling path through multiple networks. +------------------+ +------------------+ Dawes Expires April 21, 2014 [Page 3] Internet-Draft log me marker October 2013 | COUNTRY A | | COUNTRY B | | Operator A | | Operator A | | | | | | SIP Phones | | SIP Phones | | | //| | +------------------+ // +------------------+ | // | // ,'```', // +------------------+ .`',.' `..'``',<==// | COUNTRY B | ,' Operator A `', | Operator A | ; Backbone Network ..'-------| | ', ,., .'` | PSTN phones | '.,.`'.,,,.` `''` | | || +------------------+ || \/ +------------------+ | | | Transit Network | | | | |\\ +------------------+ \\ | \\ | \\ +------------------+ \\ +------------------+ | COUNTRY D | \\ | COUNTRY C | | Operator C | \\=>| Operator B | | | | | | SIP Phones | | SIP Phones | | | | | +------------------+ +------------------+ Figure 1: Example signalling path through multiple networks 4. Skeleton Diagnostic Procedure The skeleton diagnostic procedure is as follows: o The user's terminal is placed in debug mode. The terminal logs its own signalling and inserts a log me marker into SIP requests for session setup Dawes Expires April 21, 2014 [Page 4] Internet-Draft log me marker October 2013 o All SIP entities that the signalling traverses, from the first proxy the terminal connects to at the edge of the network to the destination client terminal, can detect that the log me marker is present and can log SIP requests and responses that contain the marker if configured to do so. o Subsequent responses and requests in the same dialog are logged. o Logging stops, either because the dialog has ended or because a 'stop event', typically expiry of a certain amount of time, occurred o The user's terminal and any other SIP entity that has logged signalling sends logs to a server that is co-ordinating diagnostics. 5. Requirements for a Log Me Marker o REQ1: It shall be possible to mark a SIP request or response as of interest for logging by inserting a log me marker. This is known as log-me marking. o REQ2: It shall be possible for a log-me marker to cross network boundaries. o REQ3: A log-me marker is most effective if it passes end-to-end. However, source networks should behave responsibly and not leave it to a downstream network to detect and remove a marker that it will not use. A log-me marker should be removed at trust domain boundaries. o REQ4: SIP entities should log SIP requests or responses with a log-me marker. o REQ5: If a UA receives a request with a log-me marker, it shall echo that log-me marker in responses to that request. o REQ6: A SIP proxy may perform log-me marking of requests and responses. Typical cases where a proxy needs to perform log-me marking are when a UA has not marked a request and when responses received on a dialog of interest for logging do not contain a log- me marker. In these cases, the entity that performs log-me marking is stateful inasmuch as it must remember when a dialog is of interest for logging. o REQ7: For SIP proxies, logging of SIP requests that contain a log- me marker may be stateless. For example, it is not required for a SIP entity to maintain state of which SIP requests contained a Dawes Expires April 21, 2014 [Page 5] Internet-Draft log me marker October 2013 log-me marker in order to log responses to those requests. Echoing a log-me marker in responses is the responsibility of the UA that receives a request. o REQ8: A log-me marker may include an identifier that indicates the test case that caused it to be inserted, known as a test case identifier. The test case identifier does not have any impact on session setup, it is used by the diagnostic server to collate all logged SIP requests and responses to the initial SIP request in a dialog or standalone transaction. The Session-ID described in I-D .ietf-insipid-session-id-reqts [I-D.ietf-insipid-session-id-reqts] could be used as the test case identifier but it would be useful for the UA to log a human readable name together with this Session-ID when it performs log me marking of an initial SIP request. o REQ9: A log-me marker may include a locator of the server that collects logs. This locator is known as the diagnostic server identifier and may be an address of a server. A SIP entity can use the diagnostic server identifier to send collected logs to the diagnostic server. 6. Security Considerations All drafts are required to have a security considerations section. See RFC 3552 [RFC3552] for a guide. 6.1. Trust Domain Since a log me marker may cause a SIP entity to log the SIP header and body of a request or response, the log me marker should be removed at a trust domain boundary. If a prior agreement to log sessions exists with the net hop network then the log me marker might not be removed. 6.2. Security Threats 6.2.1. Log-me marking The log me marker is not sensitive information, although it will sometimes be inserted because a particular device is experiencing problems. The presence of a log me marker will cause some SIP entities to log signalling. Therefore, this marker must be removed at the earliest opportunity if it has been incorrectly inserted. Dawes Expires April 21, 2014 [Page 6] Internet-Draft log me marker October 2013 Activating a debug mode affects the operation of a terminal, therefore it must be supplied by an authorized server to an authorized terminal, it must not be altered in transit, and it must not be readable by an unauthorized third party. Logged signalling is privacy-sensitive data, therefore it must be passed to an authorized server, it must not be altered in transit, and it must not be readable by an unauthorized third party. 6.2.2. Debug server address Log me marking may include the address of a debug server in the form of a URL. In order to prevent sending of logs to an unauthorised server a SIP entity that supports logging should authenticate the debug server, for example by referring to a statically configured white list of allowed destination domains. 6.2.3. Sending logged information A SIP entity that has logged information should encrypt it, such that it can be decrypted only by the debug server, before sending it to a debug server in order to protect the content of logs from a third party. 7. Potential Solutions This section describes potential solutions to the logme requirements and functionality that is common to all solutions. 7.1. Functionality Common to all Solutions 7.1.1. Starting and Stopping log-me marking 7.1.1.1. General A server or client needs to determine when to perform log-me marking. A client or server determines whether to perform log-me marking only by configuration. A regression test might be configured to log-me mark all SIP requests for a given time period whereas a troubleshooting test might be configured to mark sessions based on criteria specific to a reported fault. When configuration has caused a client or server to start log-me marking requests and responses in a dialog, marking continues until the dialog ends or until configuration indicates that marking must stop earlier, for example after certain time period has elapsed. 7.1.1.2. Configuration for log-me marking Dawes Expires April 21, 2014 [Page 7] Internet-Draft log me marker October 2013 Configuration of a client or server to perform log-me marking can be done in any way that is convenient to the configured entity. For example, an XML file might be used to list conditions for starting and stopping based on time. 09:00:00 09:10:00 Figure 2: Simple example log-me configuration 7.1.1.3. Maintaining State An entity that inserts a log-me marker in a SIP request should ensure that a log-me marker is also inserted in responses to that request. An entity that receives a SIP reqeust with a log-me marker may also ensure that responses to that requset contain a log-me marker by inserting one if it is missing. Entities that perform this log-me marking or checking must maintain a record of which dialogs are of interest to logging. In the figure below, the edge proxy in the originating network maintains state to ensure log-me marking of SIP requests and in the terminating network the registrar maintains state to ensure log-me marking of SIP responses. Such behaviour is useful to for logging if end devices do not insert or echo a log-me marker. Alice Proxy Registrar u1.foocorp.com p1.foocorp.com r1.foocorp.com | | | |(1) INVITE | | | (u1 does not insert log-me marker in SIP request) |----------------->| | | |(2) INVITE | | | Logme: | | | (p1 inserts log-me marker. p1 maintains | | state and inserts log-me marker in all | | requests on this dialog) | |----------------->| | | |(3) INVITE | | | LogMe: | | |--------> (to barcorp) | | | | | | | | | | | |(8) 200 OK | | | Logme: | |(9) 200 OK |<-------- (from barcorp) Dawes Expires April 21, 2014 [Page 8] Internet-Draft log me marker October 2013 | | LogMe: | | |<-----------------| |(10) 200 OK | | | LogMe: | | |<-----------------| | | | | |(11) ACK | | |---------------------------------------------------------> | | | Proxy Registrar Bob p1.barcorp.com r1.barcorp.com u1.barcorp.com | | | (3) INVITE | | Logme: | | ----->|(from foocorp) | | | | | |(4) INVITE | | | Logme: | | |----------------->| | | |(5) INVITE | | Logme: | | |----------------->| | | | | |(6) 200 OK | | | (u1 does not echo LogMe: | | to SIP response)| | |<-----------------| |(7) 200 OK | | |LogMe: | | | (r1 inserts log-me marker. r1 maintains | state and inserts log-me marker in all | responses on this dialog) |<-----------------| | | | | (8) 200 OK | | LogMe: | | <----| | | | | | (11) ACK | | from foocorp) -------------------------->| | | | Figure 3: Maintaining state for log-me marking Dawes Expires April 21, 2014 [Page 9] Internet-Draft log me marker October 2013 7.1.2. Sending logs to a debug server 7.1.2.1. Server address Log me marking may include the address of a debug server in the form of a URL. In order to prevent sending of logs to an unauthorised server a SIP entity that supports logging should authenticate the debug server, for example by referring to a statically configured white list of allowed destination domains. 7.1.2.2. Protecting logs A SIP entity that has logged information should encrypt it, such that it can be decrypted only by the debug server, before sending in order to protect the content of logs from a third party. 7.2. Solution A: LogMe header field 7.2.1. Introduction A new SIP header field, e.g. 'LogMe:', is defined to indicate that a session is of interest to logging. A supporting UA inserts the LogMe header field in an initial SIP request, and subsequent SIP requests belonging to the same dialog if any, and echoed in responses by a supporting UA that receives the SIP request. The LogMe header field has two header field parameters defined, one free-text name of the test case being performed, and one address of a server where collected logging will be sent after logging has terminated. 7.2.2. Server Procedures 7.2.2.1. General A server may insert a logme marker, start logging, and stop logging. A server may perform log-me marking. Typically, server marking is useful if a session is of interest to logging and the client did not perform log-me marking. If a server inserts a log-me marker, that server must maintain state in order to echo a log-me marker in SIP responses in a session of interest to logging. 7.2.2.2. Sending logged information to a debug server A server may send logged information to a debug server when a dialog has ended. 7.2.3. Client Procedures Dawes Expires April 21, 2014 [Page 10] Internet-Draft log me marker October 2013 7.2.3.1. General A client may perform any of the server procedures and may echo a log me marker from a request to a response. 7.2.4. Identifying test cases The Session-ID header field may be used to identify test cases such as particular regression tests. 7.2.5. Collecting logged information at a debug server Clients and servers may send logged information to a debug server. 7.2.6. Examples Alice Proxy Registrar Debug Server u1.foocorp.com p1.foocorp.com r1.foocorp.com d1.foocorp.com | | | | |(1) INVITE | | | | LogMe: testCaseName="test01"; debugServer="d1.foocorp.com" |----------------->| | | | |(2) INVITE | | | | Logme: | | | |----------------->| | | | |(3) INVITE | | | | LogMe: | | | |--------> (to barcorp) | | | | | | | | | | | | | | |(8) 200 OK | |(9) 200 OK |<-------- (from barcorp) | | LogMe: | | | |<-----------------| | |(10) 200 OK | | | | LogMe: | | | |<-----------------| | | | | | | |(11) ACK | | | |---------------------------------------------------------> | | | | Proxy Registrar Bob Debug Server p1.barcorp.com r1.barcorp.com u1.barcorp.com d1.barcorp.com | | | | Dawes Expires April 21, 2014 [Page 11] Internet-Draft log me marker October 2013 (3) INVITE | | | Logme: | | | ----->|(from foocorp) | | | | | |(4) INVITE | | | | Logme: | | |----------------->| | | | |(5) INVITE | (u1 copies LogMe: to | Logme: | SIP response) | | |----------------->| | | | | | | |(6) 200 OK | | | | LogMe: | | | |<-----------------| | |(7) 200 OK | | | |LogMe: | | | |<-----------------| | | | | | | (8) 200 OK | | | LogMe: | | | <----| | | | | | | | (11) ACK | | | (from foocorp) -------------------------->| | | | | | Figure 4: Signalling example for the LogMe header field solution 7.3. Solution B: New Value for purpose header field parameter in Call- Info: A new value is defined for the purpose header field parameter used in Call-Info header field. The Call-Info: header field is defined in clause 20.9 of RFC 3261 [RFC3261]. Alice Proxy Registrar Debug Server u1.foocorp.com p1.foocorp.com r1.foocorp.com d1.foocorp.com | | | | |(1) INVITE | | | | Call-Info: mailto:"SIP logging"; purpose="debug" |----------------->| | | | | | | Dawes Expires April 21, 2014 [Page 12] Internet-Draft log me marker October 2013 Figure 5: Signalling example for the Call-Info: purpose parameter solution The Call-Info: header field can be included in methods INVITE, OPTIONS, REGISTER (Table 2: Summary of header fields, A--O in RFC 3261 [RFC3261] clause 20.1), INFO (RFC 6086 [RFC6086]), MESSAGE (RFC 3428 [RFC3428]), PUBLISH (RFC 3903 [RFC3903]), and UPDATE (RFC 3311 [RFC3311]), and in responses to those methods. Call-Info: header field cannot be included in methods NOTIFY, SUBSCRIBE, PRACK, or REFER. The Call-Info: header field has no protocol element that can be used to indicate the test case name, therefore in this solution the test case is identified by the Session-ID header field. 7.4. Solution C: New 'debug' header field parameter to be used in Session-ID header field A new header field parameter called debug is defined to be used with the Session-ID header field (described in I-D.ietf-insipid-session- id-reqts [I-D.ietf-insipid-session-id-reqts]). Alice Proxy Registrar Debug Server u1.foocorp.com p1.foocorp.com r1.foocorp.com d1.foocorp.com | | | | |(1) INVITE | | | | Session-ID: debug="testCaseName" | |----------------->| | | | | | | Figure 6: Signalling example for the Session-ID: header field parameter solution 7.5. Comparison of Potential Solutions The table below summarizes the features of each potential solution. Other solutions are not excluded. +----+--------------+-----------------------------------------------+ | | Solution | Summary | +----+--------------+-----------------------------------------------+ | A | Log-Me: | Specify a new SIP header field. Could be | | | header field | included in all SIP requests and responses. | | | | All behaviour including proxy handling in | | | | terms of add, delete, modify, and read, and | | | | which requests may or may not include the | Dawes Expires April 21, 2014 [Page 13] Internet-Draft log me marker October 2013 | | | header field must be defined. | | | | | | B | New value | Rules for including, reading, modifying etc. | | | for the | are already defined by Call-Info. Call-Info | | | purpose | cannot be inserted in all requests and | | | parameter of | responses, but can be included for the SIP | | | the Call- | methods of most interest to debugging and | | | Info header | regression testing. No element to hold a test | | | field e.g. | case name so test case is identified by the | | | "debug" | Session-ID header field. | | | | | | C | New header | Might be viewed as a reason to remove the | | | field | Session-ID header field, which would violate | | | parameter | the Session-ID requirement: "REQ3: The | | | for Session- | solution must require that the identifier, if | | | ID header | present, pass unchanged through SIP B2BUAs or | | | field e.g. | other intermediaries." in I-D.ietf-insipid- | | | debug | session-id-reqts [I-D.ietf-insipid-session- | | | | id-reqts] | +----+--------------+-----------------------------------------------+ Table 1: Summary comparison of potential solutions 8. References 8.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. 8.2. Informative References [I-D.ietf-insipid-session-id-reqts] Jones, P., Salgueiro, G., Polk, J., Liess, L., and H. Kaplan, "Requirements for an End-to-End Session Identification in IP-Based Multimedia Communication Networks", draft-ietf-insipid-session-id-reqts-07 (work in progress), June 2013. [RFC2234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997. [RFC2629] Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629, June 1999. Dawes Expires April 21, 2014 [Page 14] Internet-Draft log me marker October 2013 [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. [RFC3311] Rosenberg, J., "The Session Initiation Protocol (SIP) UPDATE Method", RFC 3311, October 2002. [RFC3428] Campbell, B., Rosenberg, J., Schulzrinne, H., Huitema, C., and D. Gurle, "Session Initiation Protocol (SIP) Extension for Instant Messaging", RFC 3428, December 2002. [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, July 2003. [RFC3903] Niemi, A., "Session Initiation Protocol (SIP) Extension for Event State Publication", RFC 3903, October 2004. [RFC6086] Holmberg, C., Burger, E., and H. Kaplan, "Session Initiation Protocol (SIP) INFO Method and Package Framework", RFC 6086, January 2011. Appendix A. Additional Stuff This becomes an Appendix. Author's Address Peter Dawes Vodafone Group The Connection Newbury, Berkshire RG14 2FN UK Phone: +44 7717 275009 Email: peter.dawes@vodafone.com