ietf-corpus

rfc-6665

SIP-Specific Event Notification

A.B. Roach
date2012-07 streamIETF areaart wgsipcore statusPROPOSED STANDARD pages53 canonicalhttps://www.rfc-editor.org/rfc/rfc6665 doi10.17487/RFC6665
This document describes an extension to the Session Initiation Protocol (SIP) defined by RFC 3261. The purpose of this extension is to provide an extensible framework by which SIP nodes can request notification from remote nodes indicating that certain events have occurred. Note that the event notification mechanisms defined herein are NOT intended to be a general-purpose infrastructure for all classes of event subscription and notification. This document represents a backwards-compatible improvement on the original mechanism described by RFC 3265, taking into account several years of implementation experience. Accordingly, this document obsoletes RFC 3265. This document also updates RFC 4660 slightly to accommodate some small changes to the mechanism that were discussed in that document. [STANDARDS-TRACK]

obsoletes

updated by

updates

Extracted elements (30)

design-rationale §4.5

Dialog reuse from RFC 3265 is deprecated because it proved exceedingly confusing and error-prone in implementation (RFC 5057 clarifications remained insufficient). The GRUU mechanism (RFC 5627) provides an unambiguous alternative for targeting subscriptions at specific devices.

sip, realtime

design-rationale §1

The SIP event notification mechanism is explicitly NOT intended to be a general-purpose infrastructure for all classes of event subscription and notification. It is scoped to SIP-specific use cases where SIP's user mobility features are relevant; use cases like network management or high-frequency GPS updates are explicitly out of scope.

sip, realtime

design-rationale §4.2.2

The Subscription-State 'expires' parameter is mandated in active/pending NOTIFY requests (a change from RFC 3265's discretionary inclusion) because without it, forked SUBSCRIBE responses may not reach the subscriber, leaving it without authoritative subscription duration information.

sip, realtime

interoperability-note §4.2.3

For backwards compatibility with PINT (RFC 2848), notifiers MAY interpret a SUBSCRIBE request with no Event header field as a request for PINT events. Non-PINT notifiers SHOULD return 489 (Bad Event) for any SUBSCRIBE without an Event header field.

sip, realtime

normative-requirement §4.1.2.4 SHOULD

A subscriber starts Timer N (64*T1) when sending a SUBSCRIBE request. If Timer N expires before a NOTIFY is received, the subscription is considered failed. After Timer N expiry, NOTIFY requests that would establish new dialog usages SHOULD be rejected with 481.

sip, realtime

normative-requirement §5.3.2 MUST

Event packages that support state deltas MUST include a version number that increases by exactly one for each NOTIFY transaction in a subscription. If a NOTIFY arrives with a version increment greater than one, the subscriber ignores the delta body and re-subscribes to obtain full state.

sip, realtime

normative-requirement §4.2.2 MUST

If a NOTIFY transaction fails due to receipt of a 404, 405, 410, 416, 480-485, 489, 501, or 604 response, the notifier MUST remove the corresponding subscription. If a SUBSCRIBE refresh receives the same error codes, the subscriber MUST consider the subscription terminated.

sip, realtime

normative-requirement §4.6 MUST

If a UAS receives a CANCEL request matching a SUBSCRIBE or NOTIFY transaction, it MUST respond to the CANCEL request but otherwise ignore it; the CANCEL MUST NOT affect processing of the SUBSCRIBE or NOTIFY request in any way.

sip, realtime

normative-requirement §4.5.1 MUST

Notifiers MUST implement the GRUU extension (RFC 5627) and MUST use a GRUU as their local target. Subscribers MUST NOT attempt to reuse dialogs whose remote target is a GRUU.

sip, realtime

normative-requirement §4.2.1 MUST NOT

Notifiers MUST NOT create subscriptions except upon receipt of a SUBSCRIBE request. The only permitted exception for historical reasons is the implicit subscription creation defined in RFC 3515 (REFER).

sip, realtime

normative-requirement §4.2.2 MUST

NOTIFY requests MUST contain a Subscription-State header field. If value is 'active' or 'pending', the notifier MUST include an 'expires' parameter for remaining subscription time; this mechanism MUST NOT be used to lengthen a subscription beyond what was negotiated.

sip, realtime

normative-requirement §4.3 MUST NOT

Proxies that did not add a Record-Route header to the initial SUBSCRIBE request MUST NOT add a Record-Route header to any of the associated NOTIFY requests.

sip, realtime

normative-requirement §3.1.1 MUST

SUBSCRIBE requests SHOULD contain an Expires header field; if absent, the default MUST be defined by the event package. 200-class responses to SUBSCRIBE MUST contain an Expires header field that MAY be shorter but MUST NOT be longer than specified in the request.

sip, realtime

normative-requirement §3.1.2 MUST

Subscribers MUST include exactly one Event header field in SUBSCRIBE requests indicating the event package being subscribed to. The corresponding NOTIFY's Event header field MUST match the SUBSCRIBE's Event header field.

sip, realtime

normative-requirement §4.1.3 SHOULD

To prevent event spoofing, NOTIFY requests SHOULD be authenticated using any defined SIP authentication mechanism, such as those described in RFC 3261 Sections 22.2 and 23.

sip, security

normative-requirement §4.1.3 MUST

Upon receiving a NOTIFY request that does not match any outstanding subscription, the subscriber MUST return a 481 (Subscription does not exist) response unless another 400- or 500-class response is more appropriate.

sip, realtime

normative-requirement §4.2.1.2 MUST

Upon successfully accepting or refreshing a subscription, notifiers MUST immediately send a NOTIFY request communicating current resource state to the subscriber. This applies regardless of whether authorization has been completed.

sip, realtime

privacy-consideration §6.2

Notifiers may use a privacy mechanism to mask authorization decisions: instead of revealing a rejection, a notifier sends 200 OK to the SUBSCRIBE and then sends a NOTIFY with neutral or fake state, hiding whether authorization was granted or denied from the subscriber.

privacy, security, sip

protocol-element §4.4.4

Allow-Events header field: if present, MUST list all event packages for which the UA can act as notifier. MUST NOT be inserted by proxies. Should appear in dialog-initiating methods and their responses, and in OPTIONS responses.

sip, realtime

protocol-element §8.2.1

Event header field: identifies the event package for a subscription or notification. Both SUBSCRIBE and NOTIFY requests MUST contain exactly one Event header field with a registered token. Event template-packages are applied by appending '.templatename' to the base package name (e.g., 'presence.winfo').

sip, realtime

protocol-element §3.2

NOTIFY method: sent by notifiers to inform subscribers of resource state changes. It is a target refresh request and does not terminate its corresponding subscription; a single SUBSCRIBE may trigger multiple NOTIFY requests over the subscription lifetime.

sip, realtime

protocol-element §3.1

SUBSCRIBE method: used to request current state and state updates from a remote node. It is a target refresh request and a dialog-creating method. The Expires header field indicates subscription duration; an Expires of 0 constitutes an unsubscription and also triggers a state fetch.

sip, realtime

protocol-element §8.2.3

Subscription-State header field: mandatory in all NOTIFY requests; value is 'active', 'pending', or 'terminated'. For active/pending, MUST include an 'expires' parameter. For terminated, SHOULD include a 'reason' parameter (deactivated, probation, rejected, timeout, giveup, noresource, invariant) and optionally a 'retry-after' parameter.

sip, realtime

registry §7.1

IANA Event Packages registry: event packages must be registered with IANA. Registration template requires package name, contact, reference, and addresses for each of the mandatory sections (parameters, body formats, subscription duration, forking behavior, rate limits, state aggregation).

registry, sip

registry §7.2

IANA Subscription-State Reason Codes registry: created to register reason codes used in the 'reason' parameter of the Subscription-State header field. Initial registrations: deactivated, probation, rejected, timeout, giveup, noresource, invariant.

registry, sip

security-consideration §6.5

Man-in-the-middle attacks can intercept or modify SUBSCRIBE/NOTIFY messages. SIP authentication mechanisms (S/MIME or TLS transport) SHOULD be used; proxies cannot rely on being able to access S/MIME-encrypted SUBSCRIBE/NOTIFY content.

security, sip, tls

security-consideration §6.1

Notifiers SHOULD enforce access control for subscriptions via access control lists or real-time user interaction. If authorization fails, the notifier SHOULD reply with 403 (Forbidden) or 603 (Decline) unless doing so would reveal private information about the subscriber's authorization status.

security, sip

security-consideration §6.3

The SUBSCRIBE/NOTIFY mechanism is susceptible to denial-of-service attacks where an attacker creates subscriptions that cause excessive NOTIFY traffic toward a victim. Authentication of SUBSCRIBE requests and rate limiting of notifications per event package are the primary mitigations.

security, sip

state-machine §4.2.2

Notifier subscription state machine defines states: init, resp_wait, pending, active, terminated. Transitions are triggered by receiving SUBSCRIBE, policy decisions granting/denying authorization, NOTIFY transaction failures, subscription expiry, or local policy termination.

sip, realtime

state-machine §4.1.2

Subscriber subscription state machine defines states: init, notify_wait, pending, active, terminated. Transitions are triggered by sending SUBSCRIBE, receiving NOTIFY with state values (active/pending/terminated), Timer N expiry, or specific error responses to SUBSCRIBE refresh. Multiple independent state machines may run from a single forked SUBSCRIBE request.

sip, realtime