Repository navigation
feat: retrieve WiFi/VPN secrets from D-Bus Secret Service with unlock support - #2402
Conversation
…vation When a pre-existing WiFi connection activation is cancelled, do not remove the connection profile — only remove profiles for newly created connections.
Wireless, 802.1x, VPN, and WireGuard secrets are now looked up from org.freedesktop.Secret before prompting the user. If the keyring is locked, the unlock prompt is triggered via Prompt.Prompt() and the lookup retried after the vault is unlocked.
|
I restructured the function. Sorry if the code style is weird. I am new to go and don't have much of an own opinion on stuff yet when it comes to language features. But I think that is a cleaner way to do it. |
|
I've checked and it doesn't fix #2358, because it never reached the point of asking for credentials in the first place. |
|
@domenkozar That's unfortunate. It seems it was unrelated. The good news is that I already have a fix locally that I am going to submit once this gets merged. It also includes some mocked tests, but I don't actually have a eap network to connect to for a real integration test. I'd appreciate it if you could test that one. |
|
802.11x I haven't been able to figure out the workflow since I dont have a way to run an 802.11x AP, but the GUI and things are mostly there once it does get figured out. |
I'll give it a shot using claude code |
… support (duxlabs-dev#2402) * fix: preserve pre-existing connection profiles on cancelled WiFi activation When a pre-existing WiFi connection activation is cancelled, do not remove the connection profile — only remove profiles for newly created connections. * feat: retrieve WiFi/VPN secrets from D-Bus secret service with unlock Wireless, 802.1x, VPN, and WireGuard secrets are now looked up from org.freedesktop.Secret before prompting the user. If the keyring is locked, the unlock prompt is triggered via Prompt.Prompt() and the lookup retried after the vault is unlocked.
Problem
Saved WiFi/VPN passwords in the keyring were never consulted — the app always prompted the user to re-enter them, even when GNOME Keyring had the correct secret.
Changes
org.freedesktop.Secret, searches items by connection UUID, and if locked triggers the system unlock dialog viaPrompt.Prompt()before retrieving the secretsecret servicewhenconn.GetSecretsreturns access-deniedCurrent state
Working. Keyring unlock dialog appears when needed, secrets are retrieved afterward, and the app prompt is bypassed.
Testing
Manual with locked/unlocked GNOME Keyring. Unit tests for ONLY_SYSTEM/NO_INTERACTION flags. Build & vet clean.
Review
Should more Unit tests be required to secure the correct behavior of this? Should the Architecture be improved by generalizing the Secret Service helper?
This may fix #899 #1520
I ask for a thorough review to deal with the above questions.