Bug 1200621 - Unable to make openconnect VPN connections using nmcli
Summary: Unable to make openconnect VPN connections using nmcli
Keywords:
Status: CLOSED DUPLICATE of bug 975185
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager-openconnect
Version: 21
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: David Woodhouse
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-11 02:22 UTC by Alex Smith
Modified: 2015-11-19 14:21 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-11-19 14:21:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.