diff options
author | Griffin Smith <grfn@gws.fyi> | 2021-11-07T20·23-0500 |
---|---|---|
committer | grfn <grfn@gws.fyi> | 2021-11-07T21·05+0000 |
commit | e3724448a2f2538d43135e61243ed0342bc9bff7 (patch) | |
tree | 9aba56e7bb10b0db4eea22b1f9ea66f48a6e3a0a /users/grfn/xanthous/server/src/main.rs | |
parent | 94be8ad755782faabcbaeef4bd6ae484602a54ee (diff) |
fix(xanthous/server): Accept password authentication r/3016
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>
Diffstat (limited to 'users/grfn/xanthous/server/src/main.rs')
-rw-r--r-- | users/grfn/xanthous/server/src/main.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/users/grfn/xanthous/server/src/main.rs b/users/grfn/xanthous/server/src/main.rs index 915d1c94db74..8441a5db3752 100644 --- a/users/grfn/xanthous/server/src/main.rs +++ b/users/grfn/xanthous/server/src/main.rs @@ -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, |