godbus / dbus

Native Go bindings for D-Bus
BSD 2-Clause "Simplified" License
959 stars 222 forks source link

External authentication fails between user-namespaces #345

Closed idleroamer closed 1 year ago

idleroamer commented 1 year ago

It is not possible to connect to dbus bus running on host from within a user-namespace, a typical containers setup. The "EXTERNAL authentication" mechansim fails to verify the UID credential passing via the message against the out-of-band credential, due mismatch in user-id crossing user-namespace.

Frameworks like sd-bus, gdbus has already switched to sending empty value instead of UID in DATA payload to fix the issue. https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2832

https://github.com/systemd/systemd/commit/1ed4723d38cd0d1423c8fe650f90fa86007ddf55

idleroamer commented 1 year ago

already fixed in master in https://github.com/godbus/dbus/issues/264