GNOME Bugzilla – Bug 753132
[RFE] libnm: Implement new NMSecretAgent API
Last modified: 2020-11-12 14:33:38 UTC
When introducing libnm with NM-1-0, we copied the existing NMSecretAgent API to NMSecretAgentOld. http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=71b4c05fcad770601555109ef9837b1eb19ae26c This is similar to what we did with NMVPNPlugin (renamed to NMVpnPluginOld), see bug 749951. Eventually, we should finalize on a new stable API. There are already users of NMSecretAgentOld API (nmcli 1.0, nmtui 1.0, nm-applet 1.3). But we should come up with a new API nonetheless and not make use of the deprecated API more then necessary.
Quoting private message from dcbw: 1) secrets API is awful - clients like GNOME Shell and nm-applet have to jump through lots of hoops to return the correct secrets hash table. One idea I had was if the API itself took a single-level GHashTable of namespaced key/value pairs (only one level deep), like secrets { "vpn.secrets.IPSec Password" = "mysekrit" } and then construct the right NMConnection hash internally to send back to NM. Then clients don't have to care. This is an area that GNOME Shell and others have gotten wrong in the past, and the code is pretty icky. Having it in one place would be great. Downsides - some secrets might be binary-only (eg, UTF16 strings that Windows might require or something, like raw-password in our 802.1x setting) but the plugin could work around that by escaping or something. Also this wouldn't allow '.' in VPN secrets property names, but I don't htink that's a problem either.
Currently, the clients all re-implement spawning of the auth-helper. Optimally, NMSecretAgent API helps with that and unifies the code there.
bugzilla.gnome.org is being shut down in favor of a GitLab instance. We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time. If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/ Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).