Skip to content

fix: keep transient Protun key in NetworkManager - #28

Open
UglyEgg wants to merge 1 commit into
ProtonVPN:stablefrom
UglyEgg:contrib/protun-transient-secret
Open

fix: keep transient Protun key in NetworkManager#28
UglyEgg wants to merge 1 commit into
ProtonVPN:stablefrom
UglyEgg:contrib/protun-transient-secret

Conversation

@UglyEgg

@UglyEgg UglyEgg commented Sep 13, 2026

Copy link
Copy Markdown

Problem

Protun supplies its WireGuard private key while constructing an unsaved NetworkManager profile, but marks the secret AGENT_OWNED. NetworkManager therefore asks a user-session secret agent to store and later return the key. Plasma has no Protun-specific NetworkManager secret plugin, so activation can remain blocked waiting for credentials.

NetworkManager defines flag 0 as system-owned and flag 1 as agent-owned: https://networkmanager.dev/docs/api/latest/secrets-flags.html

Change

Keep the supplied key on the existing transient NetworkManager profile and make save_to_disk=False explicit at the call site. The key, protocol, peer, routing, and tunnel configuration are unchanged.

An unsaved profile is not persistent configuration, but NetworkManager may represent in-memory profiles under root-only runtime storage. This proposal therefore removes the desktop secret-agent dependency; it does not claim the key exists only in process memory.

Verification

  • Tests assert both the system-owned secret flag and explicit unsaved-profile contract.
  • Complete upstream suite: 469 passed; two unchanged dependency warnings.
  • Flake8 passes on both changed files.
  • Downstream Fedora 44 / Plasma acceptance covered cold start, connect, disconnect, reconnect, and suspend/resume using the equivalent patch against Proton's packaged API Core 5.6.20.

Development disclosure: I developed this patch with material assistance from OpenAI Codex under my direction, then reviewed, tested, and signed the final change.

Protun connections are unsaved, but marking the WireGuard private key as
agent-owned makes NetworkManager ask a desktop secret agent to persist and
return it. Plasma has no Protun-specific secret plugin, so activation can
remain blocked waiting for credentials.

Keep the supplied key on the transient NetworkManager profile and explicitly
preserve save_to_disk=False. This removes the desktop-specific secret-agent
dependency without changing the key, protocol, or tunnel configuration.

Cover both the secret flag and unsaved-profile contract with focused tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant