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

▶ Watch this deck — 6 scenes, ~4 min

01 What the name tells you

BY NAME access one resource or device accel, allegro-vcu, alsa and 101 others 104 change a subsystem (-control) account-control, avahi-control, bluetooth-control and 34 others 37 operate as a privileged daemon (-support) acrn-support, adb-support, auditd-support and 18 others 21 read a subsystem (-observe) apparmor-observe, avahi-observe, hardware-observe and 14 others 17 talk to a daemon over its socket cups, devlxd, docker and 9 others 12 talk to a session service (-service) accounts-service, calendar-service, contacts-service and 4 others 7 expose vendor libraries (-driver-libs) cuda-driver-libs, egl-driver-libs, gbm-driver-libs and 4 others 7 unlock part of snapd's API snap-fde-control, snap-interfaces-requests-control, snap-refresh-control and 3 others 6 read key material (-keys) gpg-keys, gpg-public-keys, ssh-keys and one other 4 operate as a system manager daemon (-manager) modem-manager, network-manager, ubuntu-download-manager 3 read or write listed paths (-files) personal-files, system-files 2 mount a filesystem type (-mount) cifs-mount, nfs-mount 2
Interfaces grouped by naming pattern with counts and examples

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

WHERE THE SLOT LIVES implicit system slot on classic and Ubuntu Core accel, account-control, acrn-support and 123 others 126 implicit system slot on classic only accounts-service, appstream-metadata, calendar-service and 26 others 29 app-provided slot, or the system slot on classic audio-playback, audio-record, avahi-control and 19 others 22 app-provided slot only content, cups, dbus and 14 others 17 gadget-provided slot bool-file, dsp, gpio and 10 others 13 the system holds the plug, vendor snaps the slot cuda-driver-libs, egl-driver-libs, gbm-driver-libs and 4 others 7 no implicit slot custom-device, lxd, microceph and 3 others 6 implicit system slot on Ubuntu Core only polkit-agent, usb-gadget 2
Interfaces grouped by where their 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

HOW THEY CONNECT auto-connects accel, desktop-legacy, gsettings and 6 others 9 auto-connects under conditions audio-playback, browser-support, confdb and 10 others 13 auto-connects, but a store rule to connect by hand mir, online-accounts-service, ubuntu-download-manager and one other 4 connect by hand (snap connect) account-control, accounts-service, acrn-support and 176 others 179 store rule needed even to connect cups, fwupd, kernel-module-load and 14 others 17
Interfaces grouped by 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

PAIRS observe and control: read it, then change it avahi-control · avahi-observe hardware-random-control · hardware-random-observe kernel-module-control · kernel-module-observe location-control · location-observe login-session-control · login-session-observe mount-control · mount-observe network-control · network-observe network-setup-control · network-setup-observe physical-memory-control · physical-memory-observe snap-refresh-control · snap-refresh-observe socket and support: clients talk to the daemon, the daemon runs with -support docker · docker-support lxd · lxd-support microceph · microceph-support openvswitch · openvswitch-support
Interfaces that come in pairs: observe and control, and a daemon socket with its support interface

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

WHO MAY INSTALL installs freely accel, account-control, accounts-service and 152 others 155 installs freely unless certain attributes are used desktop, usb-gadget 2 plug restricted to certain snap types core-support 1 super-privileged plug (store rule to install) auditd-support, block-devices, checkbox-support and 48 others 51 super-privileged slot (store rule to install) cuda-driver-libs, custom-device, egl-driver-libs and 10 others 13
Interfaces grouped by installation restriction

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

ROADS Interfaces by classification Interfaces Implementation System control and observe search above the map by class name: support, observe, store rule, gadget slot…
Roads from the classification: interfaces overview, implementation, and the families with most pairs

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.

AxisQuestion it answers
By namewhat 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 liveson 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 connectedauto-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 itinstalls 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.

AxisRead from
By namethe suffix of the name; a short fixed list of daemon socket interfaces; names starting with snap- and snapd-control
Where the slot livesthe implicit-slot flags and slot-snap-type under allow-installation
How it gets connecteddeny-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 itallow-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

Roads from here

INTERFACES AND CONFINEMENT

INTERFACE FAMILIES · every interface, grouped by what it touches