Allow auto-connection for runtime environment snaps

To ease the reusability of snaps, we need to have a special type of content interface that should always allow auto connect even if the snap is coming from a different vendor.

I am aware there are some security concerns here but I need to highlight that there is a certain type of snaps that in themselves don’t do anything (unless invoked by the user) and only provide a runtime environment to be consumed by other snaps, one such example is the crossbar snap.

IMO, we need to have an addition to the content interface and some loosening of rules by the store to accommodate that.

That will also allow us ( to ship our libraries as snap packages so that other people could use them without the need put requests in the Snapcraft forums.

I believe this is doable with store declarations and usage of default-provider in snaps wishing to use the content interface, for example the gnome content interface snaps work like this. You just need to request as such in the #store-requests category. See Auto-connection for gnome-3-28-1804 content interface for an example of this request.

That is exactly what I am trying to avoid i.e. a runtime snap should be able to declare itself as a reusable library without the need for the consumer snap developers to request an auto-connect.

Sorry if I was unclear, the request that I showed above was for the runtime snap was that it could be auto-connected to by consumer snaps without consumer snaps requesting auto-connects.

i.e. the gnome runtime snap went through a global auto-connection/default-provider request on the forum, and that was granted, and now any snap developer like can use default-provider: gnome-3-28-1804 and their snap will auto-connect without needing to request their consumer snap auto-connect.

Does that make sense?

1 Like

I understand the request, but this is intentionally out of scope of the design of the content interface since interfaces are a contract between the provider and the consumer and there is no way to enforce this outside of store processes. We have great flexibility with snap declarations and can make the content interface auto-connected for the publisher (the default), to an arbitrary list of publishers or globally. This is typically done in the providing snap and not the consumers, so the burden is correctly put on the providing snap’s publisher to request and answer questions related to contract guarantees.