Interfaces by classification
all 222 interfaces by pattern for users for app developers for Ubuntu Core developers for snapd developers for administrators
Every interface classified four ways from the code: what its name says, where its slot lives, how it gets connected, and who may install it; plus the pairs.
On the map: interfaces district
01 What the name tells you
104 access one resource or device; 37 change a subsystem (-control); 21 operate as a privileged daemon (-support); 17 read a subsystem (-observe); 12 talk to a daemon over its socket; 7 talk to a session service (-service); 7 expose vendor libraries (-driver-libs); 6 unlock part of snapd's API; 4 read key material (-keys); 3 operate as a system manager daemon (-manager); 2 read or write listed paths (-files); 2 mount a filesystem type (-mount).
Before you read an interface's rules, its name already tells you what kind of access it gives. Of 222 interfaces, 104 simply name a resource or device, such as camera. 37 end in control and let a snap change a subsystem, such as network-control. 21 end in support and let a snap run as a privileged daemon, such as docker-support. 17 end in observe and let a snap read a subsystem, such as hardware-observe. The other 43 fall into eight smaller classes, which the caption and the catalogue list.
02 Where the slot lives
126 implicit system slot on classic and Ubuntu Core; 29 implicit system slot on classic only; 22 app-provided slot, or the system slot on classic; 17 app-provided slot only; 13 gadget-provided slot; 7 the system holds the plug, vendor snaps the slot; 6 no implicit slot; 2 implicit system slot on Ubuntu Core only.
A plug grants nothing until it meets a slot, so where the slot lives decides who can offer the access. Of 222 interfaces, 126 have an implicit slot on the system, on classic and on Ubuntu Core, such as camera. 29 have a system slot on classic systems only, such as accounts-service. 22 take the slot from an app snap, or from the system on classic, such as audio-playback. 17 take the slot only from an app snap, such as content. The other 28 fall into four smaller classes, which the caption and the catalogue list.
03 How they get connected
9 auto-connects; 13 auto-connects under conditions; 4 auto-connects, but a store rule to connect by hand; 179 connect by hand (snap connect); 17 store rule needed even to connect.
Whether a plug works the moment you install a snap depends on how its interface gets connected, and most wait for someone. Of 222 interfaces, 9 auto-connect wherever the slot exists, such as network. 13 auto-connect only under conditions, such as home. 4 auto-connect, yet connecting them by hand needs a store rule, such as mir. 179 wait for someone to run snap connect, such as camera. 17 need a store rule before they can be connected at all, such as kernel-module-load. Search above the map for any class name to list its interfaces.
04 Pairs
10 observe and control pairs; 4 socket and support pairs.
Two naming patterns come in pairs. Observe and control: the observe interface reads a subsystem, the control interface adds the writes, and control is usually a superset. There are 10 such pairs, for example avahi-control, hardware-random-control, kernel-module-control. Socket and support: a daemon snap runs with a support interface and offers a socket interface for its clients, 4 pairs, for example docker, lxd, microceph. The pairs are also tagged in the catalogue.
05 Who may even install the plug
155 installs freely; 2 installs freely unless certain attributes are used; 1 plug restricted to certain snap types; 51 super-privileged plug (store rule to install); 13 super-privileged slot (store rule to install).
Before anything connects, the snap has to install, and some plugs stop that unless the store allows them. Of 222 interfaces, 155 install freely, such as camera. 2 install freely unless the plug uses certain attributes, such as desktop. One interface has a plug that only certain snap types may hold: core-support. 51 have a super-privileged plug, which needs a store rule to install, such as snapd-control. 13 have a super-privileged slot, which needs a store rule to install, such as cuda-driver-libs. Search above the map for any class name to list its interfaces.
06 Where to go from here
The classes are tags on every catalogue entry; search by class name above the map.
The classes are a lens, not a family. To see what one interface actually grants, open its family deck or search for it above the map; the catalogue under each family deck carries the same class tags. The system control family holds most of the observe and control pairs, and the containers family most of the socket and support pairs. The implementation deck explains the rules these classes are read from.
Read more
What the classes mean
Each interface gets one class on each of four axes. The catalogue under every family deck carries the same classes as tags, and the search box above the map finds them by name.
| Axis | Question it answers |
|---|---|
| By name | what kind of permission the name suggests: one resource or device, a -control that changes a subsystem, an -observe that reads it, a -support for a privileged daemon, a daemon's socket, a session -service, vendor -driver-libs, part of snapd's API, -keys, listed -files, a -mount filesystem type, a -manager daemon |
| Where the slot lives | on the system on classic and Ubuntu Core, on classic only, on Ubuntu Core only; on an app snap, or on an app snap and the system on classic; on the gadget; or the system holds the plug and vendor snaps the slot |
| How it gets connected | auto-connects, auto-connects under conditions (a device, a publisher, an attribute, classic or not), auto-connects but needs a store rule to connect by hand, connected by hand with snap connect, or a store rule needed even to connect |
| Who may install it | installs freely, freely unless certain attributes are used, a plug limited to certain snap types, or a super-privileged plug or slot that needs a store rule to install |
Pairs: an -observe interface whose -control partner reads and writes the same subsystem, and a socket interface whose -support partner the daemon snap itself uses.
for app developers for Ubuntu Core developers for snapd developers
How each class is derived
The classes are computed by the map's own tools from the static information of every interface in snapd, dumped from the code: its name, whether its slot is implicit on classic and on Ubuntu Core, and its plug and slot rules in the base declaration.
| Axis | Read from |
|---|---|
| By name | the suffix of the name; a short fixed list of daemon socket interfaces; names starting with snap- and snapd-control |
| Where the slot lives | the implicit-slot flags and slot-snap-type under allow-installation |
| How it gets connected | deny-connection: true with deny-auto-connection (store rule to connect), deny-connection: true alone (auto-connects, store rule to connect by hand: the policy reads only the rules for the kind of connection asked for), deny-auto-connection: true (by hand), any other deny or allow-auto-connection condition (conditional), otherwise auto |
| Who may install it | allow-installation: false on the plug or slot side (super-privileged), plug-snap-type or plug-attributes under the plug's allow-installation |
A class is a reading of the base declaration. A snap declaration from the store can grant more to one snap; see the snap declaration.
Further reading
- All about interfaces: plugs, slots and connections.
- Interface auto-connection: what decides that a plug connects on its own.
- Super-privileged interfaces: interfaces that need store approval to install.
- Supported interfaces: the published reference entry for each interface.
Roads from here
INTERFACES AND CONFINEMENT
- Interfaces — the interfaces overview
- How interfaces are implemented — how the rules are evaluated
INTERFACE FAMILIES · every interface, grouped by what it touches
- "Interfaces: system control and observe" — the family with most observe and control pairs
- Interfaces: containers, VMs and support — the family with most socket and support pairs
- "Interfaces: network" — a family that spans every class