How I do to spoof a IPP "Unauthorized" response? Have read the IPP specification documents but cannot find exactly how a IPP response should look like. Any examples?
Basically, I have a IPP printer with a firewall in-between, that authenticates printer users, and when a unauthenticated user or a incorrect authenticated user prints, I want the user to get a more meaningful error message than "Cannot Contact the printer, please verify that the printer adress is correct and the printer is turned on". Simply rejecting with a HTTP 403 in the firewall on the IPP port just gives that error message.
Basically, I want to respond with application/ipp and a response code of 0x0403 as a response when the firewall deems the user as unauthenticated. I have the possibility to read and decode things from the request in the firewall (seems I need that to copy over the request ID?).
Solved it, I simply redirect the user (IPP client) to this page when auth fails. The user correctly gets a error message that tells that the user is not authorized to print on most operating systems: