DEV Community

facilishz
facilishz

Posted on

CUPS access rules must separate printing from printer administration

CUPS access rules must separate printing from printer administration

CUPS exposes printing, job control, queue management and server administration through IPP and a web interface. Those actions do not deserve the same authorization. The cupsd.conf manual uses Location and Limit sections to apply authentication and address controls to specific paths and operations. A broad rule for viewing printer status can easily become a broad rule for changing a queue.

Build rules from operations

Map each endpoint to a business action. Viewing printer attributes and submitting a print job may be acceptable for a defined client network. Releasing a held job, reading a document, changing a printer configuration, installing a driver or changing server settings should require a named administrator identity.

The manual notes that Satisfy Any permits access when either authentication or address conditions are met. That combination can make an address rule bypass an authentication requirement. Use the stricter Satisfy All behavior for management paths, and place the final default deny outside the intended client networks. Test with an unauthenticated client from both an approved and an unapproved address.

Reduce the exposed role

Restrict the web administration interface and the IPP listener separately. The server may need to accept jobs from a print client network while its configuration page should remain on localhost or a management network. Firewall the two paths independently and confirm that an alternate hostname or interface does not bypass the intended binding.

File and directory directives belong in cups-files.conf because moving privileged settings out of cupsd.conf reduces some privilege-escalation paths. Review who can edit either file. Disable or restrict unnecessary backends that can execute local programs or contact remote devices. Job history and document access can expose sensitive content, so retention and log access need owners.

Inventory the quieter surface

Printer discovery can advertise queue names, locations and capabilities through multicast DNS. Disable discovery across untrusted segments if it is not needed. Review the default printer, shared queues, remote CUPS servers and any driver download policy. A printer that accepts documents from a network may also retain spool files after the job completes.

Monitor configuration changes, authentication failures, job cancellations, document retrievals and unusual client addresses. After unauthorized access, preserve the spool directory and configuration, restrict the management listener, rotate any credentials used by print clients and review the affected print jobs.

The core check is simple: can a normal print client reach any path that changes policy or reveals another user's document?

References

Top comments (0)