Hello,
I am requesting classic confinement for the snap “aegis-host”.
name: aegis-host
description:
Aegis Host is the native messaging daemon for the Aegis HTTP ecosystem. It acts as a secure, local bridge between your web browsers (Chrome, Firefox, Edge, Brave, Vivaldi, etc.) and your system’s GnuPG keyring. Key Features:
- Secure Challenge Signing: Authenticate dynamically using GnuPG private keys directly in your browser.
- Stateless Encryption: Encrypt payloads using public keys on the fly without cluttering your permanent local keyring.
- GUI Pinentry Support: Interacts seamlessly with your native OS Pinentry dialog (like Pinentry-GTK, Pinentry-Qt, or Pinentry-Mac) for secure passphrase entry.
- Lightweight & Fast: Written in Rust for maximum memory safety, security, and near-zero overhead.
snapcraft: native-host-rust/snap/snapcraft.yaml at main · AegisHttp/native-host-rust · GitHub
upstream: github.com/AegisHttp/native-host-rust/
upstream-relation: I am the author and lead maintainer of the upstream project.
supported-category: other (temporarily granted classic due to resources not yet supported by snapd, specifically browser native messaging host registration and GnuPGagent socket access)
reasoning:
Technical reasons for why the existing interfaces are not sufficient:
1. Inability to Register Native Messaging Manifests via Strict Interfaces
- The Problem: For web browsers (Chrome, Chromium, Firefox, Edge, Brave, Vivaldi) to communicate with
aegis-host, a JSON manifest file must be written to specific host paths, such as~/.config/google-chrome/NativeMessagingHosts/and~/.mozilla/native-messaging-hosts/. - Interface Insufficiency: There is no
browser-native-messaginginterface in snapd. While thepersonal-filesinterface allows reading/writing predefined paths in the home directory, it requires hardcoding the paths insnapcraft.yamlat build-time. We cannot pre-enumerate all potential user configurations, browser variations (e.g., flatpak vs native browsers, custom profiles), or dynamic profile locations. Writing to arbitrary browser-specific folders across different home structures is blocked under strict confinement.
2. Access to GnuPG Keyring and Dynamic Unix Sockets
- The Problem:
aegis-hostmust execute the system-installedgpgbinary (typically/usr/bin/gpg) and interact with the user’s local GnuPG home directory (usually~/.gnupg/). More importantly, it must establish a Unix socket connection with the running hostS.gpg-agentdaemon socket to request cryptographic operations. - Interface Insufficiency:
- No GnuPGSocket Interface: There is no standard socket-forwarding interface in snapd for the local GnuPGAgent socket.
- Strict Isolation: Under strict confinement, access to files outside the snap mount point (like host keyring databases) is denied. The application cannot execute host-level binaries or connect to external background agent sockets running outside the sandbox.
3. Native Pinentry GUI/CLI Dialog Spawning
-
The Problem: When signing or decrypting, GnuPG requires secure passphrase entry by spawning the system’s Pinentry dialog (e.g.,
pinentry-gnome3,pinentry-gtk-2,pinentry-qt, or terminal-based pinentry). -
Interface Insufficiency: These Pinentry helpers are spawned by the host
gpg-agentor the application itself and require access to the user’s actual session bus, Wayland/X11 display, and system TTY. A strictly confined snap cannot securely invoke or delegate execution to these external host GUI pinentry agents without triggering AppArmor blockages. -
I understand that strict confinement is generally preferred over classic.
-
I’ve tried the [existing interfaces]to make the snap to work under strict confinement.
Thank you for your time and review!