polkit-agent interface is a low level interface that permits applications to register with the polkit authorisation manager, polkitd, as a polkit agent. It’s primarily intended for systems running Ubuntu Core.
This interface enables the higher level polkit interface to make access control decisions for requests from unprivileged clients.
This interface primarily intended for systems running Ubuntu Core. This is because polkit agents make use of a setuid executable,
polkit-agent-helper-1, which uses PAM. Outside of Ubuntu Core, the PAM environment inside the sandbox is unlikely to match that of the host system on classic. The only Ubuntu Core system currently shipping polkitd is the Ubuntu Core Desktop.
See Proposal: add polkit and polkit-agent interfaces to snapd for the original interface proposal and reasoning.
The test code can be found in the snapd repository: https://github.com/snapcore/snapd/blob/master/interfaces/builtin/polkit_agent_test.go
The source code for the interface is in the snapd repository: https://github.com/snapcore/snapd/blob/master/interfaces/builtin/polkit_agent.go