Hello,

 

I am new to OpenBMC (and BMC ), so apologies if I am posting this in the wrong place. I have been looking at this issue.  Here is my summary of the problem statement, please do comment and let me know if I got this right.

  1. The biggest challenge is the use of system bus and non root access to the system bus.
  2. As previously suggested an ACL based approach can work. (whether it is using a D-Bus ACL configuration file or SELinux)
  3. However, it does require an exact configuration to cover all security scenarios (for MAC) and IMO “may” make debugging efforts harder. 

Coming from a desktop background (which additionally uses D-BUS session/user bus for user isolation), I was investigating if having a session bus would help. For OpenBMC, the idea would be to allow non root application to communicate with each other and with root** applications on a single session bus to begin with. This can be further augmented using ACL based approaches if needed. I have a small POC, which tests this on OpenBMC with D-Bus broker

To run the demo

With the POC I was able to …..

  1. Show dbus_broker_launch “–scope user” works on OpenBMC (A session busses can be created using the right system unit files and launcher provided by D-Bus broker)
    1. Since I am new to D-Bus broker and systemd I had to confirm this.
  2. Show DBUS_SESSION_BUS_ADDRESS is the only env variable required by root to access the session bus of another user. There is a limitation here, discussed below.

As far as the actual solution, idea would be to have a configuration file to specify which D-Bus interfaces can be on the session bus. An opt in model which does not need any modification to existing and future OpenBMC daemons/applications would be the goal but there are limitations …..

I am happy to start with a design document on git hub and also make some code changes, but I had a few questions.

  1. Your views on, if this a workable idea?
  2. I am hoping I can isolate all the changes to sdbusplus, sdbus, phosphor-dbus and object mapper. What else might need to change?
  3. If I can make all these changes, I was thinking of starting with BMCWeb as non root but since BMCWeb interfaces with a lot of daemons that would be a big step. Any better ideas?



Thanks,

Nirav.

 

 

 

--
Nirav Shah