gerrit/gerrit-sshd
David Ostrovsky a5959d2216 SSHD: Prevent double authentication for the same public key
Openssh client sends two requests, one without a key signature to verify
that the public key is acceptable and the second one with the signature
after having loaded the private key and signed some data for actual
verification.

To prevent that the PublickeyAuthenticator#authenticate is called twice
cache the authentication status for session and public key.  Implement
SessionListener to clean up the cache entry when session is destroyed.

This is a workaround for SSHD bug [1].

[1] https://issues.apache.org/jira/browse/SSHD-300

Inspired-By: Guillaume Nodet <gnodet@apache.org>
Change-Id: Ie8caebd6762125a754c46d821b3c7af2a10edd2b
2014-03-24 19:12:59 +00:00
..
2014-02-25 07:39:29 +00:00