About a month or so ago (2009-12-07), I integrated Trusted Extensions support for CUPS into Nevada. These changes show up in build 130. The Trusted Extensions support provides a basic framework for implementing labeled printing under CUPS on OpenSolaris. The TX support for CUPS is largely transparent, but there are a few places that require some administrative interaction. This works similarly to the LP TX support.
A simple overview of the support.
Almost all of the changes have been made to the CUPS scheduler (cupsd). Cupsd now keeps track of the label associated with each client connection made. It also can associate a specific label range with a printer though an entry in /etc/security/device_allocate. Newly created print jobs inherit a label from the client connection that the job creation request came on. When a print job is created or modified, it is validated to determine if it falls within the label range supported by the printer. Other operations that might operate on print jobs or provide print job data are validated against the client label and the job label. If they don't match, no information is provided. Usually, this means that the operation fails with an indication that the job was unknown to the scheduler. When a TX job prints under CUPS, CUPS will place a sensitivity label at the top and bottom of each page printed.
Initial setup
There are a couple of ways that CUPS can be setup to support Trusted Extensions
What is probably the easiest method of configuring CUPS under Trusted Extensions is to have a single CUPS server configured to run in the global zone and point each of the labeled zones at this CUPS server for their print service. This can be acheived as follows:
Global zone:
# svcadm enable cups/scheduler (This should be the default behavior)Labeled zone(s):
# svcadm disable cups/scheduler cups/in-lpd # cat <<EOF > /etc/cups/client.conf ServerName global-zone-hostname-or-ip-address EOFAlternatively, you can run CUPS servers in each of the labeled zones and configure the print queues using device-uris of ipp://global-zone-hostname-or-ip-address/printers/queue-name for print queues that service devices supporting a range of labels.
Burst pages
CUPS is capable of printing burst pages before and after a job has printed. In order to better support labeled printing, a new burst page was defined, "labeled". This burst page can be selected with the following command:
# lpadmin -p queue -o job-sheets-default=labeled,labeledThis will add a burst page before and after each job prints.
Associating label ranges with printers (output devices)
This can be achieved by adding an entry in the device_allocate file(/etc/security/device_allocate) for each print device. The "device-name" used in each entry must match the device-uri associated with the print queue (see "lpstat -v queue" output). In all likelihood, this will not match a device node in /dev because CUPS uses a device naming mechanism that maps device-uri to backend communication module and it's specific endpoint. There isn't always a correlation between this value and a node in /dev. If no label range is specified for a device-uri, it is assumed that any label may print on that device.
See Bug 6893007 cups should include TX support for more information.






