Hi
I’d like to enable Signal Desktop to be connected to the polkit interface in order to access actions prefixed org.signalapp only. The change to the snap recipe is here:
candidate ← fix/polkit-desktop-backups-446
opened 04:53PM - 05 Oct 26 UTC
## Summary
- Bundle Signal's three generated polkit policies at the snap's `meta… /polkit` location, declare the `org.signalapp` polkit plug, and stage `pkcheck` plus its client libraries.
- Replace the upstream `pkaction` availability probe with non-interactive `pkcheck`, because the snap's polkit interface permits `CheckAuthorization` but not `EnumerateActions`. The existing interactive `pkcheck -u` remains responsible for authentication.
References #446. @jnsgruk
## Validation
- `git apply --check` and `git diff --check` passed.
- Parsed `snap/snapcraft.yaml` with PyYAML and checked the plug, app wiring, and staged client paths.
- Dry-ran the upstream source patch against Signal Desktop v8.29.0.
- Checked `pkcheck` documented exit statuses and upstream's generated policy templates.
- Full snap build and interactive backup/authorization flow not run locally; PR CI and a connected desktop session are needed for those checks.
## Polkit Store declaration / auto-connect request
The [polkit interface contract](https://snapcraft.io/docs/reference/interfaces/polkit-interface/) requires `action-prefix: org.signalapp` and policy files at `meta/polkit/polkit-org-signalapp.*.policy`. This PR supplies three actions: `org.signalapp.enable-backups`, `org.signalapp.view-aep`, and `org.signalapp.plaintext-export`. It does **not** install any `.rules` files, so `install-rules` and the associated `sha3-384` hashes in the docs' combined example do not apply. Snapd's [interface implementation](https://github.com/canonical/snapd/blob/master/interfaces/builtin/polkit.go) checks policy action IDs against the prefix and only requires hashes for `.rules` entries.
The interface is super-privileged and non-auto-connected by default. To auto-connect `signal-desktop:polkit-org-signalapp` to the system `polkit` slot, the publisher must request a Store snap declaration granting installation and auto-connection. Adding a hash to this YAML would not itself enable auto-connect. The request can cite this PR, the three policy files in the built snap, and the need for an OS authentication prompt before enabling backups, viewing a recovery key or exporting plaintext.
## Risk / follow-up
The polkit interface must connect and the policies must be installed by snapd for the flow to work. Verify a built snap's policy files, `pkcheck` execution and the desktop backup setup prompt in a test session before promoting a candidate build. @jnsgruk reported a successful local build/install and backup enablement [in the PR thread](https://github.com/snapcrafters/signal-desktop/pull/485#issuecomment-5999135691); CI and Store approval remain separate gates.
Ideally, this would auto-connect , but right now I’m just concerned with getting it uploaded and released? The plug definition is:
plugs:
polkit-org-signalapp:
interface: polkit
action-prefix: org.signalapp
Many thanks
Jon
This request has been added to the queue for review by the @reviewers team.
I should add, the change was motivated by this issue: Issue · GitHub
Hi @jnsgruk
+1 from me to grant auto-connection of polkit interface to signal-desktop snap. What do other reviewers think?
1 Like
Hello @jnsgruk
The reasoning provided makes sense to me, so this is a +2 from my side as well for granting auto-connection of polkit to the signal-desktop snap.
1 Like
Hmm, is this live? I just tried to publish the snap and got this error?
Status: error while processing
Issues while processing snap:
- human review required due to ‘allow-installation’ constraint (bool)
Full execution log: ‘/home/runner/.local/state/snapcraft/log/snapcraft-20261008-110544.172983.log’
+2 votes for, 0 votes against, Granting auto-connection of polkit interface to signal-desktop. I was unable to trigger the automated review. The new revision of the snap should pass the checks.
1 Like