Bug 520449 - Network Profile Editing overwrites 802.1x.private-key-password-flags with default value
Summary: Network Profile Editing overwrites 802.1x.private-key-password-flags with def...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_networkmanagement (other bugs)
Version First Reported In: 6.6.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-05-20 14:55 UTC by Katharina Bogad
Modified: 2026-05-28 17:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.7.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katharina Bogad 2026-05-20 14:55:34 UTC
Network Manager knows four values for the 802.1x.private-key-password-flags setting: 0 (= None, ask always), 1 (= Agent Owned), 2 (= Not Saved) or 4 (= Not Required).

If a Profile exists that has its 802.1x.private-key-password-flags set to 4 (e.g. because the underlying key is saved in a hardware token without PIN), kcm_networkmanagement resets this on any edit of the connection profile to 0.

## Root Cause:
https://invent.kde.org/plasma/plasma-nm/-/blob/master/libs/editor/settings/security802-1x.cpp?ref_type=heads#L148 ff parses the enum to entries in the Dropdown for editing. It does not handle the case "not required", thus defaulting to 0 (= ask always).

Consequently, during saving the value 4 for not required also cannot be serialized (https://invent.kde.org/plasma/plasma-nm/-/blob/master/libs/editor/settings/security802-1x.cpp?ref_type=heads#L351 ff).

Note that fixing this likely requires modification of the PasswordField widget for which I could not find the source code easily as I am not deeply familiar with the codebase.
Comment 1 Nate Graham 2026-05-20 16:12:29 UTC
You got close! The widget lives here: https://invent.kde.org/plasma/plasma-nm/-/blob/master/libs/editor/widgets/passwordfield.cpp?ref_type=heads

If you could produce a patch, that would be really appreciated. If you do, send it here: https://invent.kde.org/plasma/plasma-nm/-/merge_requests
Comment 2 Katharina Bogad 2026-05-21 05:30:53 UTC
Thanks for the link! I should have everything together for a patch then, but it will take a few days since I have to cross some company red tape.
Comment 3 Nate Graham 2026-05-21 13:54:48 UTC
Cool, no problem.
Comment 4 Nate Graham 2026-05-28 17:04:36 UTC
Git commit 5827abdde6e0a3aa2d701037a2b0c5a4004c0bb0 by Nate Graham, on behalf of Katharina Bogad.
Committed on 28/05/2026 at 17:04.
Pushed by ngraham into branch 'master'.

802.1x: Allow "Not Required" for Private Key Passwords

The settings silently swallowed 802.1x connections with private key
password flags set to 4 (=Not Required) and reset them to 0 upon
saving.

This was due to two unrelated bugs: (a) in TLS connections, the
flag is not in the passwordFlags bug in the privateKeyPasswordFlags
which were never examined, and (b) both loading and saving lacked
code to properly serialize this flag.
FIXED-IN: 6.7.0

M  +19   -2    libs/editor/settings/security802-1x.cpp

https://invent.kde.org/plasma/plasma-nm/-/commit/5827abdde6e0a3aa2d701037a2b0c5a4004c0bb0
Comment 5 Nate Graham 2026-05-28 17:20:48 UTC
Git commit 4646f07ed2928b652d159ce280ad5e6341110385 by Nate Graham.
Committed on 28/05/2026 at 17:05.
Pushed by ngraham into branch 'Plasma/6.7'.

802.1x: Allow "Not Required" for Private Key Passwords

The settings silently swallowed 802.1x connections with private key
password flags set to 4 (=Not Required) and reset them to 0 upon
saving.

This was due to two unrelated bugs: (a) in TLS connections, the
flag is not in the passwordFlags bug in the privateKeyPasswordFlags
which were never examined, and (b) both loading and saving lacked
code to properly serialize this flag.
FIXED-IN: 6.7.0


(cherry picked from commit 5827abdde6e0a3aa2d701037a2b0c5a4004c0bb0)

2dd298ee 802.1x: Allow "Not Required" for Private Key Passwords

Co-authored-by: Katharina Bogad <katharina.bogad@aisec.fraunhofer.de>

M  +19   -2    libs/editor/settings/security802-1x.cpp

https://invent.kde.org/plasma/plasma-nm/-/commit/4646f07ed2928b652d159ce280ad5e6341110385