Bug 1200621

Summary: Unable to make openconnect VPN connections using nmcli
Product: [Fedora] Fedora Reporter: Alex Smith <alsmith>
Component: NetworkManager-openconnectAssignee: David Woodhouse <dwmw2>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: danw, dcbw, dwmw2, fedora2021q2, jklimes, psimerda
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 14:21:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alex Smith 2015-03-11 02:22:19 UTC
Description of problem:

Cannot connect to an openconnect VPN connection using the nmcli, such as with the following command:

  nmcli connection up "My VPN"

This fails to connect as it has no agent to obtain the VPN secrets, as seen by the following log message:

  Mar 10 21:46:55 localhost NetworkManager[657]: <error> [1426038415.038496] [vpn-manager/nm-vpn-connection.c:1779] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request


Version-Release number of selected component (if applicable):

  NetworkManager-openconnect-0.9.8.6-2.fc21.x86_64


How reproducible: 100%

Steps to Reproduce:
1. Attempt to connect to an openconnect VPN connection using nmcli
2.
3.

Actual results:

It doesn't connect.


Expected results:

It should connect, prompting for secrets if necessary.


Additional info:

Comment 1 Jirka Klimes 2015-03-11 08:02:28 UTC
nmcli doesn't support asking for VPN secrets yet (only for Wi-Fi, ethernet, PPPoE, mobile broadband and Bluetooth). So at present, you have to have some other secret agent running, such as nm-applet or gnome-shell.

(Anyway, you would need '--ask' so that nmcli can ask interactively).

Comment 2 Alex Smith 2015-03-11 16:08:50 UTC
> nmcli doesn't support asking for VPN secrets yet

Is there a plan for when this functionality will be added?

Comment 3 David Woodhouse 2015-07-24 09:09:42 UTC
In the OpenConnect case, 'asking for VPN secrets' actually involves talking to the VPN server and interacting with the user, and then the 'VPN secrets' include the HTTP cookie you get when you've successfully authenticated.

So a full implementation of this would involve linking nmcli against libopenconnect.so so that it can do all that.

Alternatively, perhaps what we want is just a simple secret-agent which can provide the final results on demand, then exit.

You'd end up connecting from the command line with something like:

#!/bin/sh

UUID="$0"

SERVER=$(get gateway field for connection $UUID and check it's openconnect)

eval `openconnect --authenticate $SERVER` # sets HOST,CERT,COOKIE vars

trick-secret-agent "$UUID" "$HOST" "$CERT" "$COOKIE" &
nm-cli connect "$UUID"

Comment 4 Fedora End Of Life 2015-11-04 11:02:32 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Jirka Klimes 2015-11-19 14:21:23 UTC

*** This bug has been marked as a duplicate of bug 975185 ***