[MIR] ipp-usb
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
golang-github-openprinting-goipp (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
golang-gopkg-ini.v1 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
ipp-usb (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
IPP-over-USB
------------
ipp-usb is the second implementation of the IPP-over-USB standard. This allows the PWG's Internet Printing Protocol (IPP) which is currently the most common communication protocol for network printers also to be used via USB, simply by a network printer being emulated on localhost. Advantages are:
- IPP is a high-level bi-directional packet-based protocol for printing,
scanning, and fax
- Full device capabilities can be polled from the device, together with
using standardized
printing and scanning data format driverless printing and scanning is
possible
- Status, like loaded paper, toner levels, ... can get polled
- Printing and scanning can be performed simultaneously and independently
- The administration web interface can get accessed
ipp-usb detects supported devices automatically and advertises their full functionality via DNS-SD on localhost, CUPS and the appropriate SANE backends discover the device automatically then and it is immediately available, no drivers needed, it just works.
This makes thousands of printers, scanners, and multi-function devices work on USB, USB-only devices, like the scanner Canon Lide 400 get working for the first time.
Why ipp-usb? There is ippusbxd already
-------
ippusbxd was the first implementation of IPP-over-USB, with the very same intentions, but it has problems which were not easily to be solved in C and so after a short discussion with me the author of the driverless scanning SANE backend sane-airscan (https:/
See also here:
https:/
See the original README for the rationale of ipp-usb:
https:/
----------
Unfortunately, the naive implementation, which simply relays a TCP connection to USB, does not work. It happens because closing the TCP connection on the client side has a useful side effect of discarding all data sent to this connection from the server side, but it does not happen with USB connections. In the case of USB, all data not received by the client will remain in the USB buffers, and the next time the client connects to the device, it will receive unexpected data, left from the previous abnormally completed request.
Actually, it is an obvious flaw in the IPP-over-USB standard, but we have to live with it.
So the implementation, once the HTTP request is sent, must read the entire HTTP response, which means that the implementation must understand the HTTP protocol, and effectively implement a HTTP reverse proxy, backed by the IPP-over-USB connection to the device.
And this is what the ipp-usb program actually does.
----------
Many users reported this to work perfectly and I am using it since its creation in January 2020 on a daily basis without problems.
Here are the issues of ippusbxd:
https:/
Especially
https:/
shows that packets of canceled connections can get stuck in buffer and spilled out on next connection. Problems of ippusbxd's architecture and lack of useful C libraries to solve this is discussed here.
https:/
The flakiness of the web admin interface is caused by above problems.
Due to this most other Linux distributions are also migrating to ipp-usb. Chrome OS was the last system sticking with ippusbxd but they have introduced their own replacement, ippusb_bridge (https:/
From the README.md of ippusb_bridge:
----------
The impetus for creating this was that ippusbxd has lost a lot of interest since the release of ipp-usb, a similar project written in Golang. Upstream provides only some oversight, and the code is pure C and has security bugs.
----------
With this the interest in ippusbxd has gone and ippusbxd can get considered deprecated.
goipp
-----
goipp (Debian/Ubuntu package: golang-
Original description from
https:/
----------
The goipp library is fairly complete implementation of IPP core protocol in pure Go. Essentially, it is IPP messages parser/composer. Transport is not implemented here, because Go standard library has an excellent built-in HTTP client, and it doesn't make a lot of sense to wrap it here.
High-level requests, like "print a file" are also not implemented, only the low-level stuff.
----------
[Availability]
Both ipp-usb and goipp got initially packaged in Debian and synced into Universe:
https:/
https:/
They build on all currently supported architectures.
[Rationale]
See introduction above. Replaces ippusbxd.
[Security]
For both ipp-usb and goipp:
No CVE on http://
No mention on https:/
Not listed on http://
No SUID/SGID
ipp-usb is a system daemon, running as root, triggered by plugging a supported device (USB printing device with IPP protocol, 7/1/4) via UDEV and systemd. In default configuration the daemon listens only on localhost, port 60000 (and following ports if more than one device is connected). So the device is not exposed to the network and communication with it stays on the local machine.
goipp is a Go library, the only binary package of it, golang-
[Quality assurance]
To use ipp-usb one simply installs it and plugs the device(s) to USB. The devices get auto-detected by UDEV and the daemon automatically started. It immediately advertises the device via DNS-SD only on localhost where CUPS and SANE auto-discover it. So it immediately gets available for the user, for both printing and scanning.
goipp is a Go library only needed to build ipp-usb, it does not need to be installed by the end user.
Both packages do not use debconf at all.
Both ipp-usb and goipp are maintained upstream very well and actively developed.
Upstream site:
https:/
https:/
Recent commits:
https:/
https:/
Bugs:
https:/
https:/
(only closed ones in ipp-usb currently, none at all in goipp)
The author of both, Alexander Pevzner, is very responsive, usually answers on the same day. He is actively working on driverless scanning (will mentor 2 students in LFMP on IPP Scan in Sep-Nov).
No known bugs in Debian and Ubuntu (Launchpad only lists this MIR for both).
Debian maintainer OdyX also very responsive.
No exotic hardware required, is for supporting the absolute standard hardware, most modern printers and multi-function devices, even very cheap ones. See introduction above.
Both packages have debian/watch files and the content of the files seems to be correct.
No dependencies on obsolete stuff.
[Dependencies]
ipp-usb build-depends on goipp, therefore this MIR is for both. They both were developed together and there is (yet) no other consumer than ipp-usb for goipp.
Otherwise build-depends on usual Go stack.
Run-time dependencies are only Avahi and libusb which are all in Main.
Avahi needs to support localhost, but Ubuntu's Avahi does this already for some years.
[Standards compliance]
Packages fulfill the standards concerning FHS and Go. Both ipp-usb and goipp packages declare Debian's "Standards-Version" as 4.5.0, Debian maintainer takes care of verifying and updating this. debian/ directories and debian/rules files are simple, fairly standard.
[Maintenance]
See [Quality assurance] above for upstream and Debian maintenance. I have subscribed myself to bugs in both packages and also the Ubuntu Printing Team. Also "Desktop Packages" (~desktop-packages) is subscribed to sane-airscan.
[Background information]
See introduction above.
description: | updated |
description: | updated |
description: | updated |
Changed in golang-github-openprinting-goipp (Ubuntu): | |
importance: | Undecided → High |
milestone: | none → ubuntu-20.10 |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
[Summary]
- This is just the review for ipp-usb, the other two are not yet reviewed.
- MIR Team ack from a packaging POV.
- This does need a security review, so I'll assign Ubuntu-security
Prereq's for Promotion: config- printer- udev replacing the ippusbxd dependency
- get the Desktop team to ack and subscribe to the packages
- prep a change to system-
- golang-gopkg-ini.v2 needs to be owned and MIR processed as well
Since the above might make the requester or the Desktop team reconsider this
I'm holding back on the two golang packages until explicitly confirmed that
this stays the way to go and that owning the package will be fine.
I'll add a task for it and set the two golang libs to incomplete - if you want
to own and MIR this provide the details and set it back to new.
Recommended:
- try to get the service more confined
[Duplication]
As mentioned by the bug report already, there is ippusbxd which is in main.
This shall be demoted from main to universe to allow just one (2) ipp-on-usb
program in main.
There is only one dependency holding it in main: Recommends config- printer- udev (for ippusbxd)
Reverse-
* system-
ipp-usb is depended on by "cups-daemon" in groovy-proposed. config- printer- udev be changed as part of the promotion (once ready)
Can system-
to be replaced to ipp-usb as well. So that we can demote ippusbxd in the same
step when we promote ipp-usb?
[Dependencies]
OK:
- no other Dependencies to MIR due to this (avahi and libusb are in main)
- no -dev/-debug/-doc packages that need exclusion
[Embedded sources and static linking]
OK:
- no embedded source present
- no static linking, well except the usual go lib inclusion :-/
There are more Built-Using than the bug is filed right now: github- openprinting- goipp (= 1.0~git20200517 .da79ff1- 2), (part of
Built-Using:
- golang0.14 (= 1.14.4-1ubuntu2), (in main)
- golang-
this MIR)
- golang-gopkg-ini.v2 (= 1.57.0-1) (Missing, this will have to be MIRed and
owned as well then.
[Security]
OK:
- history of CVEs does not look concerning, but ippusbxd had issues and we can
expect this might have as well at some point
- does not use webkit2,2
- does not use lib*v9 directly
- does not process arbitrary web content
- does not use centralized online accounts
- does not integrate arbitrary javascript into the desktop
- does not deal with system authentication (eg, pam), etc)
Problems:
- does not parse data formats
- does not open a port
- does run a daemon as root
- any chance to run the service more confined e.g. protected* features of
systemd?
- if there is a chance even as non-root?
[Common blockers]
OK:
- does not FTBFS currently
- does have a test suite that runs at build time (but fairly minimal)
- test suite fails will fail the build upon error.
- no translation present, but none needed for this case (user visible)?
- not a python package, no extra constraints to consider int hat regard
- Go package that uses dh-golang
Problems: /launchpad. net/~ubuntu- printing) is the perfect
- The package has a team bug subscriber
please get a full Team to subscribe to the package
The printing team (https:/
team to actually handle things here and is subscribed al...