fix(xanthous/server): Accept password authentication

Accept password authentication in addition to public key authentication,
but ignore the actual password, so that clients without ssh keys
configured (or configured to send no ssh keys) can authenticate.

Change-Id: I86130b9725d1928ac45b5db55f18c09687ee0fd5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3807
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
Griffin Smith 2021-11-07 15:23:07 -05:00 committed by grfn
parent 94be8ad755
commit e3724448a2

View file

@ -174,6 +174,12 @@ impl server::Handler for Handler {
self.finished_auth(Auth::Accept)
}
fn auth_password(mut self, username: &str, _password: &str) -> Self::FutureAuth {
info!(%username, "Accepted new connection");
self.username = Some(username.to_owned());
self.finished_auth(Auth::Accept)
}
fn auth_publickey(
mut self,
username: &str,