make sure to include methods in deny response

This commit is contained in:
Kenneth Jenkins 2025-02-26 16:37:13 -08:00
parent e45f11d281
commit 3e6f4464af

View file

@ -440,11 +440,18 @@ func handleEvaluatorResponseForSSH(
// XXX: do we want to send an equivalent to the "show error details" output
// in the case of a deny result?
methods := []string{"publickey"}
if slices.Contains(state.MethodsAuthenticated, "keyboard-interactive") {
methods = append(methods, "keyboard-interactive")
}
return &extensions_ssh.ServerMessage{
Message: &extensions_ssh.ServerMessage_AuthResponse{
AuthResponse: &extensions_ssh.AuthenticationResponse{
Response: &extensions_ssh.AuthenticationResponse_Deny{
Deny: &extensions_ssh.DenyResponse{},
Deny: &extensions_ssh.DenyResponse{
Methods: methods,
},
},
},
},