Bug 401554 - Cannot connect to OpenConnect VPN via applet
Summary: Cannot connect to OpenConnect VPN via applet
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networks widget (show other bugs)
Version: master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-29 23:53 UTC by Lev
Modified: 2024-12-23 18:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.14.5
Sentry Crash Report:


Attachments
Proposed patch to fix this issue (790 bytes, patch)
2018-12-03 13:45 UTC, Jan Grulich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lev 2018-11-29 23:53:07 UTC
SUMMARY

After a recent update I can't connect to a Cisco Openconnect server that I have been using. Downgrading plasma-nm to 5.14.3 allows me to connect normally again.
I have login and password saved for this connection (no certificate file).
When I click "Login" I see "Login failed."
Under "View Log" I see this:

POST https://<server ip>/
Attempting to connect to server <server ip>:443
Connected to <server ip>:443
SSL negotiation with <server ip>
Server certificate verify failed: signer not found
Connected to HTTPS on <server ip>
Got HTTP response: HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Cache-Control: no-cache
Pragma: no-cache
Connection: Keep-Alive
Date: Thu, 29 Nov 2018 23:42:44 GMT
X-Frame-Options: SAMEORIGIN
X-Aggregate-Auth: 1
HTTP body chunked (-2)
XML POST enabled
POST https://<server ip>/
Got HTTP response: HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Cache-Control: no-cache
Pragma: no-cache
Connection: Keep-Alive
Date: Thu, 29 Nov 2018 23:42:47 GMT
X-Frame-Options: SAMEORIGIN
X-Aggregate-Auth: 1
HTTP body chunked (-2)

And in the system journal:
NetworkManager[511]: <error> [1543535084.6572] vpn-connection[0x56360245c100,75d78a0c-a0df-4843-986c-75517fc85a44,"<connection name>",0]: Failed to request VPN secrets #3: No agents were available for this request.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.52.0
Qt Version: 5.11.2
Comment 1 Jan Grulich 2018-11-30 06:29:04 UTC
Did you downgrade just plasma-nm or also other packages? There was just one change related to Openconnect in Plasma 5.14.4, it's this one [1], but I don't think this might cause your problem. You say you have password and login safed for this connection, do they get filled in the dialog when you try to connect your connection from the applet?

[1] - https://cgit.kde.org/plasma-nm.git/commit/?h=Plasma/5.14&id=00d18e2d9cef69cd8066b63c2c5dc40748c8e61e
Comment 2 Lev 2018-11-30 09:39:23 UTC
Yes, downgrading only plasma-nm is enough and I can connect again.

With the latest version, login and password are filled in as usual.
Comment 3 Jan Grulich 2018-11-30 13:23:24 UTC
Are you able to try to clone plasma-nm from here [1], checkout to "Plasma/5.14" branch and just revert latest patch, build and install it? To see if this latest change broke it for you?

[1] - https://cgit.kde.org/plasma-nm.git/
Comment 4 Lev 2018-11-30 14:22:17 UTC
Yes, looks like it works after reverting the patch above.
Comment 5 Jan Grulich 2018-11-30 14:28:22 UTC
Did you restart kded5 after you installed plasma-nm from git? Are you sure the kded5 module from plasma-nm is installed to the correct location? I want to be sure it's this commit which causes this problem. Maybe you want to downgrade to Plasma-nm 5.14.3 to be sure you have the broken version and install the one from git to verify it's fixed.
Comment 6 Lev 2018-11-30 14:40:25 UTC
Here's what I did specifically.

1. Installed plasma-nm 5.14.4, the broken version. Made sure it's broken.
2. Checked out the git version.
3. Reverted the patch.
4. cmake, make (in local dir).
5. sudo cp bin/libplasmanetworkmanagement_openconnectui.so /usr/lib/qt/plugins/
6. Reboot. 

Made sure that it works now.

To double-check: went and applied the patch again, repeated steps 4-6, it broke again.
Comment 7 Jan Grulich 2018-11-30 15:09:25 UTC
Thanks for testing. I don't have any Openconnect server I could use for testing so it is more complicated for me to fix and verify this. I'll try to setup a local server so I can reproduce this issue and fix it properly.
Comment 8 Jan Grulich 2018-12-03 13:45:32 UTC
Created attachment 116645 [details]
Proposed patch to fix this issue

Can you please try this patch? Apply it on top of Plasma/5.14 branch.
Comment 9 Jan Grulich 2018-12-03 13:58:48 UTC
Ignore the proposed patch, I reverted the change which broke it.
Comment 10 Ben Cooksley 2024-12-23 18:26:06 UTC
Bulk transfer as requested in T17796