accessing D-Bus Secret Service API from a snap?

Mark Shuttleworth mark at ubuntu.com
Sun Jun 19 09:59:02 UTC 2016


On 17/06/16 19:30, Bill Janssen wrote:
> Mark Shuttleworth <mark at ubuntu.com> wrote:
>
>> Was that useful?
> Yes, thanks, Mark.  Let me read that back:
>
> A "plug" goes in a "slot" to access the "interface" exported by the slot's snap.
>
> So, does this mean I have to write a snap to access the Secret Service
> API and provide it as a slot?  And presumably also design an "interface"
> which that slot exports?  Seems like a core kind of thing.

Almost right.

A "plug" and a "slot" must have the same "interface" to be connected at
all. You can't connect a plug and a slot that have different interfaces.
Perhaps we should call interfaces "shapes" - you would instinctively
know you can only connect a plug to a slot of the same shape :)

There is in progress an interface that allows select access to specific
dbus namespaces. So for example, an interface that says "this snap wants
to bind to the session dbus for org.gnome.foo.bar". If that would do for
your purposes, then you have everything you need on the way. You'll just
need to put the right plug in your snap and it will get connected
automatically to the right slot, et voila. Chat with Zyga on IRC to get
the details, I can't remember who was offering up that patch but Zyga
would know.

Mark





More information about the Snapcraft mailing list