D8134: plasma-nm: vpn: openconnect: pkcs11: add support for separate pin value with updated coding style
Jan Grulich
noreply at phabricator.kde.org
Thu Oct 5 07:14:36 UTC 2017
jgrulich added a comment.
In https://phabricator.kde.org/D8134#152424, @thorstenb wrote:
> The openconnect-plugin is not used for parsing this variable. Maybe it was in the past.
> I add my pin in "nm-servie-defines.h" near NM_OPENCONNECT_KEY_USERCERT. It was not used.
> I try to add this code in openconnect plugin in first place, but it was not working because the code in openconnect-plugin is not used anymore. Imho only the virtual "need_secrets" method is used from plugin. "connect" and "disconnect" are not used.
> So i searched for a different place where all the vpn variables were used. And a fellow told me to have a look on plasma-nm.
> I moved my stuff from openconnect plugin to plasma-nm. Now its working.
> What else could i say? I am shure openconnect-plugin is not in use, because i renamed userkey in userkey2 in openconnect-plugin. But the connection ist still working.
I'm not sure I understand. Let me describe how this is working:
1. You create openconnect connection in our editor (kcm), where only certain properties are allowed to be configured. These properties are defined by NetworkManager openconnect plugin, there is difference between plasma-nm openconnect plugin and NetworkManager plugin.
2. Once this connection is created and you try to activate it, NM plugin uses properties/values you configured through our editor and attempts to connect to a server you specified in "gateway" field in our connection editor
3. Then OpenconnectAuth (from plasma-nm) comes in and tries to establish a connection with the server. In OpenconnectAuthWidget::readConfig() function we read configuration which is stored in NM plugin, which is the same configuration you specified in our editor. Given there is no "pin" property specified (in both plasma-nm plugin and NM plugin), thus the dataMap we attempt to read shouldn't contain any properties which are not defined in NM openconnect plugin.
In theory this will work if you manually modify your openconnect connection in /etc/NetworkManager/system-connections, but it's not the way openconnect devs want to handle passing this "pin" property. I will have to probably discuss this deeper with Openconnect devs what would be the correct way to support this.
REPOSITORY
R116 Plasma Network Management Applet
REVISION DETAIL
https://phabricator.kde.org/D8134
To: thorstenb, #plasma, jgrulich
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20171005/8584129b/attachment.html>
More information about the Plasma-devel
mailing list