settings daemon D-Bus interface proposal



Proposal:

The system settings service (what we were calling NMI) will run either
as 'nobody' or 'root' (I'm not sure yet, thoughts?).  Something will
have to start it, either NM or the startup scripts.  It provides the
default/mandatory settings that users have published system-wide or that
the sysadmin has set.  I'm somewhat afraid that if we run it as 'nobody'
that we'll not be able to trust the information we get out of it because
it's not root.

If we run the system settings service as 'root', then it can access the
system-wide published secrets and then NM doesn't have to contain code
to read the secrets in some lookaside directory.  If it's run as
'nobody' then NM would have to store them.  Your thoughts David?

This Gnome system settings daemon will be a copy of nm-applet and will
be run with the '--system' argument, which tells the applet to present
_no_ UI, not init GTK, and acquire the system settings service name
rather than the user-level settings service name.

We can use the same D-Bus interfaces between the normal user-level
settings service (i.e., nm-applet) and the system settings service,
since the data they are passing is actually the same format.

Service: org.freedesktop.NetworkManager.Settings.System
Path:    /org/freedesktop/NetworkManager/Settings/System

And for the user-level settings service run from the login session:

Service: org.freedesktop.NetworkManager.Settings.User
Path:    /org/freedesktop/NetworkManager/Settings/User

One problem is that ".Settings" overlaps with the 'settings' object
described below, but using ".Config" or ".Preferences" just doesn't
sound right.  I think ".Settings" is probably best.  Thoughts?

m = method, s = signal

Base Object
---------------------

interface: org.freedesktop.NetworkManager.Settings
 m  ListConnections(out connections 'ao')
      - Returns the object paths of known connections

 s  NewConnection(out connections 'o')
      - Signals that a new connection object has been created


Connection Object
---------------------

interface: org.freedesktop.NetworkManager.Settings.Connection
path:      /org/freedesktop/NetworkManager/Settings/Connection/<id>
             (path can be arbitrarily defined by the settings daemon)

 m  GetID(out id 's')
      - returns the connection id.  If NM doesn't store the secrets
        then we won't need this, but if NM does store the secrets,
        NM will need some unique identifier for each connection that
        it can use to find the secrets on the filesystem

 m  GetSettings(out settings 'a{sa{sv}}')
      - returns a dict of settings dictionaries in the format
        sort of described here:
           http://live.gnome.org/NetworkManagerConfiguration

        Note that the "Conceptual Diagram" shown there is not how
        the data will actually be represented in the dict of dicts.
        Each settings object will have a well-known name which
        is used as its key in the outer dict, and the key names and
        value types of each member of the settings object will also
        be well-known.  We will spec these well-known things out.

 m  GetSecret(in setting-name 's', out secret 'ay')
      - NM calls this method to request the secret for a specific
        settings dict from the settings daemon (either system or user)
        Replaces getKeyForNetwork().  Different settings objects may
        require different secrets, so we need the ability to request
        settings from each secret individually as necessary.

 s  Updated(settings 'a{sa{sv}}')
      - Signals that the connection object's settings have changed,
        and passes the entire dict of settings dicts.  It is NM's
        responsibility to determine what's changed and take appropriate
        action as necessary.

 s  Removed()
      - Signals that the connection object has been deleted by the
        settings daemon and that it is no longer valid.  NM should
        dispose of the connection object and associated memory
        and no longer call any method of it.  NM may also need to
        disconnect if this connection is currently in-use.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]