Unbreak SSH agent support for SSH VPN tunnels.

Authored by jgrulich on Aug 29 2018, 7:14 PM.

Description

Unbreak SSH agent support for SSH VPN tunnels.

Summary:
Right now selecting SSH agent as authentication method for SSH VPNs
results in a password dialog being shown and then a failure no matter
what is entered. This is because the agent authentication method
does not expect a password to be returned but instead expects
a path to the agent socket to be sent. The upstream nm-ssh implements
this, but KDE's plasma-nm does not.

This change implements the behavior that nm-ssh-service expects
from the frontend, and allows using SSH agent authentication with
SSH VPNs set up by plasma-nm.

I fully admit that this change is a bit hacky in that it hardcodes nm-ssh
specific functionality in the core of plasma-nm, but I feel it could be
fine for the following reasons:

It fixes completely broken functionality at a relatively low cost.
There is similar hardcoded behavior already e.g. for OpenConnect
in PasswordDialog::initializeUi().
Doing this properly requires a major refactor of plasma-nm, that is
pulling VpnUiPlugin creation into SecretAgent instead of
PasswordDialog where it is now, and I have neither time nor
grasp of plasma-nm codebase to do this.

Fixes https://github.com/danfruehauf/NetworkManager-ssh/issues/37.
Fixes https://github.com/danfruehauf/NetworkManager-ssh/issues/54.

Reviewers: Plasma, jgrulich

Reviewed By: jgrulich

Subscribers: plasma-devel, Plasma

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D14035

Details

Committed
jgrulichAug 29 2018, 7:14 PM
Reviewer
jgrulich
Differential Revision
D14035: Unbreak SSH agent support for SSH VPN tunnels.
Parents
R116:1feaa4ca1cdf: Parse protocol in port option
Branches
Unknown
Tags
Unknown