The kdbuswreck
The kdbuswreck
Posted Apr 25, 2015 6:28 UTC (Sat) by kentonv (subscriber, #92073)In reply to: The kdbuswreck by fandingo
Parent article: The kdbuswreck
I defer to Andy Lutomirski's arguments on LKML, since he's already said many of the same things I would say.
> I guess you can only have one resource occupy a distinguished name (i.e. org.foo.bar)
Yes, that's essentially the problem.
> it's difficult to envision how that could possibly work differently.
You don't really want "the" org.foo.bar, you want "an" org.foo.bar. Multiple applications should be able to export objects implementing the org.foo.bar interface and the user should be able to choose which one to use for each app (or choose none, i.e. disallow access).
> Furthermore, your idea of passing a FD to the logon process seems like it introduces a much "worse" singleton.
Not at all. The whole point is, any process can implement the "account management" interface for itself, and pass its own implementation down to children. This lets you do all kinds of magical things that are hard or infeasible today, like:
- Sandboxing: Just wrap the capability with an implementation that blocks or mocks out requests that you want to disallow.
- Testability: You can run an app against a mock capability instead of the real one for testing purposes.
- Monitoring/auditing: See what apps are doing by injecting an interceptor that logs requests.
- Composability: Apps can be composed on top of different back-ends to produce novel functionality. Like maybe instead of managing local users, you want to manage users on your remote server, but you want to use a GUI app that was written only with local users in mind. No problem, just swap the local cap for the remote one and it works. No need to go edit the GUI app to support a different kind of back-end.
> Perhaps you could explain something that could be done with capsicum that cannot be done with a combination of what I mentioned.
In addition to the above, expressing security policies in terms of capabilities is generally easier and less error-prone that expressing them in terms of ACLs or policy files. This is hard to prove in the space of an LWN post, but after working with them for a while you won't want to go back.
