1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 12:02:47 -05:00

New feature: k-i authentication helper plugins.

In recent months I've had two requests from different people to build
support into PuTTY for automatically handling complicated third-party
auth protocols layered on top of keyboard-interactive - the kind of
thing where you're asked to enter some auth response, and you have to
refer to some external source like a web server to find out what the
right response _is_, which is a pain to do by hand, so you'd prefer it
to be automated in the SSH client.

That seems like a reasonable thing for an end user to want, but I
didn't think it was a good idea to build support for specific
protocols of that kind directly into PuTTY, where there would no doubt
be an ever-lengthening list, and maintenance needed on all of them.

So instead, in collaboration with one of my correspondents, I've
designed and implemented a protocol to be spoken between PuTTY and a
plugin running as a subprocess. The plugin can opt to handle the
keyboard-interactive authentication loop on behalf of the user, in
which case PuTTY passes on all the INFO_REQUEST packets to it, and
lets it make up responses. It can also ask questions of the user if
necessary.

The protocol spec is provided in a documentation appendix. The entire
configuration for the end user consists of providing a full command
line to use as the subprocess.

In the contrib directory I've provided an example plugin written in
Python. It gives a set of fixed responses suitable for getting through
Uppity's made-up k-i system, because that was a reasonable thing I
already had lying around to test against. But it also provides example
code that someone else could pick up and insert their own live
response-provider into the middle of, assuming they were happy with it
being in Python.
This commit is contained in:
Simon Tatham
2022-09-01 19:38:46 +01:00
parent 1f32a16dc8
commit 15f097f399
12 changed files with 1309 additions and 46 deletions

View File

@ -2965,6 +2965,12 @@ username more than once, in case the server complains. If you know
your server can cope with it, you can enable the \q{Allow attempted
changes of username} option to modify PuTTY's behaviour.
\H{config-ssh-auth-creds} The Credentials panel
This subpane of the Auth panel contains configuration options that
specify actual \e{credentials} to present to the server: key files and
certificates.
\S{config-ssh-privkey} \q{\ii{Private key} file for authentication}
This box is where you enter the name of your private key file if you
@ -3014,6 +3020,26 @@ To do this, enter the pathname of the certificate file into the
When this setting is configured, PuTTY will honour it no matter
whether the private key is found in a file, or loaded into Pageant.
\S{config-ssh-authplugin} \q{\ii{Plugin} to provide authentication responses}
An SSH server can use the \q{keyboard-interactive} protocol to present
a series of arbitrary questions and answers. Sometimes this is used
for ordinary passwords, but sometimes the server will use the same
mechanism for something more complicated, such as a one-time password
system.
Some of these systems can be automated. For this purpose, PuTTY allows
you to provide a separate program to act as a \q{plugin} which will
take over the authentication and send answers to the questions on your
behalf.
If you have been provided with a plugin of this type, you can
configure it here, by entering a full command line in the \q{Plugin
command to run} box.
(If you want to \e{write} a plugin of this type, see \k{authplugin}
for the full specification of how the plugin is expected to behave.)
\H{config-ssh-auth-gssapi} The \i{GSSAPI} panel
The \q{GSSAPI} subpanel of the \q{Auth} panel controls the use of