After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753132 - [RFE] libnm: Implement new NMSecretAgent API
[RFE] libnm: Implement new NMSecretAgent API
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: nm-next
 
 
Reported: 2015-08-01 13:57 UTC by Thomas Haller
Modified: 2020-11-12 14:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2015-08-01 13:57:30 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.
Comment 1 Thomas Haller 2015-08-01 13:57:53 UTC
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.
Comment 2 Thomas Haller 2016-06-15 14:59:59 UTC
Currently, the clients all re-implement spawning of the auth-helper.
Optimally, NMSecretAgent API helps with that and unifies the code there.
Comment 3 André Klapper 2020-11-12 14:33:38 UTC
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).