fix: keep transient Protun key in NetworkManager - #28
Open
UglyEgg wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=Falseexplicit 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
Development disclosure: I developed this patch with material assistance from OpenAI Codex under my direction, then reviewed, tested, and signed the final change.