Commit graph

257 commits

Author SHA1 Message Date
Simon McVittie
171fccffdb 1.13.4 2018-04-30 13:54:17 +01:00
Simon McVittie
3aa8bff8e2 spec: Describe nonce-tcp as "nonce-authenticated", not "nonce-secured"
nonce-tcp isn't really any more secure than tcp, unless you are
using ANONYMOUS authentication, which should not be considered
secure in any case. Avoid the word "secured" so that people don't
get the wrong idea.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106004
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2018-04-25 16:42:54 +01:00
Simon McVittie
d0a16b59a8 spec, dbus-daemon(1): Mention and deprecate shared session buses
This might (?) have made sense behind a firewall in 2003; but now it's
2018, the typical threat model that we are defending against has
changed from "vandals want to feel proud of their l33t skills"
to "organised crime wants your money", and a "trusted" local LAN
probably contains an obsolete phone, tablet, games console or
Internet-of-Things-enabled toaster with remote root exploits.
This make network topologies that used to be acceptable look
increasingly irresponsible.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106004
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2018-04-25 16:42:28 +01:00
Simon McVittie
856ad90e82 spec: Note that EXTERNAL is not *completely* impossible via TCP
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106004
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2018-04-25 16:41:25 +01:00
Simon McVittie
ad5036f1bd spec: Expand on how tcp connections are normally authenticated
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106004
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2018-04-25 16:41:21 +01:00
Simon McVittie
7fc89fb1f8 spec: Describe the security properties of nonce-tcp in terms of tcp
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106004
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2018-04-23 18:27:44 +01:00
Simon McVittie
cf47380641 spec, dbus-daemon(1): Recommend against remote TCP for debugging
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106004
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
[smcv: Add a TODO comment as suggested]
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-04-23 18:27:44 +01:00
Simon McVittie
2513f84db6 spec, dbus-daemon(1): Say that non-local TCP is insecure
With some fairly reasonable threat models (active or passive local
attacker able to eavesdrop on the network link, confidential
information being transferred via D-Bus), secure authentication is
insufficient to make this transport secure: it does not protect
confidentiality or integrity either.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106004
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2018-04-23 18:27:44 +01:00
Simon McVittie
17e28cb1b8 spec: Don't claim that the nonce-tcp transport is "secured"
Like the normal TCP transport, it has no confidentiality or integrity
protection. The only difference is that it adds an extra layer of
authentication.

However, this extra authentication is easily defeated if an attacker
could be eavesdropping on the link between client and server (unlike
DBUS_COOKIE_SHA1, which for all its flaws does at least protect the
confidentiality of the magic cookie).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106004
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2018-04-23 18:27:44 +01:00
Simon McVittie
20128fa664 spec: Recommend Unix domain sockets for all non-Windows platforms
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106004
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2018-04-23 18:27:44 +01:00
Simon McVittie
cd97bcd628 Start developing spec v0.33
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-02-01 18:42:06 +00:00
Simon McVittie
4370bee354 Release spec v0.32
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-01-30 15:30:52 +00:00
Simon McVittie
61e269e3d7 spec: Document the design principle that new headers must be asked for
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100317
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-01-11 18:35:38 +00:00
Simon McVittie
9bb330d82a dbus-daemon: Filter out unknown header fields
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100317
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-01-11 18:35:20 +00:00
Simon McVittie
cfd73beacf spec: Recommend that relaying servers filter header fields
This is an interpretation of the existing text. There are two plausible
ways a relaying server could interpret "must ignore [new] fields":
it could pass them through as-is, or it could delete them before
relaying. Until now, the reference implementation has done the former.

However, this behaviour is difficult to defend. If a server relays
messages without filtering out header fields that it doesn't
understand, then a client can't know whether the header field was
supplied by the server, or whether it was supplied by a (possibly
malicious) fellow client.

We can't introduce useful round-trip-reducing header fields like
SENDER_UNIX_USER_ID or SENDER_LINUX_SECURITY_LABEL until the
message bus filters them out, *and* provides a way for clients to
know for sure that it has done so. This is a step towards that
feature.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100317
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-01-11 18:34:03 +00:00
Simon McVittie
1769e9b65b spec: Allow non-message-bus servers to use SENDER and DESTINATION
The Telepathy "Tubes" APIs are an example of a server that is not a
message bus, but makes use of the sender and destination fields to
provide broadly unique-connection-name-like semantics.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100317
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-01-11 18:33:31 +00:00
Simon McVittie
d49229f4e5 spec: Describe the EXTERNAL and ANONYMOUS auth mechanisms
These are defined by standard RFCs rather than by D-Bus. What
separates them from other standard mechanisms like PLAIN (RFC 4616)
is that in practice, D-Bus implementations support EXTERNAL,
DBUS_COOKIE_SHA1 and sometimes ANONYMOUS, but not PLAIN.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104224
2018-01-11 18:26:08 +00:00
Simon McVittie
c85f97c3b0 spec: Make example authentication transactions more realistic
We don't need to invent a MAGIC_COOKIE mechanism when we have a
perfectly good EXTERNAL.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104224
2018-01-11 18:25:42 +00:00
Simon McVittie
cba9179a46 spec: Define what non-empty authorization identity strings mean
The SASL RFC requires that we do this. I had previously thought that
the D-Bus protocol on Unix requires the use of numeric user IDs,
but in fact the reference implementation will also accept usernames.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104224
2018-01-11 18:25:08 +00:00
Simon McVittie
c61271acba spec: ERROR takes an optional explanation in both directions
The examples don't include an explanation, but the reference
implementation always sends the human-readable explanation, in both
directions.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104224
2018-01-11 18:24:53 +00:00
Simon McVittie
e4283c76fa spec: Document NEGOTIATE_UNIX_FD, AGREE_UNIX_FD in state machines
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104224
2018-01-11 18:24:16 +00:00
Simon McVittie
2c19572f7a spec: Document expected reply for each client-to-server auth command
Client-to-server auth commands expect a reply, whereas
server-to-client auth commands don't (the client is expected to send
another command that is valid in the new state, but it isn't really
a direct reply to the server-to-client command).

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104224
2018-01-11 18:23:57 +00:00
Simon McVittie
553ca04550 spec: Document the direction of each auth command
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104224
2018-01-11 18:23:54 +00:00
Simon McVittie
0436be576c spec: Move text about the BEGIN command to documentation of BEGIN
Having the text about the message stream in the documentation
of AUTH seemed rather odd, and made it likely to get out of sync
with the rest of the spec. Move it to the BEGIN section, remove
some duplication, and make it clearer that if the client pipelines
the fd-negotiation, the server is expected to send exactly one
reply per non-BEGIN command before switching to the D-Bus wire protocol.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104224
2018-01-11 18:23:52 +00:00
Simon McVittie
071237542f spec: Explicitly say that auth client and server take turns
This was (hopefully) implicit in the protocol descriptions, but we
never actually said it. Do so.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104224
2018-01-11 18:23:41 +00:00
Simon McVittie
f8a2a03ca0 Revert "spec: Document the initial Containers1 interface"
This reverts commit 39262d0a29.
I'm reasonably sure the API for Container1 is going to change
incompatibly, so it isn't ready to be in the published spec yet.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-01-11 18:21:40 +00:00
Simon McVittie
ac49b22458 spec: Deprecate hyphen/minus in well-known names
We don't really need two parallel forms of punctuation, and in
particular DNS domain names only have one (hyphens). If we choose one
representation and deprecate the other, it makes the recommendation
clearer for app authors.

This reflects a similar change to the Desktop Entry Specification,
which uses D-Bus well-known names as app IDs. While hyphens are not a
problem for D-Bus well-known names or for freedesktop.org app IDs,
they create problems for adjacent APIs and specifications that want to
use a well-known name in a context where hyphens are not allowed.
Hyphens are not allowed in D-Bus object paths and interface names,
are only conditionally allowed in Flatpak app IDs (they can only
appear in the last element), and have a special syntactic role in
Freedesktop icon names.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103216
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103914
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: Alexander Larsson <alexl@redhat.com>
2017-12-24 18:27:16 +00:00
Simon McVittie
39262d0a29 spec: Document the initial Containers1 interface
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101354
2017-12-11 15:49:19 +00:00
Simon McVittie
1cd79d185a spec: Update my email address
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-06-29 22:37:12 +01:00
Simon McVittie
77f4f5c53e Start 1.11.16 development
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-06-29 22:37:04 +01:00
Simon McVittie
f0079c312b 1.11.14
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-06-29 18:20:01 +01:00
Simon McVittie
6589f664fa spec: Document versioning of eavesdrop='true'
The wording and formatting used here is consistent with other
semi-recently-added match keys.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
2017-06-29 17:46:47 +01:00
Simon McVittie
8b1b8beece spec: Formally deprecate eavesdropping
Reviewed-by: Philip Withnall <withnall@endlessm.com>
[smcv: Wrap BecomeMonitor in <literal> as per Philip's review]
Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
2017-06-29 17:46:44 +01:00
Simon McVittie
3f3e8d5dd2 spec: Do not promise match rules with eavesdrop='true' can be added
This is no longer true, and it seems less misleading to raise an
error than to obey the letter of the spec by quietly ignoring calls
from an inappropriate caller.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
2017-06-29 17:46:26 +01:00
Simon McVittie
b951c5006c Add unix:dir=/something addresses
These are like unix:tmpdir=/something, except that the resulting
socket is always path-based, never abstract.

This is desirable for two reasons:

* If a Linux container manager wants to expose a path-based socket
  into the container, it can do so by bind-mounting it in the
  container's filesystem namespace. That cannot work for abstract
  sockets because they are not files.

* Conversely, if a Linux container manager does not want to expose
  a path-based socket in the container, it can avoid bind-mounting it,
  or bind-mount some harmless object like /dev/null over it.
  That cannot work for abstract sockets because access to abstract
  sockets is part of the network namespace, which is all-or-nothing.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
2017-06-29 14:03:03 +01:00
Simon McVittie
e327478e75 spec: Document the Features and Interfaces properties on o.fd.DBus
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
2017-06-08 17:00:22 +01:00
Simon McVittie
b460f9117b spec: Document the Peer and Properties interfaces for the message bus
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
2017-06-08 17:00:14 +01:00
Simon McVittie
b62a77118a spec: Document the canonical object path for the bus driver
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101256
2017-06-02 10:43:34 +01:00
Tom Gundersen
5f499a5040 spec: Fix indentation
[smcv: separated out from a larger commit, added commit message]
Reviewed-by: Simon McVittie <smcv@collabora.com>
2017-05-31 16:28:02 +01:00
Tom Gundersen
f9330c02d0 spec: Re-word documentation of ListQueuedOwners
This was previously written in an unusual message-passing-oriented
style, which obscured the meaning. Use a more method-call-oriented
style instead.

[smcv: separated out from a larger commit, added commit message]
Reviewed-by: Simon McVittie <smcv@collabora.com>
2017-05-31 16:27:51 +01:00
Tom Gundersen
93136d6245 spec: Re-word documentation of ReleaseName
This was previously written in an unusual message-passing-oriented
style, which obscured the meaning. Use a more method-call-oriented
style instead.

[smcv: separated out from a larger commit, added commit message]
Reviewed-by: Simon McVittie <smcv@collabora.com>
2017-05-31 16:27:34 +01:00
Tom Gundersen
f612b067eb Spec: Re-word documentation of RequestName
This was previously written in an unusual message-passing-oriented
style, which obscured the meaning. Use a more method-call-oriented
style instead.

[smcv: separated out from a larger commit, added commit message]
Reviewed-by: Simon McVittie <smcv@collabora.com>
2017-05-31 16:26:06 +01:00
Simon McVittie
6725cac9d0 spec: Move ListQueuedOwners API description to list of methods
Tom Gundersen pointed out that RequestName, ReleaseName and
ListQueuedOwners were documented in their own section instead of being
put together with the other method calls, which makes it more difficult
to apply changes consistently across all methods.

I'm moving them one at a time to make the changes reviewable, since
the diff resulting from moving all three as a unit is too large to
review sensibly.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-05-31 16:26:05 +01:00
Simon McVittie
f3f347a850 spec: Move ReleaseName API description to list of methods
Tom Gundersen pointed out that RequestName, ReleaseName and
ListQueuedOwners were documented in their own section instead of being
put together with the other method calls, which makes it more difficult
to apply changes consistently across all methods.

I'm moving them one at a time to make the changes reviewable, since
the diff resulting from moving all three as a unit is too large to
review sensibly.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-05-31 16:25:59 +01:00
Simon McVittie
24a5eca834 spec: Move RequestName API description to list of methods
Tom Gundersen pointed out that RequestName, ReleaseName and
ListQueuedOwners were documented in their own section instead of being
put together with the other method calls, which makes it more difficult
to apply changes consistently across all methods.

I'm moving them one at a time to make the changes reviewable, since
the diff resulting from moving all three as a unit is too large to
review sensibly.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-05-31 16:24:06 +01:00
Simon McVittie
01019f2bb4 Ensure hyphen/minus is treated as literal in regexes
Each U+002D HYPHEN-MINUS in [0-9A-Za-z_-/.\] is treated as a member of a
range. The third one, which appears to have been intended to be a
literal, is part of an empty range because the starting point
U+005F LOW LINE is greater than the endpoint U+002F SOLIDUS, resulting
in at least some grep implementations not considering U+002D, U+002F
or U+005F to match the pattern. This resulted in one of the
dbus-launch tests being unintentionally skipped when it used a
regex based on the one in the spec.

regex(7) suggests "To include a literal '-' [in a bracketed character
set], make it the first or last character".

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100686
2017-04-18 12:46:20 +01:00
Simon McVittie
968e2cce93 spec: Don't say implementation-specific locations must be lowest priority
We're treating transient services as higher-priority than those in
the XDG_DATA_HOME or XDG_DATA_DIRS, which is consistent with systemd.

The specific list used by the standard session dbus-daemon will be
added to dbus-daemon(1) in the next commit.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99825
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2017-02-21 13:24:04 +00:00
Simon McVittie
c64db84836 Start towards 1.11.10
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-11-29 12:31:23 +00:00
Simon McVittie
c45454668b dbus 1.11.8 and D-Bus Specification 0.30
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-11-28 20:25:35 +00:00
Simon McVittie
457f79c262 Spec: document AppArmor mediation of auto-starting
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98666
2016-11-28 12:12:01 +00:00