-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPsec Pre-shared key stored as plain text #188
Comments
same problem here, IPSEC PSK is still stored within configuration file (arch linux, networkmanager-l2tp 1.20.16-1). VPN connection was created with nm-connection-editor 1.36.0-1 |
When the "Store the password only for this user" option is selected for either the user password or the PSK, they shouldn't be stored in the corresponding .nmconnection config file. When the "Store the password for all users" is selected, then NetworkManager stores the user password or the PSK under the The above Store options are available by clicking on the person/people icon in the right of the password or PSK text boxes. NetworkManager-l2tp used to to do its own thing and store the PSK under the NetworkManager does the same thing with WiFi passwords and "Store the password for all users" option. Are you using the "Store the password only for this user" option? If you are, its definitely a bug, unfortunately I'm not able to reproduce it on the Linux distros I've just tested with, but didn't test with Arch Linux. |
@dkosovic "Store the password for all users" is unckecked and "Store the password only for this user" is checked (Option next to the PSK input field). The PSK is still stored in vpn-secret section of /etc/NetworkManager/system-connections/.nmconnection Only the user password will saved to users keyring. PS: PSK of WiFi will saved to gnome keyring, no problems! |
I updated my Arch Linux VM to the latest and wasn't able to reproduce the issue. I suspect we are using different secret service agents (e.g. KeypassXC, KSecretsService , GNOME Keyring, etc) so might be seeing different behaviours especially when So, I think fixing the code so that I wasn't the author of the code that migrated But was responsible for the commit that originally closed this issue and had the following code : if (pw_flags != NM_SETTING_SECRET_FLAG_NONE) {
g_hash_table_insert(hash,
g_strdup(NM_L2TP_KEY_IPSEC_PSK "-flags"),
g_strdup_printf("%d", pw_flags));
} I suspect there shouldn't be a I just want to do a bit more testing before comiting the code. |
@sh3bang i have double checked again (Linux Mint and Manjaro Linux). On Manjaro the PSK can suddenly stored correctly in gnome-keyring and removed from .nmconnection config file (while ipsec-psk-flags=1 is added to .nmconnection config file) when choosing option to save PSK just for the current user. But i did nothing! (installed package nm-connection-editor 1.36.0-1; maybe updated!?) On Linux-Mint nothing changed, PSK will resist in config file (installed package network-manager-gnome 1.24.0+mint2+vanessa). Flag ipsec-psk-flags will always removed from config file |
Ahh, that behavior is starting to make more sense to me.
Other L2TP plug-ins from elsewhere like the Qt plug-in from plasma-nm don't know about Sorry I have no idea which L2TP plug-in the Linux Mint Cinamon Control Center uses. I would think either the GTK3 or GTK4 plug-in. I'm also not sure if Linux Mint is like Ubuntu 24.04 which switched to Netplan, NetworkManager connection profiles are now Netplan YAML. But that shouldn't matter. |
Recently posted #229 is similar to the latter issue of this one, i.e. if |
Your version 1.20.0 release note says:
This doesn't work with GNU/Linux distributions like
There is a "Store the password only for this user" option for both VPN user password and IPsec settings pre-shared key, but only the user password gets stored in keyring. IPsec PSK could still be found as plain text in network manager configuration file.
The text was updated successfully, but these errors were encountered: