A tube is a mechanism for arbitrary data transfer between
two or more IM users, used to allow applications on the users'
systems to communicate without having to establish network
connections themselves. Currently, two types of tube exist:
Tube channels can be requested for
Each tube has a dictionary of arbitrary parameters. Parameters are commonly used to bootstrap legacy protocols where you can't negotiate parameters in-band. The allowable keys, types and values are defined by the service, but connection managers must support the value being a string (D-Bus type 's'), array of bytes (D-Bus type 'ay'), unsigned integer (D-Bus type 'u'), integer (D-Bus type 'i') and boolean (D-Bus type 'b').
When the tube is offered, the parameters are transmitted with the offer and appear as a property of the incoming tube for other participants.
For example, a stream tube for
{ 'u': 'some-username', 'p': 'top-secret-password', 'path': '/etc/passwd', }
When requesting a tube with
When receiving an incoming tube, this property is immutable and so advertised in the
State of the tube in this channel.
When requesting a tube with
The IP or Unix socket can be accessed by any local user (e.g. a Unix socket that accepts all local connections, or an IP socket listening on 127.0.0.1 (or ::1) or rejecting connections not from that address). The associated variant must be ignored.
For a D-Bus tube, this means that the "same user" access
control typically provided by default in D-Bus implementations
SHOULD be disabled. If the socket is only available to local users
(e.g. a Unix socket, an IPv4 socket bound to 127.0.0.1, or an
IPv6 socket bound to ::1), the ANONYMOUS
authentication mechanism MAY be enabled.
The high-level meaning of this access control type is that only the same user (e.g. same numeric Unix uid) is allowed to interact with the tube. Exactly how this is achieved varies by channel type.
For
For
In either case, the listening process will disconnect the connection unless it can determine by OS-specific means that the connecting process has the same user ID as the listening process.
In either tube type, the associated variant must be ignored.