Did a little more hacking on my IPP client library, and wrote a small PyGTK program that lets you do simple management tasks (view all print queues/classes, view queued and completed jobs for printers, stop and start print queues, etc).
To get things working with CUPS’s authentication, I do the following for operations like Pause-Printer:
- Submit request to the HTTP URI corresponding to the IPP one.
- If the response has an IPP status code of client-error-not-authorized, then resubmit the request to the URI /admin/ relative to the previous URI (not changing the IPP message).
- Return the IPP response message.
This seems to work quite reliably, so I might add the fallback to all the IPP requests.