Skip to content
Commit 38b65946 authored by Jan Grulich's avatar Jan Grulich
Browse files

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
parent 1feaa4ca
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment