Internet Printing Protocol (IPP): Event Notifications and Subscriptions
updates
Extracted elements (30)
Per-Job Subscription Objects have no lease because their lifetime is tied exactly to the associated Job Object, eliminating the need for a separate renewal mechanism. Per-Printer Subscription Objects require a lease-and-renewal model because they have no natural termination event and must be explicitly managed to avoid accumulating stale subscriptions on the Printer.
Unsupported Subscription Template Attributes are returned in the per-Subscription Attributes Group rather than in the global Unsupported Attributes Group (as defined in RFC 2911) because a single request can create multiple Subscription Objects, and each object's set of unsupported attributes must be associated with the correct object.
This specification extends the RFC 2911 Job Creation operations (Print-Job, Print-URI, Create-Job) and the Validate-Job and Restart-Job operations by allowing Subscription Template Attributes Groups in requests and Subscription Attributes Groups in responses. Implementations of this extension must handle these additional groups without breaking base IPP/1.1 interoperability.
Two new status codes (successful-ok-ignored-subscriptions 0x0003 and client-error-ignored-all-subscriptions 0x0414) are defined. The former indicates partial success where some subscriptions were ignored; the latter indicates total failure where no subscriptions could be created, allowing clients to distinguish partial from complete failure.
A Printer MUST return one Subscription Attributes Group in the response for each Subscription Template Attributes Group in the request, in the same order, regardless of whether the Subscription Object was successfully created. Each Subscription Attributes Group MUST include 'notify-subscription-id' if created, 'notify-lease-duration' if a Per-Printer object was created, and all unsupported attributes.
All conforming Printer and client implementations MUST support the 'ippget' Pull Delivery Method defined in RFC 3996. Implementations MAY additionally support Push or other Pull Delivery Methods.
For Push Delivery Methods, a client MUST supply 'notify-recipient-uri' in the Subscription Creation Request. For Pull Delivery Methods, a client MUST supply 'notify-pull-method'. A client MUST NOT supply both attributes in the same Subscription Creation Request.
If a client supplies a required 'notify-xxx' attribute whose value is unsupported, the Printer MUST NOT create the Subscription Object. If a required 'notify-xxx' attribute is absent from the request, the Printer MUST reject the Subscription Creation Operation with 'client-error-bad-request' and return no Subscription Attributes Groups.
If an Event matches Subscribed Events in two different Subscription Objects and would deliver identical notifications to the same Notification Recipient via the same Delivery Method, the Printer MUST deliver both Event Notifications and MUST NOT consolidate them. The Printer MUST NOT reject Subscription Creation Operations that create this scenario.
The Renew-Subscription operation MUST only be used on Per-Printer Subscription Objects, not Per-Job Subscription Objects. It is the client's duty to invoke this operation frequently enough to preserve a Per-Printer Subscription Object before its lease expires; the Printer deletes the object when the lease expires without renewal.
When a client does not supply 'notify-lease-duration' for a Per-Printer Subscription, the Printer MUST use its 'notify-lease-duration-default' value. If the client supplies an unsupported value, the Printer MUST substitute a supported value that SHOULD be as close as possible to the requested value; the Printer MUST NOT assign value 0 (infinite) unless the client requests it.
When an Event occurs, for Printer Events the Printer MUST generate an Event Notification for every Per-Printer and Per-Job Subscription Object whose 'notify-events' attribute matches (by equality or super-value). For Job Events, the Printer MUST generate notifications for Per-Printer subscriptions and Per-Job subscriptions associated with the triggering Job, but MUST NOT notify Per-Job subscriptions associated with other Jobs.
A Subscription Object holds Subscription Template Attributes (supplied by the client) and Subscription Description Attributes (supplied by the Printer at creation time). It specifies the Notification Recipient, Delivery Method, Subscribed Events, and information to include in Event Notifications.
Event Notification content for Machine Consumable notifications includes: notify-subscription-id, notify-printer-uri, notify-printer-up-time, notify-printer-name, notify-subscribed-event, notify-sequence-number, notify-charset, notify-user-data, notify-natural-language, and printer-up-time. Job Events additionally include job-id, job-state, job-state-reasons, and job-impressions-completed.
'notify-events' (1setOf type2 keyword) contains the set of Subscribed Events. A Printer MUST support this attribute and MUST support at least 2 values per Subscription Object. If the client supplies too many values (exceeding 'notify-max-events-supported'), the Printer treats extra values as unsupported and returns 'successful-ok-too-many-events'.
'notify-lease-duration' (integer(0:67108863)) specifies the lease duration in seconds for a Per-Printer Subscription Object. A value of 0 means the lease never expires. This attribute MUST NOT be present on Per-Job Subscription Objects. The maximum value of 67,108,863 (~2 years) is chosen to prevent overflow when added to 'printer-up-time'.
'notify-pull-method' (type2 keyword) specifies which Pull Delivery Method to use. Its value MUST be one of the values in the Printer's 'notify-pull-method-supported' attribute. If unsupported, the Printer MUST NOT create the Subscription Object and MUST return 'client-error-attributes-or-values-not-supported' in the Subscription Attributes Group.
'notify-recipient-uri' (uri) specifies the URL (scheme + address) of the Notification Recipient and implicitly identifies the Push Delivery Method via its URI scheme. The Printer MUST return the value as supplied by the client without case conversion or canonicalization.
'notify-sequence-number' (integer(0:MAX)) counts the number of Event Notifications the Printer has generated and attempted to deliver for this Subscription Object. Initialized to 0 at creation; incremented by 1 for each delivered notification. Allows recipients to detect missed or duplicate notifications. Wraps from MAX back to 0.
'notify-subscription-id' (integer(1:MAX)) uniquely identifies a Subscription Object within a Printer. The Printer SHOULD avoid reusing recent values across power cycles to prevent stale references from accidentally targeting new Subscription Objects. Sequential assignment is allowed but noted as a passive traffic monitoring risk when no security is in place.
'notify-time-interval' (integer(0:MAX)) limits the frequency of 'job-progress' Event Notifications by specifying a minimum number of seconds between deliveries. The Printer MUST support this attribute if and only if it supports the 'job-progress' Event. This attribute MUST NOT affect any Events other than 'job-progress'.
'notify-user-data' (octetString(63)) carries opaque data up to 63 octets that the Printer delivers to the Notification Recipient in each Machine Consumable Event Notification. If the length exceeds 63 octets, the Printer MUST treat it as an unsupported value. There is no supported or default Printer attribute for this field.
Six new operations are defined: Create-Job-Subscriptions (operation-id 0x0016), Create-Printer-Subscriptions (0x0017), Get-Subscription-Attributes (0x0018), Get-Subscriptions (0x0019), Renew-Subscription (0x001A), and Cancel-Subscription (0x001B). Job Creation operations (Print-Job, Print-URI, Create-Job) are extended to accept Subscription Template Attributes Groups.
The 'notify-subscribed-event' (type2 keyword) attribute, present only in Event Notifications, identifies the Subscribed Event keyword that caused the Notification to be generated. The 'notify-text' (text(MAX)) attribute provides a human-readable description of the event for Human Consumable Event Notifications.
IANA registries created or updated: IPP Subscription Template Attributes, IPP Subscription Description Attributes, IPP Printer Description Attributes (for notification), IPP Operations (new operation-ids 0x0016–0x001B), IPP Status Codes (0x0003, 0x0005, 0x0414, 0x0415), IPP Attribute Group Tags, IPP Events, and IPP Event Notification Delivery Methods.
The Event Notification Delivery Methods registry requires a registration document specifying: the keyword name, whether Push or Pull, whether Compound Event Notifications are supported, Event Life for Pull methods, security considerations, and IANA registration template. The 'ippget' delivery method is the sole initially registered method.
Notification Recipients face threats from unsolicited Event Notifications (spam/DoS). The Delivery Method Document MUST specify security mechanisms to protect the Notification Recipient. Printers delivering Push notifications SHOULD support authentication of the Notification Recipient's endpoint and integrity protection of the notification content.
Printers are threatened by clients that subscribe with a 'notify-recipient-uri' targeting a third party, causing the Printer to act as an unwitting amplifier for denial-of-service attacks against that third party. Implementations should consider rate-limiting and authentication requirements for subscription creation.
Subscription Objects expose the system to security threats including: unauthorized clients creating subscriptions that generate traffic to third parties (amplification/DoS), clients subscribing to events they are not authorized to observe (information disclosure), and passive traffic analysis when notify-subscription-id is assigned sequentially allowing enumeration of all active subscriptions.
Per-Printer Subscription Objects transition through states: Created (lease starts, sequence-number=0) → Active (events delivered, sequence-number incremented) → Expired (lease time reached, Printer deletes object) or Cancelled (Cancel-Subscription operation). Lease can be extended via Renew-Subscription before expiration. Per-Job Subscription Objects are tied to the Job lifecycle and have no lease.